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