From 5b94fb4ab62d09f41b97ea881cbffa91cb087784 Mon Sep 17 00:00:00 2001 From: rwatson Date: Mon, 30 Aug 2004 14:41:25 +0000 Subject: [PATCH] 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 --- sys/netgraph/ng_socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 8fdfc6b76098..8a0fd291f643 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;