From 16e7bc7b9026dde47b3d37bd4e15e7fcb7a28cfe Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 9 Apr 2002 19:58:38 +0000 Subject: - Remove an early KSE diagnostic panic. The thread pointer here is always curthread. - We don't need Giant to do suser() checks now, so don't lock Giant until after the check. --- sys/kern/kern_acct.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index 12c72cc00793..7e033a28c8b7 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -119,14 +119,12 @@ acct(td, uap) struct nameidata nd; int error, flags; - mtx_lock(&Giant); - if (td != curthread) - panic("acct"); /* XXXKSE DIAGNOSTIC */ /* Make sure that the caller is root. */ error = suser(td); if (error) - goto done2; + return (error); + mtx_lock(&Giant); /* * If accounting is to be started to a file, open that file for * writing and make sure it's a 'normal'. -- cgit v1.2.3