archive mirror
 help / color / mirror / Atom feed
From: Jia-Ju Bai <>
Cc:, linux-kernel <>
Subject: [BUG] infiniband: hw: hfi1: possible ABBA deadlock in pio_wait() and sc_disable()
Date: Wed, 15 Sep 2021 17:12:40 +0800	[thread overview]
Message-ID: <> (raw)


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

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

   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 <>

Best wishes,
Jia-Ju Bai

             reply	other threads:[~2021-09-15  9:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  9:12 Jia-Ju Bai [this message]
2021-09-23 19:06 ` Marciniszyn, Mike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \
    --subject='Re: [BUG] infiniband: hw: hfi1: possible ABBA deadlock in pio_wait() and sc_disable()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).