diff options
author | 2017-02-22 10:20:21 +0000 | |
---|---|---|
committer | 2017-02-22 10:20:21 +0000 | |
commit | 457816176a8ca202f1c9c2364f09185844b8c391 (patch) | |
tree | 186a216a412bfab0d9b048685d308f9843e2b71c | |
parent | The default for the strip-nt-domain attribute is "yes", so fix up (diff) | |
download | wireguard-openbsd-457816176a8ca202f1c9c2364f09185844b8c391.tar.xz wireguard-openbsd-457816176a8ca202f1c9c2364f09185844b8c391.zip |
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@
-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); } |