Skip to content

Commit d567eb7

Browse files
pcmooregregkh
authored andcommitted
audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare()
commit 969d90e upstream. eBPF can end up calling into the audit code from some odd places, and some of these places don't have @current set properly so we end up tripping the `WARN_ON_ONCE(!current->mm)` near the top of `audit_exe_compare()`. While the basic `!current->mm` check is good, the `WARN_ON_ONCE()` results in some scary console messages so let's drop that and just do the regular `!current->mm` check to avoid problems. Cc: <stable@vger.kernel.org> Fixes: 47846d5 ("audit: don't take task_lock() in audit_exe_compare() code path") Reported-by: Artem Savkov <asavkov@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a2a2a2a commit d567eb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/audit_watch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark *mark)
531531
if (tsk != current)
532532
return 0;
533533

534-
if (WARN_ON_ONCE(!current->mm))
534+
if (!current->mm)
535535
return 0;
536536
exe_file = get_mm_exe_file(current->mm);
537537
if (!exe_file)

0 commit comments

Comments
 (0)