diff options
author | phk <phk@FreeBSD.org> | 2004-11-17 09:09:55 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-11-17 09:09:55 +0000 |
commit | d6a49a1565bec352a92f40326206665b53769de2 (patch) | |
tree | 3e96ca6c2f3203ce32ec61d3746561cf0c4bd761 /sys/kern/sys_socket.c | |
parent | 313ccfcf9e23e29fc79adcefe9b9e1b52f7643ff (diff) | |
download | FreeBSD-src-d6a49a1565bec352a92f40326206665b53769de2.zip FreeBSD-src-d6a49a1565bec352a92f40326206665b53769de2.tar.gz |
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.
Diffstat (limited to 'sys/kern/sys_socket.c')
-rw-r--r-- | sys/kern/sys_socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |