[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50244213-5d12-4919-837d-66364f1ae8b5@linux.ibm.com>
Date: Wed, 14 Feb 2024 16:09:05 +0100
From: Wenjia Zhang <wenjia@...ux.ibm.com>
To: Dmitry Antipov <dmantipov@...dex.ru>, Ursula Braun <ubraun@...ux.ibm.com>
Cc: Karsten Graul <kgraul@...ux.ibm.com>, Jan Karcher <jaka@...ux.ibm.com>,
"David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
lvc-project@...uxtesting.org
Subject: Re: [PATCH] net: smc: fix spurious error message from
__sock_release()
On 12.02.24 15:34, Dmitry Antipov wrote:
> Commit 67f562e3e147 ("net/smc: transfer fasync_list in case of fallback")
> leaves the socket's fasync list pointer within a container socket as well.
> When the latter is destroyed, '__sock_release()' warns about its non-empty
> fasync list, which is a dangling pointer to previously freed fasync list
> of an underlying TCP socket. Fix this spurious warning by nullifying
> fasync list of a container socket.
>
> Fixes: 67f562e3e147 ("net/smc: transfer fasync_list in case of fallback")
> Signed-off-by: Dmitry Antipov <dmantipov@...dex.ru>
I see my antwort is too late...
But I still want to send out my comments:
- please check current MAINTAINERS to put all of the related person in
your recipient list.
- It looks reasonable to me. I'm curious how you got the warning. By
using ULP, right?
Thanks,
Wenjia
> ---
> net/smc/af_smc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
> index a2cb30af46cb..0f53a5c6fd9d 100644
> --- a/net/smc/af_smc.c
> +++ b/net/smc/af_smc.c
> @@ -924,6 +924,7 @@ static int smc_switch_to_fallback(struct smc_sock *smc, int reason_code)
> smc->clcsock->file->private_data = smc->clcsock;
> smc->clcsock->wq.fasync_list =
> smc->sk.sk_socket->wq.fasync_list;
> + smc->sk.sk_socket->wq.fasync_list = NULL;
>
> /* There might be some wait entries remaining
> * in smc sk->sk_wq and they should be woken up
Powered by blists - more mailing lists