diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-07-27 12:05:37 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-07-27 12:05:37 +0000 |
commit | 3b7b87ab436a7a227ab24ec681d96db16ec4157f (patch) | |
tree | c86ea87880028aeb9a7a66f364f5212d1876527b | |
parent | 2acc818149553e810e21e8fd9fed641297ca52a8 (diff) |
Assert that the KERNEL_LOCK() is held prior to call csignal() and
selwakeup().
ok bluhm@
-rw-r--r-- | sys/kern/uipc_socket.c | 3 | ||||
-rw-r--r-- | sys/kern/uipc_socket2.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 3bb22231867..64a65603f25 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.197 2017/07/24 15:07:39 mpi Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.198 2017/07/27 12:05:36 mpi Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -1925,6 +1925,7 @@ sogetopt(struct socket *so, int level, int optname, struct mbuf **mp) void sohasoutofband(struct socket *so) { + KERNEL_ASSERT_LOCKED(); csignal(so->so_pgid, SIGURG, so->so_siguid, so->so_sigeuid); selwakeup(&so->so_rcv.sb_sel); } diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 7935e847754..edfdc993bb9 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket2.c,v 1.84 2017/07/18 06:12:09 mpi Exp $ */ +/* $OpenBSD: uipc_socket2.c,v 1.85 2017/07/27 12:05:36 mpi Exp $ */ /* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */ /* @@ -382,6 +382,7 @@ sbunlock(struct sockbuf *sb) void sowakeup(struct socket *so, struct sockbuf *sb) { + KERNEL_ASSERT_LOCKED(); soassertlocked(so); selwakeup(&sb->sb_sel); |