mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 18:50:31 -04:00
- 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
1 changed files with 2 additions and 4 deletions
|
|
@ -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…
Reference in a new issue