diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2019-05-04 15:59:06 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2019-05-21 16:23:43 -0400 |
commit | beee56f3543ae688f7b3f65a5e234b59856eff48 (patch) | |
tree | 0acc1ee87df781fe5e80c80a1b4e71d6a7f246c0 /security/selinux | |
parent | 8ba1d53739d960cf118762da7850e625a8b462d9 (diff) |
selinux: remove some no-op BUG_ONs
Since acdf52d97f82 ("selinux: convert to kvmalloc"), these check whether
an address-of value is NULL, which is pointless.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/ss/services.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index cc043bc8fd4c..20a089d0aca8 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -651,9 +651,7 @@ static void context_struct_compute_av(struct policydb *policydb, | |||
651 | avkey.target_class = tclass; | 651 | avkey.target_class = tclass; |
652 | avkey.specified = AVTAB_AV | AVTAB_XPERMS; | 652 | avkey.specified = AVTAB_AV | AVTAB_XPERMS; |
653 | sattr = &policydb->type_attr_map_array[scontext->type - 1]; | 653 | sattr = &policydb->type_attr_map_array[scontext->type - 1]; |
654 | BUG_ON(!sattr); | ||
655 | tattr = &policydb->type_attr_map_array[tcontext->type - 1]; | 654 | tattr = &policydb->type_attr_map_array[tcontext->type - 1]; |
656 | BUG_ON(!tattr); | ||
657 | ebitmap_for_each_positive_bit(sattr, snode, i) { | 655 | ebitmap_for_each_positive_bit(sattr, snode, i) { |
658 | ebitmap_for_each_positive_bit(tattr, tnode, j) { | 656 | ebitmap_for_each_positive_bit(tattr, tnode, j) { |
659 | avkey.source_type = i + 1; | 657 | avkey.source_type = i + 1; |
@@ -1059,9 +1057,7 @@ void security_compute_xperms_decision(struct selinux_state *state, | |||
1059 | avkey.target_class = tclass; | 1057 | avkey.target_class = tclass; |
1060 | avkey.specified = AVTAB_XPERMS; | 1058 | avkey.specified = AVTAB_XPERMS; |
1061 | sattr = &policydb->type_attr_map_array[scontext->type - 1]; | 1059 | sattr = &policydb->type_attr_map_array[scontext->type - 1]; |
1062 | BUG_ON(!sattr); | ||
1063 | tattr = &policydb->type_attr_map_array[tcontext->type - 1]; | 1060 | tattr = &policydb->type_attr_map_array[tcontext->type - 1]; |
1064 | BUG_ON(!tattr); | ||
1065 | ebitmap_for_each_positive_bit(sattr, snode, i) { | 1061 | ebitmap_for_each_positive_bit(sattr, snode, i) { |
1066 | ebitmap_for_each_positive_bit(tattr, tnode, j) { | 1062 | ebitmap_for_each_positive_bit(tattr, tnode, j) { |
1067 | avkey.source_type = i + 1; | 1063 | avkey.source_type = i + 1; |