mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
audit: bail before bug check if audit disabled
If audit is disabled, who cares if there is a bug indicating syscall in process or names already recorded. Bail immediately on audit disabled. Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
5260ecc2e0
commit
94d14e3e7b
@ -1511,14 +1511,11 @@ void __audit_syscall_entry(int major, unsigned long a1, unsigned long a2,
|
||||
struct audit_context *context = tsk->audit_context;
|
||||
enum audit_state state;
|
||||
|
||||
if (!context)
|
||||
if (!audit_enabled || !context)
|
||||
return;
|
||||
|
||||
BUG_ON(context->in_syscall || context->name_count);
|
||||
|
||||
if (!audit_enabled)
|
||||
return;
|
||||
|
||||
state = context->state;
|
||||
if (state == AUDIT_DISABLED)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user