[PATCH] Exclude messages by message type
[safe/jmp/linux-2.6] / kernel / audit.c
index 6d61dd7..1c3eb1b 100644 (file)
@@ -702,6 +702,9 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
        if (!audit_initialized)
                return NULL;
 
+       if (unlikely(audit_filter_type(type)))
+               return NULL;
+
        if (gfp_mask & __GFP_WAIT)
                reserve = 0;
        else