]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix a double free in tipc_enable_bearer()
authorCong Wang <xiyou.wangcong@gmail.com>
Mon, 24 Dec 2018 05:45:56 +0000 (21:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Dec 2018 00:16:17 +0000 (16:16 -0800)
commit059355c3c1110c2a0c4d0936ce1556299ea86981
tree0a10986ad2cdbfbe097751d9d6183185b5e8f86f
parentbe71b73e794d4c8a0622db5abd894795dd25ee4f
tipc: fix a double free in tipc_enable_bearer()

bearer_disable() already calls kfree_rcu() to free struct tipc_bearer,
we don't need to call kfree() again.

Fixes: 1fe474a8814d ("tipc: refactor function tipc_enable_bearer()")
Reported-by: syzbot+b981acf1fb240c0c128b@syzkaller.appspotmail.com
Cc: Ying Xue <ying.xue@windriver.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/bearer.c