From 12fb14f36df9e093fa921fedde310e363c5c1041 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 25 Aug 2017 23:10:27 +0000 Subject: [PATCH] Don't grab SOCK_LOCK for soref() when queuing an AIO request. The AIO job holds a reference on the associated file descriptor, so the socket's count should already be > 0. This fixes a LOR with the socket buffer lock after recent socket locking changes in HEAD. Sponsored by: Chelsio Communications --- sys/kern/sys_socket.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index df74c4a7af4d..5dd2fb312cd0 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -746,11 +746,7 @@ sowakeup_aio(struct socket *so, struct sockbuf *sb) if (sb->sb_flags & SB_AIO_RUNNING) return; sb->sb_flags |= SB_AIO_RUNNING; - if (sb == &so->so_snd) - SOCK_LOCK(so); soref(so); - if (sb == &so->so_snd) - SOCK_UNLOCK(so); soaio_enqueue(&sb->sb_aiotask); }