Commit:     11f57cedcf382574a1e41d6cec2349f287fcea67
Parent:     ead6596b9e776ac32d82f7d1931d7638e6d4a7bd
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 10 01:46:09 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Feb 11 10:51:34 2007 -0800

    [PATCH] audit: fix audit_filter_user_rules() initialization bug
    gcc emits this warning:
     kernel/auditfilter.c: In function 'audit_filter_user':
     kernel/auditfilter.c:1611: warning: 'state' is used uninitialized in this 
    I tend to agree with gcc - there are a couple of plausible exit paths from
    audit_filter_user_rules() where it does not set 'state', keeping the
    variable uninitialized.  For example if a filter rule has an AUDIT_POSSIBLE
    action.  Initialize to 'wont audit'.  Fix whitespace damage too.
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 kernel/auditfilter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 9c8c232..87865f8 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -1601,8 +1601,8 @@ static int audit_filter_user_rules(struct 
netlink_skb_parms *cb,
 int audit_filter_user(struct netlink_skb_parms *cb, int type)
+       enum audit_state state = AUDIT_DISABLED;
        struct audit_entry *e;
-       enum audit_state   state;
        int ret = 1;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to