svn commit: r322912 - head/sys/kern

John Baldwin jhb at FreeBSD.org
Fri Aug 25 23:10:28 UTC 2017


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);
 }
 


More information about the svn-src-head mailing list