PERFORCE change 1200964 for review
John Baldwin
jhb at FreeBSD.org
Tue Sep 30 18:00:08 UTC 2014
http://p4web.freebsd.org/@@1200964?ac=10
Change 1200964 by jhb at jhb_jhbbsd on 2014/09/30 17:59:30
Stash this patch here.
Affected files ...
.. //depot/projects/smpng/sys/kern/uipc_socket.c#161 edit
Differences ...
==== //depot/projects/smpng/sys/kern/uipc_socket.c#161 (text+ko) ====
@@ -3003,7 +3003,12 @@
{
int revents = 0;
- SOCKBUF_LOCK(&so->so_snd);
+ if (events & (POLLOUT | POLLWRNORM))
+ SOCKBUF_LOCK(&so->so_snd);
+ /*
+ * The so_rcv lock doubles as SOCK_LOCK so it it is needed for
+ * all requests.
+ */
SOCKBUF_LOCK(&so->so_rcv);
if (events & (POLLIN | POLLRDNORM))
if (soreadabledata(so))
@@ -3038,7 +3043,8 @@
}
SOCKBUF_UNLOCK(&so->so_rcv);
- SOCKBUF_UNLOCK(&so->so_snd);
+ if (events & (POLLOUT | POLLWRNORM))
+ SOCKBUF_UNLOCK(&so->so_snd);
return (revents);
}
More information about the p4-projects
mailing list