diff options
author | John Baldwin <jhb@FreeBSD.org> | 2002-04-09 19:58:38 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2002-04-09 19:58:38 +0000 |
commit | 16e7bc7b9026dde47b3d37bd4e15e7fcb7a28cfe (patch) | |
tree | bfe38fd64303b63597564575a0200b1522a81e99 /sys/kern | |
parent | 0042d709b82fcb68f983800a3874ee2c183cc2e0 (diff) | |
download | src-16e7bc7b9026dde47b3d37bd4e15e7fcb7a28cfe.tar.gz src-16e7bc7b9026dde47b3d37bd4e15e7fcb7a28cfe.zip |
- 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.
Notes
Notes:
svn path=/head/; revision=94301
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_acct.c | 6 |
1 files changed, 2 insertions, 4 deletions
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'. |