From: Amy Griffis Subject: [PATCH] fix oops with CONFIG_AUDIT and !CONFIG_AUDITSYSCALL Date: Thu, 13 Jul 2006 13:17:12 -0400 Message-ID: <20060713171712.GC30792@dill.zko.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k6DHJAwZ027071 for ; Thu, 13 Jul 2006 13:19:10 -0400 Received: from atlrel9.hp.com (atlrel9.hp.com [156.153.255.214]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k6DHJ9FW000676 for ; Thu, 13 Jul 2006 13:19:09 -0400 Received: from smtp1.fc.hp.com (smtp1.fc.hp.com [15.15.136.127]) by atlrel9.hp.com (Postfix) with ESMTP id 821D43771D for ; Thu, 13 Jul 2006 13:18:42 -0400 (EDT) Received: from ldl.fc.hp.com (linux-bugs.fc.hp.com [15.11.146.30]) by smtp1.fc.hp.com (Postfix) with ESMTP id A1C783E0BB for ; Thu, 13 Jul 2006 17:18:02 +0000 (UTC) Received: from localhost (ldl.lart [127.0.0.1]) by ldl.fc.hp.com (Postfix) with ESMTP id 7CB7F13415B for ; Thu, 13 Jul 2006 11:18:02 -0600 (MDT) Received: from ldl.fc.hp.com ([127.0.0.1]) by localhost (ldl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16736-09 for ; Thu, 13 Jul 2006 11:17:59 -0600 (MDT) Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com Always initialize the audit_inode_hash[] so we don't oops on list rules. Signed-off-by: Amy Griffis --- kernel/audit.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/kernel/audit.c b/kernel/audit.c index 7dfac70..097a560 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -690,9 +690,7 @@ #endif /* Initialize audit support at boot time. */ static int __init audit_init(void) { -#ifdef CONFIG_AUDITSYSCALL int i; -#endif printk(KERN_INFO "audit: initializing netlink socket (%s)\n", audit_default ? "enabled" : "disabled"); @@ -717,10 +715,10 @@ #ifdef CONFIG_AUDITSYSCALL audit_ih = inotify_init(&audit_inotify_ops); if (IS_ERR(audit_ih)) audit_panic("cannot initialize inotify handle"); +#endif for (i = 0; i < AUDIT_INODE_BUCKETS; i++) INIT_LIST_HEAD(&audit_inode_hash[i]); -#endif return 0; } -- 1.4.0