diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-02-22 10:20:22 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-02-22 10:20:22 +0000 |
commit | 8ded2f4fa31c81b7e45ff7eb755a646d0b0b78f7 (patch) | |
tree | 7456d457295f60f1a6514fde05a9ccde165e74c6 /sys/kern | |
parent | d72159ea5f856e4ef3d5cc795623694210c96351 (diff) |
Do not grab the NET_LOCK() when poll(2)ing on unix domain sockets.
Fix the 'X freeze' while scanning with wireless interfaces. Problem
reported by pirofti@.
ok tb@, bluhm@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sys_socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index c8dbe8724a6..0a225cb95ec 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_socket.c,v 1.29 2017/02/14 09:46:21 mpi Exp $ */ +/* $OpenBSD: sys_socket.c,v 1.30 2017/02/22 10:20:21 mpi Exp $ */ /* $NetBSD: sys_socket.c,v 1.13 1995/08/12 23:59:09 mycroft Exp $ */ /* @@ -142,7 +142,7 @@ soo_poll(struct file *fp, int events, struct proc *p) int revents = 0; int s; - NET_LOCK(s); + s = solock(so); if (events & (POLLIN | POLLRDNORM)) { if (soreadable(so)) revents |= events & (POLLIN | POLLRDNORM); @@ -168,7 +168,7 @@ soo_poll(struct file *fp, int events, struct proc *p) so->so_snd.sb_flagsintr |= SB_SEL; } } - NET_UNLOCK(s); + sounlock(s); return (revents); } |