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-next>] [day] [month] [year] [list]
Message-ID: <857df2fa-7d60-bff3-70f2-642201888977@gmail.com>
Date:   Wed, 15 Sep 2021 17:12:40 +0800
From:   Jia-Ju Bai <baijiaju1990@...il.com>
To:     mike.marciniszyn@...nelisnetworks.com,
        dennis.dalessandro@...nelisnetworks.com, dledford@...hat.com,
        jgg@...pe.ca
Cc:     linux-rdma@...r.kernel.org,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: [BUG] infiniband: hw: hfi1: possible ABBA deadlock in pio_wait() and
 sc_disable()

Hello,

My static analysis tool reports a possible ABBA deadlock in the hfi1 
driver in Linux 5.10:

sc_disable()
   write_seqlock(&sc->waitlock); --> Line 956 (Lock A)
   hfi1_qp_wakeup()
     spin_lock_irqsave(&qp->s_lock, flags); --> Line 441 (Lock B)

pio_wait()
   spin_lock_irqsave(&qp->s_lock, flags); --> Line 939 (Lock B)
   write_seqlock(&sc->waitlock); --> Line 941 (Lock A)

When sc_disable() and pio_wait() 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