android_kernel_xiaomi_sm7250/net/packet
Hangbin Liu 9be70070b0 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: 1da177e4c3 ("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>
2022-04-27 13:39:43 +02:00
..
af_packet.c net/packet: fix packet_sock xmit return value checking 2022-04-27 13:39:43 +02:00
diag.c
internal.h net/packet: tpacket_rcv: avoid a producer race condition 2020-04-02 15:28:11 +02:00
Kconfig
Makefile