Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

SELinux: silence build warning when !CONFIG_BUG

If one builds a kernel without CONFIG_BUG there are a number of 'may be
used uninitialized' warnings. Silence these by returning after the BUG().

Signed-off-by: Eric Paris <eparis@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>

+3
+2
security/selinux/hooks.c
··· 989 989 continue; 990 990 default: 991 991 BUG(); 992 + return; 992 993 }; 993 994 /* we need a comma before each option */ 994 995 seq_putc(m, ','); ··· 1443 1442 printk(KERN_ERR 1444 1443 "SELinux: out of range capability %d\n", cap); 1445 1444 BUG(); 1445 + return -EINVAL; 1446 1446 } 1447 1447 1448 1448 rc = avc_has_perm_noaudit(sid, sid, sclass, av, 0, &avd);
+1
security/selinux/netnode.c
··· 141 141 break; 142 142 default: 143 143 BUG(); 144 + return NULL; 144 145 } 145 146 146 147 list_for_each_entry_rcu(node, &sel_netnode_hash[idx].list, list)