diff options
author | 2022-04-14 16:49:25 +0800 | |
---|---|---|
committer | 2022-04-15 11:17:30 +0100 | |
commit | 29e8e659f984be00d75ec5fef4e37c88def72712 (patch) | |
tree | 29c8f1c036c34ca5a70aaa81da326d4a6317d0fc /mm | |
parent | net/smc: Fix sock leak when release after smc_shutdown() (diff) | |
download | linux-dev-29e8e659f984be00d75ec5fef4e37c88def72712.tar.xz linux-dev-29e8e659f984be00d75ec5fef4e37c88def72712.zip |
net/packet: fix packet_sock xmit return value checking
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>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions