]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/5.1.7/ipv4-igmp-fix-build-error-if-config_ip_multicast.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 5.1.7 / ipv4-igmp-fix-build-error-if-config_ip_multicast.patch
1 From foo@baz Fri 31 May 2019 03:16:39 PM PDT
2 From: Eric Dumazet <edumazet@google.com>
3 Date: Wed, 22 May 2019 18:35:16 -0700
4 Subject: ipv4/igmp: fix build error if !CONFIG_IP_MULTICAST
5
6 From: Eric Dumazet <edumazet@google.com>
7
8 [ Upstream commit 903869bd10e6719b9df6718e785be7ec725df59f ]
9
10 ip_sf_list_clear_all() needs to be defined even if !CONFIG_IP_MULTICAST
11
12 Fixes: 3580d04aa674 ("ipv4/igmp: fix another memory leak in igmpv3_del_delrec()")
13 Signed-off-by: Eric Dumazet <edumazet@google.com>
14 Reported-by: kbuild test robot <lkp@intel.com>
15 Signed-off-by: David S. Miller <davem@davemloft.net>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 ---
18 net/ipv4/igmp.c | 22 +++++++++++-----------
19 1 file changed, 11 insertions(+), 11 deletions(-)
20
21 --- a/net/ipv4/igmp.c
22 +++ b/net/ipv4/igmp.c
23 @@ -188,6 +188,17 @@ static void ip_ma_put(struct ip_mc_list
24 pmc != NULL; \
25 pmc = rtnl_dereference(pmc->next_rcu))
26
27 +static void ip_sf_list_clear_all(struct ip_sf_list *psf)
28 +{
29 + struct ip_sf_list *next;
30 +
31 + while (psf) {
32 + next = psf->sf_next;
33 + kfree(psf);
34 + psf = next;
35 + }
36 +}
37 +
38 #ifdef CONFIG_IP_MULTICAST
39
40 /*
41 @@ -633,17 +644,6 @@ static void igmpv3_clear_zeros(struct ip
42 }
43 }
44
45 -static void ip_sf_list_clear_all(struct ip_sf_list *psf)
46 -{
47 - struct ip_sf_list *next;
48 -
49 - while (psf) {
50 - next = psf->sf_next;
51 - kfree(psf);
52 - psf = next;
53 - }
54 -}
55 -
56 static void kfree_pmc(struct ip_mc_list *pmc)
57 {
58 ip_sf_list_clear_all(pmc->sources);