summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2022-04-14 16:49:25 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-27 13:39:43 +0200
commit9be70070b00c9f3a55d89a98f08264725cf45981 (patch)
tree85392c1c7433c70d2dc97b809dc3a097abeb8ccd /net/sched
parentbf042aa56e2a432b694a1286a290ae11c8e6c685 (diff)
downloadlinux-stable-9be70070b00c9f3a55d89a98f08264725cf45981.tar.gz
linux-stable-9be70070b00c9f3a55d89a98f08264725cf45981.tar.bz2
linux-stable-9be70070b00c9f3a55d89a98f08264725cf45981.zip
net/packet: fix packet_sock xmit return value checking
[ Upstream commit 29e8e659f984be00d75ec5fef4e37c88def72712 ] packet_sock xmit could be dev_queue_xmit, which also returns negative errors. So only checking positive errors is not enough, or userspace sendmsg may return success while packet is not send out. Move the net_xmit_errno() assignment in the braces as checkpatch.pl said do not use assignment in if condition. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/sched')
0 files changed, 0 insertions, 0 deletions