]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: check return value of __tipc_dump_start()
authorCong Wang <xiyou.wangcong@gmail.com>
Tue, 11 Sep 2018 22:12:17 +0000 (15:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Sep 2018 20:15:04 +0000 (13:15 -0700)
commitd5f646693b493ebe3c12f58c00c8b3ed68751c7c
tree534aa89682961cea04a61a35c9ba357afe85088b
parent1ea2f830951975d13529a918fed72aa883c74704
tipc: check return value of __tipc_dump_start()

When __tipc_dump_start() fails with running out of memory,
we have no reason to continue, especially we should avoid
calling tipc_dump_done().

Fixes: cbd97f362ac1 ("tipc: call start and done ops directly in __tipc_nl_compat_dumpit()")
Reported-and-tested-by: syzbot+3f8324abccfbf8c74a9f@syzkaller.appspotmail.com
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/netlink_compat.c