* [patch] audit: fix audit_filter_user_rules() initialization bug
@ 2007-01-12 12:48 Ingo Molnar
0 siblings, 0 replies; only message in thread
From: Ingo Molnar @ 2007-01-12 12:48 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
From: Ingo Molnar <mingo@elte.hu>
Subject: [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>
Index: linux/kernel/auditfilter.c
===================================================================
--- linux.orig/kernel/auditfilter.c
+++ linux/kernel/auditfilter.c
@@ -1601,8 +1601,8 @@ static int audit_filter_user_rules(struc
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;
rcu_read_lock();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-12 12:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-12 12:48 [patch] audit: fix audit_filter_user_rules() initialization bug Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.