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:   Fri, 17 Dec 2021 19:39:54 +1100
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Yang Shen <shenyang39@...wei.com>
Cc:     davem@...emloft.net, linux-kernel@...r.kernel.org,
        linux-crypto@...r.kernel.org, wangzhou1@...ilicon.com,
        liulongfang@...wei.com
Subject: Re: [PATCH] crypto: hisilicon/qm - fix deadlock for remove driver

On Sat, Dec 11, 2021 at 04:56:55PM +0800, Yang Shen wrote:
> When remove the driver and executing the task occur at the same time,
> the following deadlock will be triggered:
> 
> Chain exists of:
>     sva_lock --> uacce_mutex --> &qm->qps_lock
>     Possible unsafe locking scenario:
> 		CPU0                    CPU1
> 		----                    ----
> 	lock(&qm->qps_lock);
> 					lock(uacce_mutex);
> 					lock(&qm->qps_lock);
> 	lock(sva_lock);
> 
> And the lock 'qps_lock' is used to protect qp. Therefore, it's reasonable
> cycle is to continue until the qp memory is released. So move the release
> lock infront of 'uacce_remove'.
> 
> Signed-off-by: Yang Shen <shenyang39@...wei.com>
> ---
>  drivers/crypto/hisilicon/qm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ