summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-04-09 19:58:38 +0000
committerjhb <jhb@FreeBSD.org>2002-04-09 19:58:38 +0000
commitfc492a338c0a321710afc1fb0e1eb8cab3d78a71 (patch)
treebfe38fd64303b63597564575a0200b1522a81e99 /sys/kern
parentb2df921e69c2b81884d6a97313a437497130041a (diff)
downloadFreeBSD-src-fc492a338c0a321710afc1fb0e1eb8cab3d78a71.zip
FreeBSD-src-fc492a338c0a321710afc1fb0e1eb8cab3d78a71.tar.gz
- 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.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_acct.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index 12c72cc..7e033a2 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'.
OpenPOWER on IntegriCloud