Commit af2d741b authored by Oliver Hartkopp's avatar Oliver Hartkopp Committed by Treehugger Robot
Browse files

UPSTREAM: can: isotp: isotp_sendmsg(): fix return error fix on TX path



commit e38910c0 upstream.

With commit d674a8f1 ("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: d674a8f1 ("can: isotp: isotp_sendmsg(): fix return error on FC timeout on TX path")
Reported-by: default avatarCarsten Schmidt <carsten.schmidt-achim@t-online.de>
Signed-off-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20230607072708.38809-1-socketcan@hartkopp.net


Cc: stable@vger.kernel.org
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I6cb85ee1e6fdc609991c383e4f6fc71ea3c68c3a
(cherry picked from commit e38910c0)
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 58870404
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment