linux-stable/net/can
Oliver Hartkopp 31cde3bdad can: isotp: isotp_sendmsg(): fix return error fix on TX path
commit e38910c007 upstream.

With commit d674a8f123 ("can: isotp: isotp_sendmsg(): fix return
error on FC timeout on TX path") the missing correct return value in
the case of a protocol error was introduced.

But the way the error value has been read and sent to the user space
does not follow the common scheme to clear the error after reading
which is provided by the sock_error() function. This leads to an error
report at the following write() attempt although everything should be
working.

Fixes: d674a8f123 ("can: isotp: isotp_sendmsg(): fix return error on FC timeout on TX path")
Reported-by: Carsten Schmidt <carsten.schmidt-achim@t-online.de>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20230607072708.38809-1-socketcan@hartkopp.net
Cc: stable@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-01 13:16:23 +02:00
..
j1939 can: j1939: avoid possible use-after-free when j1939_can_rx_register fails 2023-06-14 11:15:26 +02:00
af_can.c can: af_can: fix NULL pointer dereference in can_rcv_filter 2022-12-07 10:30:47 +01:00
af_can.h can: introduce CAN midlayer private and allocate it automatically 2019-09-04 13:29:14 +02:00
bcm.c can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write 2023-04-06 12:10:46 +02:00
gw.c can: skb: unify skb CAN frame identification helpers 2022-09-15 09:08:08 +02:00
isotp.c can: isotp: isotp_sendmsg(): fix return error fix on TX path 2023-07-01 13:16:23 +02:00
Kconfig net: Kconfig: move the CAN device menu to the "Device Drivers" section 2022-06-11 17:11:02 +02:00
Makefile can: add ISO 15765-2:2016 transport protocol 2020-10-07 23:18:33 +02:00
proc.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
raw.c can: raw: fix CAN FD frame transmissions over CAN XL devices 2023-02-09 11:28:10 +01:00