From 1509e7d93a57247e4fbb979fb112fe58f73b826f Mon Sep 17 00:00:00 2001 From: jhb 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); }