diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-08-30 14:41:25 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-08-30 14:41:25 +0000 |
commit | 831d60452ca27b5afcdfb2234054e6ee24cd19e3 (patch) | |
tree | 031e2b6a5499c11f52a446df7b347b3760552db3 /sys/netgraph | |
parent | 9833028211de81bbeb550b48181739fc95c1ef81 (diff) | |
download | FreeBSD-src-831d60452ca27b5afcdfb2234054e6ee24cd19e3.zip FreeBSD-src-831d60452ca27b5afcdfb2234054e6ee24cd19e3.tar.gz |
Acquire Giant arounds calls into the linker from Netgraph sockets.
We now no longer hold Giant in send(), so it isn't inheritted by the
linker, which calls into VFS.
Reported by: glebius
Discussed with: glebius, bz
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 8fdfc6b..8a0fd29 100644 --- a/sys/netgraph/ng_socket.c +++ b/sys/netgraph/ng_socket.c @@ -300,7 +300,9 @@ printf("errx=%d\n",error); /* Not found, try to load it as a loadable module */ snprintf(filename, sizeof(filename), "ng_%s", mkp->type); + mtx_lock(&Giant); error = linker_load_module(NULL, filename, NULL, NULL, &lf); + mtx_unlock(&Giant); if (error != 0) { FREE(msg, M_NETGRAPH_MSG); goto release; |