Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit beee56f3 authored by Ondrej Mosnacek's avatar Ondrej Mosnacek Committed by Paul Moore
Browse files

selinux: remove some no-op BUG_ONs



Since acdf52d9 ("selinux: convert to kvmalloc"), these check whether
an address-of value is NULL, which is pointless.

Signed-off-by: default avatarOndrej Mosnacek <omosnace@redhat.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 8ba1d537
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -651,9 +651,7 @@ static void context_struct_compute_av(struct policydb *policydb,
	avkey.target_class = tclass;
	avkey.specified = AVTAB_AV | AVTAB_XPERMS;
	sattr = &policydb->type_attr_map_array[scontext->type - 1];
	BUG_ON(!sattr);
	tattr = &policydb->type_attr_map_array[tcontext->type - 1];
	BUG_ON(!tattr);
	ebitmap_for_each_positive_bit(sattr, snode, i) {
		ebitmap_for_each_positive_bit(tattr, tnode, j) {
			avkey.source_type = i + 1;
@@ -1059,9 +1057,7 @@ void security_compute_xperms_decision(struct selinux_state *state,
	avkey.target_class = tclass;
	avkey.specified = AVTAB_XPERMS;
	sattr = &policydb->type_attr_map_array[scontext->type - 1];
	BUG_ON(!sattr);
	tattr = &policydb->type_attr_map_array[tcontext->type - 1];
	BUG_ON(!tattr);
	ebitmap_for_each_positive_bit(sattr, snode, i) {
		ebitmap_for_each_positive_bit(tattr, tnode, j) {
			avkey.source_type = i + 1;