android_kernel_motorola_sm6225/net/8021q
Patrick McHardy cf2c014ade net: vlan: fix memory leak in vlan_info_rcu_free()
The following leak is reported by kmemleak:

[   86.812073] kmemleak: Found object by alias at 0xffff88006ecc76f0
[   86.816019] Pid: 739, comm: kworker/u:1 Not tainted 3.9.0-rc5+ #842
[   86.816019] Call Trace:
[   86.816019]  <IRQ>  [<ffffffff81151c58>] find_and_get_object+0x8c/0xdf
[   86.816019]  [<ffffffff8190e90d>] ? vlan_info_rcu_free+0x33/0x49
[   86.816019]  [<ffffffff81151cbe>] delete_object_full+0x13/0x2f
[   86.816019]  [<ffffffff8194bbb6>] kmemleak_free+0x26/0x45
[   86.816019]  [<ffffffff8113e8c7>] slab_free_hook+0x1e/0x7b
[   86.816019]  [<ffffffff81141c05>] kfree+0xce/0x14b
[   86.816019]  [<ffffffff8190e90d>] vlan_info_rcu_free+0x33/0x49
[   86.816019]  [<ffffffff810d0b0b>] rcu_do_batch+0x261/0x4e7

The reason is that in vlan_info_rcu_free() we don't take the VLAN protocol
into account when iterating over the vlan_devices_array.

Reported-by: Cong Wang <amwang@redhat.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Tested-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-21 15:55:42 -04:00
..
Kconfig net: vlan: add 802.1ad support 2013-04-19 14:46:06 -04:00
Makefile net/8021q: Implement Multiple VLAN Registration Protocol (MVRP) 2013-02-10 20:37:22 -05:00
vlan.c net: vlan: prepare for 802.1ad support 2013-04-19 14:45:27 -04:00
vlan.h net: vlan: add 802.1ad support 2013-04-19 14:46:06 -04:00
vlan_core.c net: vlan: fix memory leak in vlan_info_rcu_free() 2013-04-21 15:55:42 -04:00
vlan_dev.c net: vlan: add protocol argument to packet tagging functions 2013-04-19 14:46:06 -04:00
vlan_gvrp.c net: vlan: prepare for 802.1ad support 2013-04-19 14:45:27 -04:00
vlan_mvrp.c net: vlan: prepare for 802.1ad support 2013-04-19 14:45:27 -04:00
vlan_netlink.c net: vlan: add 802.1ad support 2013-04-19 14:46:06 -04:00
vlanproc.c net: proc: change proc_net_remove to remove_proc_entry 2013-02-18 14:53:08 -05:00
vlanproc.h [VLAN]: Add a net argument to proc init and cleanup calls. 2008-04-16 00:51:12 -07:00