audit: WARN if audit_rule_change called illegally
authorEric Paris <eparis@redhat.com>
Fri, 10 Oct 2014 19:05:21 +0000 (15:05 -0400)
committerEric Paris <eparis@redhat.com>
Fri, 10 Oct 2014 19:07:42 +0000 (15:07 -0400)
Signed-off-by: Eric Paris <eparis@redhat.com>
kernel/auditfilter.c

index 4a11697cf5b8795bf93809e2d390a113c92706d6..4419d1fbcad1fc6d8bd5ffe0b345849494d1b070 100644 (file)
@@ -1085,7 +1085,8 @@ int audit_rule_change(int type, __u32 portid, int seq, void *data,
                audit_free_rule(entry);
                break;
        default:
-               return -EINVAL;
+               err = -EINVAL;
+               WARN_ON(1);
        }
 
        return err;