From d6a49a1565bec352a92f40326206665b53769de2 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 17 Nov 2004 09:09:55 +0000 Subject: Push Giant down through ioctl. Don't grab Giant in the upper syscall/wrapper code NET_LOCK_GIANT in the socket code (sockets/fifos). mtx_lock(&Giant) in the vnode code. mtx_lock(&Giant) in the opencrypto code. (This may actually not be needed, but better safe than sorry). Devfs grabs Giant if the driver is marked as needing Giant. --- sys/kern/sys_socket.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/kern/sys_socket.c') diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 4a7911d..5772262 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -129,6 +129,7 @@ soo_ioctl(fp, cmd, data, active_cred, td) struct socket *so = fp->f_data; int error = 0; + NET_LOCK_GIANT(); switch (cmd) { case FIONBIO: @@ -210,6 +211,7 @@ soo_ioctl(fp, cmd, data, active_cred, td) (so, cmd, data, 0, td)); break; } + NET_UNLOCK_GIANT(); return(error); } -- cgit v1.1