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]
Date:   Fri, 6 Oct 2023 16:28:35 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Chengfeng Ye <dg573847474@...il.com>
Cc:     3chas3@...il.com, davem@...emloft.net, horms@...nel.org,
        linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] atm: solos-pci: Fix potential deadlock on
 &cli_queue_lock

On Thu,  5 Oct 2023 07:48:58 +0000 Chengfeng Ye wrote:
> As &card->cli_queue_lock is acquired under softirq context along the

you say softirq here

> following call chain from solos_bh(), other acquisition of the same
> lock inside process context should disable at least bh to avoid double
> lock.
> 
> <deadlock #1>
> console_show()
> --> spin_lock(&card->cli_queue_lock)  
> <interrupt>
>    --> solos_bh()
>    --> spin_lock(&card->cli_queue_lock)  
> 
> This flaw was found by an experimental static analysis tool I am
> developing for irq-related deadlock.
> 
> To prevent the potential deadlock, the patch uses spin_lock_irqsave()
> on the card->cli_queue_lock under process context code consistently
> to prevent the possible deadlock scenario.

and irqsave here. I think you're right that it's just softirq (== bh)
that may deadlock, so no need to take the irqsave() version in process
context.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ