From f7250466a8704c19c20e53310fd7cc10245f0ac4 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sat, 8 May 2004 02:24:21 +0000 Subject: [PATCH] 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 --- sys/kern/uipc_syscalls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index e8aa5fa77f9..1b886f54f95 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;