]> err.no Git - linux-2.6/commitdiff
[PATCH] fix oops with CONFIG_AUDIT and !CONFIG_AUDITSYSCALL
authorAmy Griffis <amy.griffis@hp.com>
Thu, 13 Jul 2006 17:17:12 +0000 (13:17 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 3 Aug 2006 14:50:39 +0000 (10:50 -0400)
Always initialize the audit_inode_hash[] so we don't oops on list rules.

Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/audit.c

index d417ca1db79b02fc3cb2d30a3a2122494afd0f14..0a36091ed712c069f49ac2b7c02a53ddb14cf929 100644 (file)
@@ -690,9 +690,7 @@ static const struct inotify_operations audit_inotify_ops = {
 /* 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 @@ static int __init audit_init(void)
        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;
 }