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);
 }
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to