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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <e468fdcb-f47f-e01a-da65-68da79020165@gmail.com>
Date:   Tue, 8 Feb 2022 19:23:01 +0800
From:   Jia-Ju Bai <baijiaju1990@...il.com>
To:     njavali@...vell.com, mrangankar@...vell.com,
        GR-QLogic-Storage-Upstream@...vell.com, jejb@...ux.ibm.com,
        martin.petersen@...cle.com
Cc:     linux-scsi@...r.kernel.org,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: [BUG] scsi: qedi: possible ABBA deadlock in qedi_process_tmf_resp()
 and qedi_process_cmd_cleanup_resp()

Hello,

My static analysis tool reports a possible ABBA deadlock in the qedi 
driver in Linux 5.16:

qedi_process_tmf_resp()
   spin_lock(&session->back_lock); --> Line 201 (Lock A)
   spin_lock(&qedi_conn->tmf_work_lock); --> Line 230 (Lock B)

qedi_process_cmd_cleanup_resp()
   spin_lock_bh(&qedi_conn->tmf_work_lock); --> Line 752 (Lock B)
   spin_lock_bh(&conn->session->back_lock); --> Line 784 (Lock A)

When qedi_process_tmf_resp() and qedi_process_cmd_cleanup_resp() are 
concurrently executed, the deadlock can occur.

I am not quite sure whether this possible deadlock is real and how to 
fix it if it is real.
Any feedback would be appreciated, thanks :)

Reported-by: TOTE Robot <oslab@...nghua.edu.cn>


Best wishes,
Jia-Ju Bai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ