* [PATCH] net: Fix __ip_mc_inc_group argument 3 input
@ 2019-08-20 2:25 Li RongQing
2019-08-20 3:41 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: Li RongQing @ 2019-08-20 2:25 UTC (permalink / raw)
To: netdev
It expects gfp_t, but got unsigned int mode
Fixes: 6e2059b53f98 ("ipv4/igmp: init group mode as INCLUDE when join source group")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
---
net/ipv4/igmp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 180f6896b98b..b8352d716253 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1475,7 +1475,7 @@ EXPORT_SYMBOL(__ip_mc_inc_group);
void ip_mc_inc_group(struct in_device *in_dev, __be32 addr)
{
- __ip_mc_inc_group(in_dev, addr, MCAST_EXCLUDE);
+ __ip_mc_inc_group(in_dev, addr, GFP_KERNEL);
}
EXPORT_SYMBOL(ip_mc_inc_group);
@@ -2197,7 +2197,7 @@ static int __ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr,
iml->sflist = NULL;
iml->sfmode = mode;
rcu_assign_pointer(inet->mc_list, iml);
- __ip_mc_inc_group(in_dev, addr, mode);
+ __ip_mc_inc_group(in_dev, addr, GFP_KERNEL);
err = 0;
done:
return err;
--
2.16.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] net: Fix __ip_mc_inc_group argument 3 input 2019-08-20 2:25 [PATCH] net: Fix __ip_mc_inc_group argument 3 input Li RongQing @ 2019-08-20 3:41 ` Florian Fainelli 2019-08-20 3:57 ` 答复: " Li,Rongqing 0 siblings, 1 reply; 3+ messages in thread From: Florian Fainelli @ 2019-08-20 3:41 UTC (permalink / raw) To: Li RongQing, netdev, Zhang Yu On 8/19/2019 7:25 PM, Li RongQing wrote: > It expects gfp_t, but got unsigned int mode > > Fixes: 6e2059b53f98 ("ipv4/igmp: init group mode as INCLUDE when join source group") > Signed-off-by: Li RongQing <lirongqing@baidu.com> > Signed-off-by: Zhang Yu <zhangyu31@baidu.com> You have identified a problem, but I don't think it came from this commit, rather from: 9fb20801dab4 ("net: Fix ip_mc_{dec,inc}_group allocation context") see below for details. > --- > net/ipv4/igmp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c > index 180f6896b98b..b8352d716253 100644 > --- a/net/ipv4/igmp.c > +++ b/net/ipv4/igmp.c > @@ -1475,7 +1475,7 @@ EXPORT_SYMBOL(__ip_mc_inc_group); > > void ip_mc_inc_group(struct in_device *in_dev, __be32 addr) > { > - __ip_mc_inc_group(in_dev, addr, MCAST_EXCLUDE); > + __ip_mc_inc_group(in_dev, addr, GFP_KERNEL); That part looks fine. > } > EXPORT_SYMBOL(ip_mc_inc_group); > > @@ -2197,7 +2197,7 @@ static int __ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr, > iml->sflist = NULL; > iml->sfmode = mode; > rcu_assign_pointer(inet->mc_list, iml); > - __ip_mc_inc_group(in_dev, addr, mode); > + __ip_mc_inc_group(in_dev, addr, GFP_KERNEL); But here, we probably want to pass both mode and gfp_t and use ____ip_mc_inc_group(in_dev, addr, mode, GFP_KERNEL): diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 180f6896b98b..2459b5e3fd98 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -2197,7 +2197,7 @@ static int __ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr, iml->sflist = NULL; iml->sfmode = mode; rcu_assign_pointer(inet->mc_list, iml); - __ip_mc_inc_group(in_dev, addr, mode); + ____ip_mc_inc_group(in_dev, addr, mode, GFP_KERNEL); err = 0; done: return err; What do you think? -- Florian ^ permalink raw reply related [flat|nested] 3+ messages in thread
* 答复: [PATCH] net: Fix __ip_mc_inc_group argument 3 input 2019-08-20 3:41 ` Florian Fainelli @ 2019-08-20 3:57 ` Li,Rongqing 0 siblings, 0 replies; 3+ messages in thread From: Li,Rongqing @ 2019-08-20 3:57 UTC (permalink / raw) To: Florian Fainelli, netdev@vger.kernel.org, Zhang,Yu(ACG Cloud) > > > On 8/19/2019 7:25 PM, Li RongQing wrote: > > It expects gfp_t, but got unsigned int mode > > > > Fixes: 6e2059b53f98 ("ipv4/igmp: init group mode as INCLUDE when join > > source group") > > Signed-off-by: Li RongQing <lirongqing@baidu.com> > > Signed-off-by: Zhang Yu <zhangyu31@baidu.com> > > You have identified a problem, but I don't think it came from this commit, > rather from: > > 9fb20801dab4 ("net: Fix ip_mc_{dec,inc}_group allocation context") > > see below for details. > > > --- > > net/ipv4/igmp.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index > > 180f6896b98b..b8352d716253 100644 > > --- a/net/ipv4/igmp.c > > +++ b/net/ipv4/igmp.c > > @@ -1475,7 +1475,7 @@ EXPORT_SYMBOL(__ip_mc_inc_group); > > > > void ip_mc_inc_group(struct in_device *in_dev, __be32 addr) { > > - __ip_mc_inc_group(in_dev, addr, MCAST_EXCLUDE); > > + __ip_mc_inc_group(in_dev, addr, GFP_KERNEL); > > That part looks fine. > > > } > > EXPORT_SYMBOL(ip_mc_inc_group); > > > > @@ -2197,7 +2197,7 @@ static int __ip_mc_join_group(struct sock *sk, > struct ip_mreqn *imr, > > iml->sflist = NULL; > > iml->sfmode = mode; > > rcu_assign_pointer(inet->mc_list, iml); > > - __ip_mc_inc_group(in_dev, addr, mode); > > + __ip_mc_inc_group(in_dev, addr, GFP_KERNEL); > > But here, we probably want to pass both mode and gfp_t and use > ____ip_mc_inc_group(in_dev, addr, mode, GFP_KERNEL): > > diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index > 180f6896b98b..2459b5e3fd98 100644 > --- a/net/ipv4/igmp.c > +++ b/net/ipv4/igmp.c > @@ -2197,7 +2197,7 @@ static int __ip_mc_join_group(struct sock *sk, > struct ip_mreqn *imr, > iml->sflist = NULL; > iml->sfmode = mode; > rcu_assign_pointer(inet->mc_list, iml); > - __ip_mc_inc_group(in_dev, addr, mode); > + ____ip_mc_inc_group(in_dev, addr, mode, GFP_KERNEL); > err = 0; > done: > return err; > > What do you think? You are right, I will send V2 Thanks -RongQing ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-20 4:13 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-08-20 2:25 [PATCH] net: Fix __ip_mc_inc_group argument 3 input Li RongQing 2019-08-20 3:41 ` Florian Fainelli 2019-08-20 3:57 ` 答复: " Li,Rongqing
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox