diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2015-08-24 14:28:26 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2015-08-24 14:28:26 +0000 |
commit | e4faf55ba7e29e98f15a74862c1a34e819895f96 (patch) | |
tree | 277f9a50d046c30fbd890542ef01fa7a5c955aa4 | |
parent | f8c702dffb696c8047b94b8e2e14b377d85ddebd (diff) |
Items from pool sosplice_pool are get in process context and put
in soft interrupt. So the pool needs an IPL_SOFTNET protection.
This fixes a panic: mtx_enter: locking against myself.
While there, call pool_setipl() also for socket_pool. Although
this pool uses explicit spl protection around pool_get() and
pool_put(), it is better to specify the IPL it is operating on.
OK mpi@ mikeb@
-rw-r--r-- | sys/kern/uipc_socket.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index cc8b477c3e3..379020389cb 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.141 2015/07/08 07:21:50 mpi Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.142 2015/08/24 14:28:25 bluhm Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -86,11 +86,12 @@ struct pool sosplice_pool; void soinit(void) { - pool_init(&socket_pool, sizeof(struct socket), 0, 0, 0, "sockpl", NULL); + pool_setipl(&socket_pool, IPL_SOFTNET); #ifdef SOCKET_SPLICE pool_init(&sosplice_pool, sizeof(struct sosplice), 0, 0, 0, "sosppl", NULL); + pool_setipl(&sosplice_pool, IPL_SOFTNET); #endif } |