diff --git a/kernel/audit.c b/kernel/audit.c index 69ef8de69f0378d49ed8ee4834ff18552f9a7fab..46cd8f66af170ce66df61fb66ff1d59055e1298f 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -2315,6 +2315,9 @@ void audit_log_link_denied(const char *operation, const struct path *link) struct audit_buffer *ab; struct audit_names *name; + if (!audit_enabled || audit_dummy_context()) + return; + name = kzalloc(sizeof(*name), GFP_NOFS); if (!name) return;