summaryrefslogtreecommitdiffstats
path: root/sys/netgraph
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-08-30 14:41:25 +0000
committerrwatson <rwatson@FreeBSD.org>2004-08-30 14:41:25 +0000
commit831d60452ca27b5afcdfb2234054e6ee24cd19e3 (patch)
tree031e2b6a5499c11f52a446df7b347b3760552db3 /sys/netgraph
parent9833028211de81bbeb550b48181739fc95c1ef81 (diff)
downloadFreeBSD-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.c2
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;
OpenPOWER on IntegriCloud