]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:27:16 +0000 (13:27 +0100)
commitf0ec2cd03100ab287c9e5fce5ae56a76d6fc17a4
treef442d99c8e25fc7449902a3565687120439c8ecc
parent8196e11a66d751752a25b62c6dc0e2923a5e6ff0
inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill()

[ Upstream commit e33de7c5317e2827b2ba6fd120a505e9eb727b05 ]

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

Fixes: d545caca827b ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/inet_diag.c