From: Guangguan Wang <guangguan.wang@linux.alibaba.com>
To: Zhengchao Shao <shaozhengchao@huawei.com>,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: wenjia@linux.ibm.com, jaka@linux.ibm.com,
alibuda@linux.alibaba.com, tonylu@linux.alibaba.com,
guwen@linux.alibaba.com, weiyongjun1@huawei.com,
yuehaibing@huawei.com, tangchengchang@huawei.com
Subject: Re: [PATCH net] net/smc: fix potential sleeping issue in smc_switch_conns
Date: Wed, 17 Apr 2024 16:00:01 +0800 [thread overview]
Message-ID: <6520c574-e1c6-49e0-8bb1-760032faaf7a@linux.alibaba.com> (raw)
In-Reply-To: <20240413035150.3338977-1-shaozhengchao@huawei.com>
On 2024/4/13 11:51, Zhengchao Shao wrote:
> Potential sleeping issue exists in the following processes:
> smc_switch_conns
> spin_lock_bh(&conn->send_lock)
> smc_switch_link_and_count
> smcr_link_put
> __smcr_link_clear
> smc_lgr_put
> __smc_lgr_free
> smc_lgr_free_bufs
> __smc_lgr_free_bufs
> smc_buf_free
> smcr_buf_free
> smcr_buf_unmap_link
> smc_ib_put_memory_region
> ib_dereg_mr
> ib_dereg_mr_user
> mr->device->ops.dereg_mr
> If scheduling exists when the IB driver implements .dereg_mr hook
> function, the bug "scheduling while atomic" will occur. For example,
> cxgb4 and efa driver. Use mutex lock instead of spin lock to fix it.
>
> Fixes: 20c9398d3309 ("net/smc: Resolve the race between SMC-R link access and clear")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
> net/smc/af_smc.c | 2 +-
> net/smc/smc.h | 2 +-
> net/smc/smc_cdc.c | 14 +++++++-------
> net/smc/smc_core.c | 8 ++++----
> net/smc/smc_tx.c | 8 ++++----
> 5 files changed, 17 insertions(+), 17 deletions(-)
>
Hi Zhengchao,
I doubt whether this bug really exists, as efa supports SRD QP while SMC-R relies on RC QP,
cxgb4 is a IWARP adaptor while SMC-R relies on ROCE adaptor.
Thanks,
Guangguan Wang
next prev parent reply other threads:[~2024-04-17 8:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-13 3:51 [PATCH net] net/smc: fix potential sleeping issue in smc_switch_conns Zhengchao Shao
2024-04-15 17:37 ` Wenjia Zhang
2024-04-16 12:06 ` Paolo Abeni
2024-04-17 7:32 ` Guangguan Wang
2024-04-17 15:17 ` Wenjia Zhang
2024-04-17 8:00 ` Guangguan Wang [this message]
2024-04-17 8:29 ` shaozhengchao
2024-04-17 15:23 ` Wenjia Zhang
2024-04-18 1:48 ` shaozhengchao
2024-04-18 7:50 ` Wenjia Zhang
2024-04-18 11:01 ` shaozhengchao
2024-04-18 11:57 ` Wenjia Zhang
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=6520c574-e1c6-49e0-8bb1-760032faaf7a@linux.alibaba.com \
--to=guangguan.wang@linux.alibaba.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=jaka@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shaozhengchao@huawei.com \
--cc=tangchengchang@huawei.com \
--cc=tonylu@linux.alibaba.com \
--cc=weiyongjun1@huawei.com \
--cc=wenjia@linux.ibm.com \
--cc=yuehaibing@huawei.com \
/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