From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [patch] audit: fix audit_filter_user_rules() initialization bug
Date: Fri, 12 Jan 2007 13:48:42 +0100 [thread overview]
Message-ID: <20070112124841.GA6970@elte.hu> (raw)
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();
reply other threads:[~2007-01-12 12:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070112124841.GA6970@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox