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:
Ricardo Robaina 2026-07-28 11:14:23 -03:00 • committed by Paul Moore
commit 76f7e9ddee