linux-stable/net/can
Oliver Hartkopp b98769fcfa 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:14:44 +02:00
..
j1939 can: j1939: avoid possible use-after-free when j1939_can_rx_register fails 2023-06-14 11:16:56 +02:00
Kconfig
Makefile
af_can.c
af_can.h
bcm.c can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write 2023-03-27 14:40:45 +02:00
gw.c can: gw: give feedback on missing CGW_FLAGS_CAN_IIF_TX_OK flag 2023-02-02 15:42:10 +01:00
isotp.c can: isotp: isotp_sendmsg(): fix return error fix on TX path 2023-07-01 13:14:44 +02:00
proc.c
raw.c can: raw: use temp variable instead of rolling back config 2023-02-08 21:53:24 +01:00