diff mbox series

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

Message ID 20230720203116.316250-2-paul@paul-moore.com (mailing list archive)
State Accepted
Delegated to: Paul Moore
Headers show
Series selinux: fix a 0/NULL mistmatch in ad_net_init_from_iif() | expand

Commit Message

Paul Moore July 20, 2023, 8:31 p.m. UTC
Use a NULL instead of a zero to resolve a int/pointer mismatch.

Cc: Paolo Abeni <pabeni@redhat.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307210332.4AqFZfzI-lkp@intel.com/
Fixes: dd51fcd42fd6 ("selinux: introduce and use lsm_ad_net_init*() helpers")
Signed-off-by: Paul Moore <paul@paul-moore.com>
---
 security/selinux/hooks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Abeni July 21, 2023, 7:41 a.m. UTC | #1
Hi,

On Thu, 2023-07-20 at 16:31 -0400, Paul Moore wrote:
> Use a NULL instead of a zero to resolve a int/pointer mismatch.
> 
> Cc: Paolo Abeni <pabeni@redhat.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202307210332.4AqFZfzI-lkp@intel.com/
> Fixes: dd51fcd42fd6 ("selinux: introduce and use lsm_ad_net_init*() helpers")
> Signed-off-by: Paul Moore <paul@paul-moore.com>
> ---
>  security/selinux/hooks.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index 6f53fa71fbdb..5194f12def97 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -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!

Acked-by: Paolo Abeni <pabeni@redhat.com>

/P
Paul Moore July 21, 2023, 3:52 p.m. UTC | #2
On Fri, Jul 21, 2023 at 3:41 AM Paolo Abeni <pabeni@redhat.com> wrote:
> On Thu, 2023-07-20 at 16:31 -0400, Paul Moore wrote:
> > Use a NULL instead of a zero to resolve a int/pointer mismatch.
> >
> > Cc: Paolo Abeni <pabeni@redhat.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202307210332.4AqFZfzI-lkp@intel.com/
> > Fixes: dd51fcd42fd6 ("selinux: introduce and use lsm_ad_net_init*() helpers")
> > Signed-off-by: Paul Moore <paul@paul-moore.com>
> > ---
> >  security/selinux/hooks.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> > index 6f53fa71fbdb..5194f12def97 100644
> > --- a/security/selinux/hooks.c
> > +++ b/security/selinux/hooks.c
> > @@ -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!
>
> Acked-by: Paolo Abeni <pabeni@redhat.com>

I just merged this into selinux/next, thanks.
diff mbox series

Patch

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 6f53fa71fbdb..5194f12def97 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -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);
 }
 
 /*