mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare()
commit969d90ec21
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:47846d5134
("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>
This commit is contained in:
parent
c0d01f03aa
commit
6b21ae025b
1 changed files with 1 additions and 1 deletions
|
@ -546,7 +546,7 @@ int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark *mark)
|
|||
if (tsk != current)
|
||||
return 0;
|
||||
|
||||
if (WARN_ON_ONCE(!current->mm))
|
||||
if (!current->mm)
|
||||
return 0;
|
||||
exe_file = get_mm_exe_file(current->mm);
|
||||
if (!exe_file)
|
||||
|
|
Loading…
Reference in a new issue