<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/ipv4/igmp.c, branch v5.3.2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>net: fix __ip_mc_inc_group usage</title>
<updated>2019-08-20T19:48:06+00:00</updated>
<author>
<name>Li RongQing</name>
<email>lirongqing@baidu.com</email>
</author>
<published>2019-08-20T05:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a1c4cd67840ef80f6ca5f73326fa9a6719303a95'/>
<id>a1c4cd67840ef80f6ca5f73326fa9a6719303a95</id>
<content type='text'>
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 &lt;lirongqing@baidu.com&gt;
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Zhang Yu &lt;zhangyu31@baidu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;lirongqing@baidu.com&gt;
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Zhang Yu &lt;zhangyu31@baidu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2019-07-09T02:48:57+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2019-07-09T02:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=af144a983402f7fd324ce556d9f9011a8b3e01fe'/>
<id>af144a983402f7fd324ce556d9f9011a8b3e01fe</id>
<content type='text'>
Two cases of overlapping changes, nothing fancy.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Two cases of overlapping changes, nothing fancy.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>igmp: fix memory leak in igmpv3_del_delrec()</title>
<updated>2019-06-29T18:16:28+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2019-06-27T08:27:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e5b1c6c6277d5a283290a8c033c72544746f9b5b'/>
<id>e5b1c6c6277d5a283290a8c033c72544746f9b5b</id>
<content type='text'>
im-&gt;tomb and/or im-&gt;sources might not be NULL, but we
currently overwrite their values blindly.

Using swap() will make sure the following call to kfree_pmc(pmc)
will properly free the psf structures.

Tested with the C repro provided by syzbot, which basically does :

 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
 setsockopt(3, SOL_IP, IP_ADD_MEMBERSHIP, "\340\0\0\2\177\0\0\1\0\0\0\0", 12) = 0
 ioctl(3, SIOCSIFFLAGS, {ifr_name="lo", ifr_flags=0}) = 0
 setsockopt(3, SOL_IP, IP_MSFILTER, "\340\0\0\2\177\0\0\1\1\0\0\0\1\0\0\0\377\377\377\377", 20) = 0
 ioctl(3, SIOCSIFFLAGS, {ifr_name="lo", ifr_flags=IFF_UP}) = 0
 exit_group(0)                    = ?

BUG: memory leak
unreferenced object 0xffff88811450f140 (size 64):
  comm "softirq", pid 0, jiffies 4294942448 (age 32.070s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00  ................
    00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;00000000c7bad083&gt;] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
    [&lt;00000000c7bad083&gt;] slab_post_alloc_hook mm/slab.h:439 [inline]
    [&lt;00000000c7bad083&gt;] slab_alloc mm/slab.c:3326 [inline]
    [&lt;00000000c7bad083&gt;] kmem_cache_alloc_trace+0x13d/0x280 mm/slab.c:3553
    [&lt;000000009acc4151&gt;] kmalloc include/linux/slab.h:547 [inline]
    [&lt;000000009acc4151&gt;] kzalloc include/linux/slab.h:742 [inline]
    [&lt;000000009acc4151&gt;] ip_mc_add1_src net/ipv4/igmp.c:1976 [inline]
    [&lt;000000009acc4151&gt;] ip_mc_add_src+0x36b/0x400 net/ipv4/igmp.c:2100
    [&lt;000000004ac14566&gt;] ip_mc_msfilter+0x22d/0x310 net/ipv4/igmp.c:2484
    [&lt;0000000052d8f995&gt;] do_ip_setsockopt.isra.0+0x1795/0x1930 net/ipv4/ip_sockglue.c:959
    [&lt;000000004ee1e21f&gt;] ip_setsockopt+0x3b/0xb0 net/ipv4/ip_sockglue.c:1248
    [&lt;0000000066cdfe74&gt;] udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2618
    [&lt;000000009383a786&gt;] sock_common_setsockopt+0x38/0x50 net/core/sock.c:3126
    [&lt;00000000d8ac0c94&gt;] __sys_setsockopt+0x98/0x120 net/socket.c:2072
    [&lt;000000001b1e9666&gt;] __do_sys_setsockopt net/socket.c:2083 [inline]
    [&lt;000000001b1e9666&gt;] __se_sys_setsockopt net/socket.c:2080 [inline]
    [&lt;000000001b1e9666&gt;] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2080
    [&lt;00000000420d395e&gt;] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [&lt;000000007fd83a4b&gt;] entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fixes: 24803f38a5c0 ("igmp: do not remove igmp souce list info when set link down")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Reported-by: syzbot+6ca1abd0db68b5173a4f@syzkaller.appspotmail.com
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
im-&gt;tomb and/or im-&gt;sources might not be NULL, but we
currently overwrite their values blindly.

Using swap() will make sure the following call to kfree_pmc(pmc)
will properly free the psf structures.

Tested with the C repro provided by syzbot, which basically does :

 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
 setsockopt(3, SOL_IP, IP_ADD_MEMBERSHIP, "\340\0\0\2\177\0\0\1\0\0\0\0", 12) = 0
 ioctl(3, SIOCSIFFLAGS, {ifr_name="lo", ifr_flags=0}) = 0
 setsockopt(3, SOL_IP, IP_MSFILTER, "\340\0\0\2\177\0\0\1\1\0\0\0\1\0\0\0\377\377\377\377", 20) = 0
 ioctl(3, SIOCSIFFLAGS, {ifr_name="lo", ifr_flags=IFF_UP}) = 0
 exit_group(0)                    = ?

BUG: memory leak
unreferenced object 0xffff88811450f140 (size 64):
  comm "softirq", pid 0, jiffies 4294942448 (age 32.070s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 ff ff ff ff 00 00 00 00  ................
    00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;00000000c7bad083&gt;] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
    [&lt;00000000c7bad083&gt;] slab_post_alloc_hook mm/slab.h:439 [inline]
    [&lt;00000000c7bad083&gt;] slab_alloc mm/slab.c:3326 [inline]
    [&lt;00000000c7bad083&gt;] kmem_cache_alloc_trace+0x13d/0x280 mm/slab.c:3553
    [&lt;000000009acc4151&gt;] kmalloc include/linux/slab.h:547 [inline]
    [&lt;000000009acc4151&gt;] kzalloc include/linux/slab.h:742 [inline]
    [&lt;000000009acc4151&gt;] ip_mc_add1_src net/ipv4/igmp.c:1976 [inline]
    [&lt;000000009acc4151&gt;] ip_mc_add_src+0x36b/0x400 net/ipv4/igmp.c:2100
    [&lt;000000004ac14566&gt;] ip_mc_msfilter+0x22d/0x310 net/ipv4/igmp.c:2484
    [&lt;0000000052d8f995&gt;] do_ip_setsockopt.isra.0+0x1795/0x1930 net/ipv4/ip_sockglue.c:959
    [&lt;000000004ee1e21f&gt;] ip_setsockopt+0x3b/0xb0 net/ipv4/ip_sockglue.c:1248
    [&lt;0000000066cdfe74&gt;] udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2618
    [&lt;000000009383a786&gt;] sock_common_setsockopt+0x38/0x50 net/core/sock.c:3126
    [&lt;00000000d8ac0c94&gt;] __sys_setsockopt+0x98/0x120 net/socket.c:2072
    [&lt;000000001b1e9666&gt;] __do_sys_setsockopt net/socket.c:2083 [inline]
    [&lt;000000001b1e9666&gt;] __se_sys_setsockopt net/socket.c:2080 [inline]
    [&lt;000000001b1e9666&gt;] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2080
    [&lt;00000000420d395e&gt;] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [&lt;000000007fd83a4b&gt;] entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fixes: 24803f38a5c0 ("igmp: do not remove igmp souce list info when set link down")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Reported-by: syzbot+6ca1abd0db68b5173a4f@syzkaller.appspotmail.com
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2019-06-07T18:00:14+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2019-06-07T18:00:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a6cdeeb16bff89c8486324f53577db058cbe81ba'/>
<id>a6cdeeb16bff89c8486324f53577db058cbe81ba</id>
<content type='text'>
Some ISDN files that got removed in net-next had some changes
done in mainline, take the removals.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some ISDN files that got removed in net-next had some changes
done in mainline, take the removals.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: use new in_dev_ifa iterators</title>
<updated>2019-06-03T01:06:26+00:00</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2019-05-31T16:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cd5a411dbaeb9fd70e2a8241a74b6f52a1a572ca'/>
<id>cd5a411dbaeb9fd70e2a8241a74b6f52a1a572ca</id>
<content type='text'>
Use in_dev_for_each_ifa_rcu/rtnl instead.
This prevents sparse warnings once proper __rcu annotations are added.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;

t di# Last commands done (6 commands done):

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use in_dev_for_each_ifa_rcu/rtnl instead.
This prevents sparse warnings once proper __rcu annotations are added.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;

t di# Last commands done (6 commands done):

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'spdx-5.2-rc3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core</title>
<updated>2019-05-31T15:34:32+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-05-31T15:34:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2f4c53349961c8ca480193e47da4d44fdb8335a8'/>
<id>2f4c53349961c8ca480193e47da4d44fdb8335a8</id>
<content type='text'>
Pull yet more SPDX updates from Greg KH:
 "Here is another set of reviewed patches that adds SPDX tags to
  different kernel files, based on a set of rules that are being used to
  parse the comments to try to determine that the license of the file is
  "GPL-2.0-or-later" or "GPL-2.0-only". Only the "obvious" versions of
  these matches are included here, a number of "non-obvious" variants of
  text have been found but those have been postponed for later review
  and analysis.

  There is also a patch in here to add the proper SPDX header to a bunch
  of Kbuild files that we have missed in the past due to new files being
  added and forgetting that Kbuild uses two different file names for
  Makefiles. This issue was reported by the Kbuild maintainer.

  These patches have been out for review on the linux-spdx@vger mailing
  list, and while they were created by automatic tools, they were
  hand-verified by a bunch of different people, all whom names are on
  the patches are reviewers"

* tag 'spdx-5.2-rc3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (82 commits)
  treewide: Add SPDX license identifier - Kbuild
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 225
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 224
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 223
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 222
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 221
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 220
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 218
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 217
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 216
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 215
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 214
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 213
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 211
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 210
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 209
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 207
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 203
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull yet more SPDX updates from Greg KH:
 "Here is another set of reviewed patches that adds SPDX tags to
  different kernel files, based on a set of rules that are being used to
  parse the comments to try to determine that the license of the file is
  "GPL-2.0-or-later" or "GPL-2.0-only". Only the "obvious" versions of
  these matches are included here, a number of "non-obvious" variants of
  text have been found but those have been postponed for later review
  and analysis.

  There is also a patch in here to add the proper SPDX header to a bunch
  of Kbuild files that we have missed in the past due to new files being
  added and forgetting that Kbuild uses two different file names for
  Makefiles. This issue was reported by the Kbuild maintainer.

  These patches have been out for review on the linux-spdx@vger mailing
  list, and while they were created by automatic tools, they were
  hand-verified by a bunch of different people, all whom names are on
  the patches are reviewers"

* tag 'spdx-5.2-rc3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (82 commits)
  treewide: Add SPDX license identifier - Kbuild
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 225
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 224
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 223
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 222
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 221
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 220
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 218
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 217
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 216
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 215
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 214
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 213
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 211
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 210
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 209
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 207
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 203
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152</title>
<updated>2019-05-30T18:26:32+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2874c5fd284268364ece81a7bd936f3c8168e567'/>
<id>2874c5fd284268364ece81a7bd936f3c8168e567</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv4/igmp: fix build error if !CONFIG_IP_MULTICAST</title>
<updated>2019-05-23T05:08:06+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2019-05-23T01:35:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=903869bd10e6719b9df6718e785be7ec725df59f'/>
<id>903869bd10e6719b9df6718e785be7ec725df59f</id>
<content type='text'>
ip_sf_list_clear_all() needs to be defined even if !CONFIG_IP_MULTICAST

Fixes: 3580d04aa674 ("ipv4/igmp: fix another memory leak in igmpv3_del_delrec()")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ip_sf_list_clear_all() needs to be defined even if !CONFIG_IP_MULTICAST

Fixes: 3580d04aa674 ("ipv4/igmp: fix another memory leak in igmpv3_del_delrec()")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv4/igmp: fix another memory leak in igmpv3_del_delrec()</title>
<updated>2019-05-23T01:04:17+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2019-05-22T23:51:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3580d04aa674383c42de7b635d28e52a1e5bc72c'/>
<id>3580d04aa674383c42de7b635d28e52a1e5bc72c</id>
<content type='text'>
syzbot reported memory leaks [1] that I have back tracked to
a missing cleanup from igmpv3_del_delrec() when
(im-&gt;sfmode != MCAST_INCLUDE)

Add ip_sf_list_clear_all() and kfree_pmc() helpers to explicitely
handle the cleanups before freeing.

[1]

BUG: memory leak
unreferenced object 0xffff888123e32b00 (size 64):
  comm "softirq", pid 0, jiffies 4294942968 (age 8.010s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 e0 00 00 01 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;000000006105011b&gt;] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline]
    [&lt;000000006105011b&gt;] slab_post_alloc_hook mm/slab.h:439 [inline]
    [&lt;000000006105011b&gt;] slab_alloc mm/slab.c:3326 [inline]
    [&lt;000000006105011b&gt;] kmem_cache_alloc_trace+0x13d/0x280 mm/slab.c:3553
    [&lt;000000004bba8073&gt;] kmalloc include/linux/slab.h:547 [inline]
    [&lt;000000004bba8073&gt;] kzalloc include/linux/slab.h:742 [inline]
    [&lt;000000004bba8073&gt;] ip_mc_add1_src net/ipv4/igmp.c:1961 [inline]
    [&lt;000000004bba8073&gt;] ip_mc_add_src+0x36b/0x400 net/ipv4/igmp.c:2085
    [&lt;00000000a46a65a0&gt;] ip_mc_msfilter+0x22d/0x310 net/ipv4/igmp.c:2475
    [&lt;000000005956ca89&gt;] do_ip_setsockopt.isra.0+0x1795/0x1930 net/ipv4/ip_sockglue.c:957
    [&lt;00000000848e2d2f&gt;] ip_setsockopt+0x3b/0xb0 net/ipv4/ip_sockglue.c:1246
    [&lt;00000000b9db185c&gt;] udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2616
    [&lt;000000003028e438&gt;] sock_common_setsockopt+0x38/0x50 net/core/sock.c:3130
    [&lt;0000000015b65589&gt;] __sys_setsockopt+0x98/0x120 net/socket.c:2078
    [&lt;00000000ac198ef0&gt;] __do_sys_setsockopt net/socket.c:2089 [inline]
    [&lt;00000000ac198ef0&gt;] __se_sys_setsockopt net/socket.c:2086 [inline]
    [&lt;00000000ac198ef0&gt;] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2086
    [&lt;000000000a770437&gt;] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [&lt;00000000d3adb93b&gt;] entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fixes: 9c8bb163ae78 ("igmp, mld: Fix memory leak in igmpv3/mld_del_delrec()")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Reported-by: syzbot &lt;syzkaller@googlegroups.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
syzbot reported memory leaks [1] that I have back tracked to
a missing cleanup from igmpv3_del_delrec() when
(im-&gt;sfmode != MCAST_INCLUDE)

Add ip_sf_list_clear_all() and kfree_pmc() helpers to explicitely
handle the cleanups before freeing.

[1]

BUG: memory leak
unreferenced object 0xffff888123e32b00 (size 64):
  comm "softirq", pid 0, jiffies 4294942968 (age 8.010s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 e0 00 00 01 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;000000006105011b&gt;] kmemleak_alloc_recursive include/linux/kmemleak.h:55 [inline]
    [&lt;000000006105011b&gt;] slab_post_alloc_hook mm/slab.h:439 [inline]
    [&lt;000000006105011b&gt;] slab_alloc mm/slab.c:3326 [inline]
    [&lt;000000006105011b&gt;] kmem_cache_alloc_trace+0x13d/0x280 mm/slab.c:3553
    [&lt;000000004bba8073&gt;] kmalloc include/linux/slab.h:547 [inline]
    [&lt;000000004bba8073&gt;] kzalloc include/linux/slab.h:742 [inline]
    [&lt;000000004bba8073&gt;] ip_mc_add1_src net/ipv4/igmp.c:1961 [inline]
    [&lt;000000004bba8073&gt;] ip_mc_add_src+0x36b/0x400 net/ipv4/igmp.c:2085
    [&lt;00000000a46a65a0&gt;] ip_mc_msfilter+0x22d/0x310 net/ipv4/igmp.c:2475
    [&lt;000000005956ca89&gt;] do_ip_setsockopt.isra.0+0x1795/0x1930 net/ipv4/ip_sockglue.c:957
    [&lt;00000000848e2d2f&gt;] ip_setsockopt+0x3b/0xb0 net/ipv4/ip_sockglue.c:1246
    [&lt;00000000b9db185c&gt;] udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2616
    [&lt;000000003028e438&gt;] sock_common_setsockopt+0x38/0x50 net/core/sock.c:3130
    [&lt;0000000015b65589&gt;] __sys_setsockopt+0x98/0x120 net/socket.c:2078
    [&lt;00000000ac198ef0&gt;] __do_sys_setsockopt net/socket.c:2089 [inline]
    [&lt;00000000ac198ef0&gt;] __se_sys_setsockopt net/socket.c:2086 [inline]
    [&lt;00000000ac198ef0&gt;] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2086
    [&lt;000000000a770437&gt;] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:301
    [&lt;00000000d3adb93b&gt;] entry_SYSCALL_64_after_hwframe+0x44/0xa9

Fixes: 9c8bb163ae78 ("igmp, mld: Fix memory leak in igmpv3/mld_del_delrec()")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Reported-by: syzbot &lt;syzkaller@googlegroups.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: remove unneeded switch fall-through</title>
<updated>2019-02-21T21:48:00+00:00</updated>
<author>
<name>Li RongQing</name>
<email>lirongqing@baidu.com</email>
</author>
<published>2019-02-19T02:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a2b5a3fa2ce10411130b496ad0e55ef5a4971fd9'/>
<id>a2b5a3fa2ce10411130b496ad0e55ef5a4971fd9</id>
<content type='text'>
This case block has been terminated by a return, so not need
a switch fall-through

Signed-off-by: Li RongQing &lt;lirongqing@baidu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This case block has been terminated by a return, so not need
a switch fall-through

Signed-off-by: Li RongQing &lt;lirongqing@baidu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
