SLUB: Make lockdep happy by not calling add_partial with interrupts enabled during...
[linux-drm-fsl-dcu.git] / kernel / auditfilter.c
index 6c61263ff96de8b320bae34feb8a2212f0ff50c5..ce61f423542c18b1a691d73f4f5d7cc4ca94ec75 100644 (file)
@@ -311,6 +311,7 @@ int audit_match_class(int class, unsigned syscall)
        return classes[class][AUDIT_WORD(syscall)] & AUDIT_BIT(syscall);
 }
 
+#ifdef CONFIG_AUDITSYSCALL
 static inline int audit_match_class_bits(int class, u32 *mask)
 {
        int i;
@@ -347,6 +348,7 @@ static int audit_match_signal(struct audit_entry *entry)
                return 1;
        }
 }
+#endif
 
 /* Common user-space to kernel rule translation. */
 static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule)
@@ -945,7 +947,7 @@ static void audit_update_watch(struct audit_parent *parent,
 
                /* If the update involves invalidating rules, do the inode-based
                 * filtering now, so we don't omit records. */
-               if (invalidating &&
+               if (invalidating && current->audit_context &&
                    audit_filter_inodes(current, current->audit_context) == AUDIT_RECORD_CONTEXT)
                        audit_set_auditable(current->audit_context);