Skip to content
Commit 1b7b533f authored by Richard Guy Briggs's avatar Richard Guy Briggs Committed by Eric Paris
Browse files

audit: drop audit_cmd_lock in AUDIT_USER family of cases



We do not need to hold the audit_cmd_mutex for this family of cases.  The
possible exception to this is the call to audit_filter_user(), so drop the lock
immediately after.  To help in fixing the race we are trying to avoid, make
sure that nothing called by audit_filter_user() calls audit_log_start().  In
particular, watch out for *_audit_rule_match().

This fix will take care of systemd and anything USING audit.  It still means
that we could race with something configuring audit and auditd shutting down.

Signed-off-by: default avatarRichard Guy Briggs <rgb@redhat.com>
Reported-by: default avatar <toshi.okajima@jp.fujitsu.com>
Tested-by: default avatar <toshi.okajima@jp.fujitsu.com>
Signed-off-by: default avatarEric Paris <eparis@redhat.com>
parent 4eb0f4ab
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment