- 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.
This commit is contained in:
parent
0042d709b8
commit
16e7bc7b90
@ -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'.
|
||||
|
Loading…
x
Reference in New Issue
Block a user