summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-05-08 02:24:21 +0000
committerrwatson <rwatson@FreeBSD.org>2004-05-08 02:24:21 +0000
commit7128a3b5cc54d8aec7054875bf041d17d19b7cd5 (patch)
treebfa995f005b9d68d4c0668cd05f0e8ff61dcc12e
parent54af59dd3a9257596241d335b2ef1df2dbd101c0 (diff)
downloadFreeBSD-src-7128a3b5cc54d8aec7054875bf041d17d19b7cd5.zip
FreeBSD-src-7128a3b5cc54d8aec7054875bf041d17d19b7cd5.tar.gz
Unconditionally lock Giant in do_sendfile(), rather than locking it
conditional on debug.mpsafenet. We can try pushing down Giant here later, but we don't want to enter VFS without holding Giant. Bumped into by: kris
-rw-r--r--sys/kern/uipc_syscalls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index e8aa5fa..1b886f5 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1705,7 +1705,7 @@ do_sendfile(struct thread *td, struct sendfile_args *uap, int compat)
int error, s, headersize = 0, headersent = 0;
struct iovec *hdr_iov = NULL;
- NET_LOCK_GIANT();
+ mtx_lock(&Giant);
hdtr_size = 0;
@@ -2070,7 +2070,7 @@ done:
if (m_header)
m_freem(m_header);
- NET_UNLOCK_GIANT();
+ mtx_unlock(&Giant);
if (error == ERESTART)
error = EINTR;
OpenPOWER on IntegriCloud