aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-02-10 04:46:09 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:34 -0500
commit11f57cedcf382574a1e41d6cec2349f287fcea67 (patch)
treea8f2e930a6ef2a5aba1c63e254e41c731ac5c77b
parentead6596b9e776ac32d82f7d1931d7638e6d4a7bd (diff)
[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 function 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 <mingo@elte.hu> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/auditfilter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 9c8c23227c7f..87865f8b4ce3 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -1601,8 +1601,8 @@ static int audit_filter_user_rules(struct netlink_skb_parms *cb,
1601 1601
1602int audit_filter_user(struct netlink_skb_parms *cb, int type) 1602int audit_filter_user(struct netlink_skb_parms *cb, int type)
1603{ 1603{
1604 enum audit_state state = AUDIT_DISABLED;
1604 struct audit_entry *e; 1605 struct audit_entry *e;
1605 enum audit_state state;
1606 int ret = 1; 1606 int ret = 1;
1607 1607
1608 rcu_read_lock(); 1608 rcu_read_lock();