]> git.hungrycats.org Git - linux/commit
net/smc: fix sizeof to int comparison
authorYueHaibing <yuehaibing@huawei.com>
Tue, 18 Sep 2018 13:46:38 +0000 (15:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Oct 2018 07:47:07 +0000 (09:47 +0200)
commit9bdac39234d00718cd17a0cceee5d417b3ab2107
tree1843dcc9681bd5634dc50d3c1e01a76139b8f30e
parent4b238ea05476f335f865712745fa7e33e9a7711f
net/smc: fix sizeof to int comparison

[ Upstream commit 381897798a94065ffcad0772eecdc6b04a7ff23d ]

Comparing an int to a size, which is unsigned, causes the int to become
unsigned, giving the wrong result. kernel_sendmsg can return a negative
error code.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/smc/smc_clc.c