Skip to contentSkip to conversation

selinux: fix a 0/NULL mistmatch in ad_net_init_from_iif()

PATCH In review Paul Moore 2 participants 3 messages Jul 20, 2023 – Jul 21, 2023 SELinux security module

lore
Share & tools
lore

Paul Moore

author maintainer
#0 lore raw

PATCH 1/1 selinux: fix a 0/NULL mistmatch in ad_net_init_from_iif()

Use a NULL instead of a zero to resolve a int/pointer mismatch.

Cc Paolo Abeni <[email protected]>
Fixes dd51fcd42fd6 ("selinux: introduce and use lsm_ad_net_init*() helpers")
---
 security/selinux/hooks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/selinux/hooks.c +1 -1
index 6f53fa71fbdb..5194f12def97 100644
@@ -246,7 +246,7 @@ static void ad_net_init_from_iif(struct common_audit_data *ad,
 				 struct lsm_network_audit *net,
 				 int ifindex, u16 family)
 {
-	__ad_net_init(ad, net, ifindex, 0, family);
+	__ad_net_init(ad, net, ifindex, NULL, family);
 }
 
 /*
Signature · 1 line
2.41.0
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 16 lines · Paul Moore

Use a NULL instead of a zero to resolve a int/pointer mismatch.

Cc Paolo Abeni <[email protected]>
Fixes dd51fcd42fd6 ("selinux: introduce and use lsm_ad_net_init*() helpers")
---
 security/selinux/hooks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/selinux/hooks.c +0 -0
index 6f53fa71fbdb..5194f12def97 100644

security/selinux/hooks.c static void ad_net_init_from_iif(struct common_audit_data *ad, · line 252

Quoted 8 lines
security/selinux/hooks.c +1 -1
@@ -246,7 +246,7 @@ static void ad_net_init_from_iif(struct common_audit_data *ad,
 				 struct lsm_network_audit *net,
 				 int ifindex, u16 family)
 {
-	__ad_net_init(ad, net, ifindex, 0, family);
+	__ad_net_init(ad, net, ifindex, NULL, family);
 }
 
 /*

Oops, my fault! Thanks for fixing it!

/P

author maintainer
#2 lore raw
Quoted 24 lines · Paolo Abeni
Quoted 23 lines · Paul Moore

Use a NULL instead of a zero to resolve a int/pointer mismatch.

Cc Paolo Abeni <[email protected]>
Fixes dd51fcd42fd6 ("selinux: introduce and use lsm_ad_net_init*() helpers")
---
 security/selinux/hooks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
security/selinux/hooks.c +1 -1
index 6f53fa71fbdb..5194f12def97 100644
@@ -246,7 +246,7 @@ static void ad_net_init_from_iif(struct common_audit_data *ad,
                               struct lsm_network_audit *net,
                               int ifindex, u16 family)
 {
-     __ad_net_init(ad, net, ifindex, 0, family);
+     __ad_net_init(ad, net, ifindex, NULL, family);
 }
 
Quoted 5 lines

security/selinux/hooks.c static void ad_net_init_from_iif(struct common_audit_data *ad, · line 252

Quoted 1 line
security/selinux/hooks.c +0 -0
 /*

Oops, my fault! Thanks for fixing it!

I just merged this into selinux/next, thanks.

Signature · 1 line
paul-moore.com