lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 21 Mar 2023 09:45:38 +0000
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Richard Acayan <mailingradian@...il.com>,
        Amol Maheshwari <amahesh@....qualcomm.com>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Thierry Escande <thierry.escande@...aro.org>,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] misc: fastrpc: return -EPIPE to invocations on device
 removal



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@...il.com>
> ---

LGTM, thanks for fixing this,

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.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);
>   }
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ