diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-06-11 03:47:21 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-06-11 03:47:21 +0000 |
commit | fe59af8e6895df4848f3dcd78d7d52fc365245e7 (patch) | |
tree | ed8c4a53642b3aa4df291ba07e419d827f8231da | |
parent | 0fa5ca52c65380abf9eefde88e7944f404a629ff (diff) | |
download | FreeBSD-src-fe59af8e6895df4848f3dcd78d7d52fc365245e7.zip FreeBSD-src-fe59af8e6895df4848f3dcd78d7d52fc365245e7.tar.gz |
Switch to conditionally acquiring and dropping Giant around calls into
ifp->if_output() basedd on debug.mpsafenet. That way once bpfwrite()
can be called without Giant, it will acquire Giant (if desired) before
entering the network stack.
-rw-r--r-- | sys/net/bpf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 8d01cd9..8bb0fe5 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -580,9 +580,9 @@ bpfwrite(dev, uio, ioflag) mac_create_mbuf_from_bpfdesc(d, m); BPFD_UNLOCK(d); #endif - mtx_lock(&Giant); + NET_LOCK_GIANT(); error = (*ifp->if_output)(ifp, m, &dst, (struct rtentry *)0); - mtx_unlock(&Giant); + NET_UNLOCK_GIANT(); /* * The driver frees the mbuf. */ |