tipc: fix a missing check of genlmsg_put
authorKangjie Lu <kjlu@umn.edu>
Wed, 26 Dec 2018 06:09:04 +0000 (00:09 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 14:34:59 +0000 (15:34 +0100)
commit10a0e00c095fcfd6b6bc7305341f20519d6b882a
treebb0100c937abbb2db39923201a06d997ae26723e
parent57b2d68786a843a70bb410a9f38f6671c485d38b
tipc: fix a missing check of genlmsg_put

[ Upstream commit 46273cf7e009231d2b6bc10a926e82b8928a9fb2 ]

genlmsg_put could fail. The fix inserts a check of its return value, and
if it fails, returns -EMSGSIZE.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tipc/netlink_compat.c