From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Richard Acayan <mailingradian@gmail.com>,
Amol Maheshwari <amahesh@qti.qualcomm.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Thierry Escande <thierry.escande@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] misc: fastrpc: return -EPIPE to invocations on device removal
Date: Tue, 21 Mar 2023 09:45:38 +0000 [thread overview]
Message-ID: <6601cd6f-5fab-a6a7-2f1e-d3604f729efd@linaro.org> (raw)
In-Reply-To: <20230130222716.7016-2-mailingradian@gmail.com>
On 30/01/2023 22:27, Richard Acayan wrote:
> 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")
> Signed-off-by: Richard Acayan <mailingradian@gmail.com>
> ---
LGTM, thanks for fixing this,
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
--srini
> drivers/misc/fastrpc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> index 7ccaca1b7cb8..2334a4fd5869 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -2337,8 +2337,10 @@ static void fastrpc_notify_users(struct fastrpc_user *user)
> struct fastrpc_invoke_ctx *ctx;
>
> spin_lock(&user->lock);
> - list_for_each_entry(ctx, &user->pending, node)
> + list_for_each_entry(ctx, &user->pending, node) {
> + ctx->retval = -EPIPE;
> complete(&ctx->work);
> + }
> spin_unlock(&user->lock);
> }
>
next prev parent reply other threads:[~2023-03-21 9:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 22:27 [PATCH 0/2] misc: fastrpc: Fixes for issues in userspace Richard Acayan
2023-01-30 22:27 ` [PATCH 1/2] misc: fastrpc: return -EPIPE to invocations on device removal Richard Acayan
2023-03-21 9:45 ` Srinivas Kandagatla [this message]
2023-01-30 22:27 ` [PATCH 2/2] misc: fastrpc: reject new invocations during " Richard Acayan
2023-03-21 9:45 ` Srinivas Kandagatla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6601cd6f-5fab-a6a7-2f1e-d3604f729efd@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=amahesh@qti.qualcomm.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailingradian@gmail.com \
--cc=thierry.escande@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®