Eduardo Valentin
1bfb159673
bridge: mdb: fix leak on complete_info ptr on fail path
...
We currently get the following kmemleak report:
unreferenced object 0xffff8800039d9820 (size 32):
comm "softirq", pid 0, jiffies 4295212383 (age 792.416s)
hex dump (first 32 bytes):
00 0c e0 03 00 88 ff ff ff 02 00 00 00 00 00 00 ................
00 00 00 01 ff 11 00 02 86 dd 00 00 ff ff ff ff ................
backtrace:
[<ffffffff8152b4aa>] kmemleak_alloc+0x4a/0xa0
[<ffffffff811d8ec8>] kmem_cache_alloc_trace+0xb8/0x1c0
[<ffffffffa0389683>] __br_mdb_notify+0x2a3/0x300 [bridge]
[<ffffffffa038a0ce>] br_mdb_notify+0x6e/0x70 [bridge]
[<ffffffffa0386479>] br_multicast_add_group+0x109/0x150 [bridge]
[<ffffffffa0386518>] br_ip6_multicast_add_group+0x58/0x60 [bridge]
[<ffffffffa0387fb5>] br_multicast_rcv+0x1d5/0xdb0 [bridge]
[<ffffffffa037d7cf>] br_handle_frame_finish+0xcf/0x510 [bridge]
[<ffffffffa03a236b>] br_nf_hook_thresh.part.27+0xb/0x10 [br_netfilter]
[<ffffffffa03a3738>] br_nf_hook_thresh+0x48/0xb0 [br_netfilter]
[<ffffffffa03a3fb9>] br_nf_pre_routing_finish_ipv6+0x109/0x1d0 [br_netfilter]
[<ffffffffa03a4400>] br_nf_pre_routing_ipv6+0xd0/0x14c [br_netfilter]
[<ffffffffa03a3c27>] br_nf_pre_routing+0x197/0x3d0 [br_netfilter]
[<ffffffff814a2952>] nf_iterate+0x52/0x60
[<ffffffff814a29bc>] nf_hook_slow+0x5c/0xb0
[<ffffffffa037ddf4>] br_handle_frame+0x1a4/0x2c0 [bridge]
This happens when switchdev_port_obj_add() fails. This patch
frees complete_info object in the fail path.
Reviewed-by: Vallish Vaidyeshwara <vallish@amazon.com>
Signed-off-by: Eduardo Valentin <eduval@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-11 20:01:39 -07:00
..
2017-07-06 14:02:22 +01:00
2017-06-07 15:53:24 -04:00
2017-07-04 01:49:44 -07:00
2017-04-27 16:34:29 -04:00
2017-05-26 15:18:44 -04:00
2017-03-13 13:01:10 -07:00
2017-02-06 22:53:13 -05:00
2017-07-11 20:01:39 -07:00
2017-05-26 15:18:44 -04:00
2017-07-01 07:39:07 -07:00
2016-12-24 11:46:01 -08:00
2017-04-13 13:58:22 -04:00
2017-06-26 23:13:22 -04:00
2015-03-09 16:06:10 -04:00
2016-12-10 21:27:23 -05:00
2017-02-03 15:21:22 -05:00
2017-07-04 22:35:16 +01:00
2017-06-20 13:30:14 -04:00
2017-06-06 22:20:08 -04:00
2017-05-21 13:33:28 -04:00
2017-02-06 22:53:13 -05:00
2017-06-08 14:16:25 -04:00
2017-06-29 15:48:52 -04:00
2017-04-27 16:34:29 -04:00
2017-02-17 13:33:41 -05:00
2017-07-04 22:35:16 +01:00
2017-06-08 14:16:25 -04:00
2013-02-13 19:41:46 -05:00
2017-02-03 15:21:22 -05:00