diff options
author | Li RongQing <lirongqing@baidu.com> | 2019-08-20 13:52:47 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-06 10:23:31 +0200 |
commit | 5b71ce93d7b116d065a670221089310ac0fb70c9 (patch) | |
tree | 0f71ef52b66597ccbe08cc509958784248812e85 /net | |
parent | a6058b22e17e7445592c8ac3ca58d1242eca3223 (diff) | |
download | linux-stable-5b71ce93d7b116d065a670221089310ac0fb70c9.tar.gz linux-stable-5b71ce93d7b116d065a670221089310ac0fb70c9.tar.bz2 linux-stable-5b71ce93d7b116d065a670221089310ac0fb70c9.zip |
net: fix __ip_mc_inc_group usage
[ Upstream commit a1c4cd67840ef80f6ca5f73326fa9a6719303a95 ]
in ip_mc_inc_group, memory allocation flag, not mcast mode, is expected
by __ip_mc_inc_group
similar issue in __ip_mc_join_group, both mcase mode and gfp_t are needed
here, so use ____ip_mc_inc_group(...)
Fixes: 9fb20801dab4 ("net: Fix ip_mc_{dec,inc}_group allocation context")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/igmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 85107bf812f2..b5b0834ec5ee 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -1474,7 +1474,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); @@ -2196,7 +2196,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; |