[PATCH] fix oops with CONFIG_AUDIT and !CONFIG_AUDITSYSCALL

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>

authored by Amy Griffis and committed by Al Viro 6988434e 73d3ec5a

+1 -3
+1 -3
kernel/audit.c
··· 690 /* Initialize audit support at boot time. */ 691 static int __init audit_init(void) 692 { 693 - #ifdef CONFIG_AUDITSYSCALL 694 int i; 695 - #endif 696 697 printk(KERN_INFO "audit: initializing netlink socket (%s)\n", 698 audit_default ? "enabled" : "disabled"); ··· 715 audit_ih = inotify_init(&audit_inotify_ops); 716 if (IS_ERR(audit_ih)) 717 audit_panic("cannot initialize inotify handle"); 718 719 for (i = 0; i < AUDIT_INODE_BUCKETS; i++) 720 INIT_LIST_HEAD(&audit_inode_hash[i]); 721 - #endif 722 723 return 0; 724 }
··· 690 /* Initialize audit support at boot time. */ 691 static int __init audit_init(void) 692 { 693 int i; 694 695 printk(KERN_INFO "audit: initializing netlink socket (%s)\n", 696 audit_default ? "enabled" : "disabled"); ··· 717 audit_ih = inotify_init(&audit_inotify_ops); 718 if (IS_ERR(audit_ih)) 719 audit_panic("cannot initialize inotify handle"); 720 + #endif 721 722 for (i = 0; i < AUDIT_INODE_BUCKETS; i++) 723 INIT_LIST_HEAD(&audit_inode_hash[i]); 724 725 return 0; 726 }