Date: Fri, 25 Aug 2017 23:10:27 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322912 - head/sys/kern Message-ID: <201708252310.v7PNARk5025378@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Aug 25 23:10:27 2017 New Revision: 322912 URL: https://svnweb.freebsd.org/changeset/base/322912 Log: 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 Modified: head/sys/kern/sys_socket.c Modified: head/sys/kern/sys_socket.c ============================================================================== --- head/sys/kern/sys_socket.c Fri Aug 25 23:09:11 2017 (r322911) +++ head/sys/kern/sys_socket.c Fri Aug 25 23:10:27 2017 (r322912) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708252310.v7PNARk5025378>