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] [thread-next>] [day] [month] [year] [list]
Message-ID: <6520c574-e1c6-49e0-8bb1-760032faaf7a@linux.alibaba.com>
Date: Wed, 17 Apr 2024 16:00:01 +0800
From: Guangguan Wang <guangguan.wang@...ux.alibaba.com>
To: Zhengchao Shao <shaozhengchao@...wei.com>, linux-s390@...r.kernel.org,
 netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, pabeni@...hat.com
Cc: wenjia@...ux.ibm.com, jaka@...ux.ibm.com, alibuda@...ux.alibaba.com,
 tonylu@...ux.alibaba.com, guwen@...ux.alibaba.com, weiyongjun1@...wei.com,
 yuehaibing@...wei.com, tangchengchang@...wei.com
Subject: Re: [PATCH net] net/smc: fix potential sleeping issue in
 smc_switch_conns



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@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ