mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
audit: drop BUG_ON() from audit_add_to_parent()
The BUG_ON(!mutex_is_locked(&audit_filter_mutex)) check in audit_add_to_parent() will panic the kernel if the mutex is not held, which is too severe for this situation. Replace it with lockdep_assert_held(), instead. Signed-off-by: Ricardo Robaina <rrobaina@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
committed by
Paul Moore
parent
c0d73c0938
commit
76f7e9ddee
@@ -372,7 +372,7 @@ static void audit_add_to_parent(struct audit_krule *krule,
|
||||
struct audit_watch *w, *watch = krule->watch;
|
||||
int watch_found = 0;
|
||||
|
||||
BUG_ON(!mutex_is_locked(&audit_filter_mutex));
|
||||
lockdep_assert_held(&audit_filter_mutex);
|
||||
|
||||
list_for_each_entry(w, &parent->watches, wlist) {
|
||||
if (strcmp(watch->path, w->path))
|
||||
|
||||
Reference in New Issue
Block a user