]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
misc: fastrpc: return -EPIPE to invocations on device removal
authorRichard Acayan <mailingradian@gmail.com>
Tue, 23 May 2023 15:25:49 +0000 (16:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:29:00 +0000 (10:29 +0200)
commitbf1d0b84dfd2c8481df30e77f651d4152a511618
tree7b54cf621feef0835687fb5b7cddd22b78f72dac
parentd5f1838815290bb170c5d204f4e33dc467c6a133
misc: fastrpc: return -EPIPE to invocations on device removal

commit b6a062853ddf6b4f653af2d8b75ba45bb9a036ad upstream.

The return value is initialized as -1, or -EPERM. The completion of an
invocation implies that the return value is set appropriately, but
"Permission denied" does not accurately describe the outcome of the
invocation. Set the invocation's return value to a more appropriate
"Broken pipe", as the cleanup breaks the driver's connection with rpmsg.

Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method")
Cc: stable <stable@kernel.org>
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230523152550.438363-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c