]> git.baikalelectronics.ru Git - kernel.git/commit
inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill()
authorWang Hai <wanghai38@huawei.com>
Mon, 16 Nov 2020 08:20:18 +0000 (16:20 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Nov 2020 00:08:36 +0000 (16:08 -0800)
commita1ced5cce636d4162e155fdc8bf6e0502204d1ae
tree007a281c9797d9377c3187441a777d079d11a70b
parenta60acec5ae1aa3cf42f792dc73562e41d2d847b6
inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill()

nlmsg_cancel() needs to be called in the error path of
inet_req_diag_fill to cancel the message.

Fixes: c6d3bf521b08 ("net: inet: diag: expose the socket mark to privileged processes.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Link: https://lore.kernel.org/r/20201116082018.16496-1-wanghai38@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/inet_diag.c