LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [BUG] scsi: qla4xxx: possible double lock in qla4_82xx_wr_32()
@ 2021-08-11 13:44 Tuo Li
  0 siblings, 0 replies; only message in thread
From: Tuo Li @ 2021-08-11 13:44 UTC (permalink / raw)
  To: njavali, mrangankar, GR-QLogic-Storage-Upstream, jejb, martin.petersen
  Cc: linux-scsi, linux-kernel, baijiaju1990

Hello,

Our static analysis tool finds a possible double lock in ql4_nx.c in 
Linux 5.14.0-rc3:

ha->hw_lock is first locked in:
418:    write_lock_irqsave(&ha->hw_lock, flags);

And then the function qla4_82xx_crb_win_lock() is called:
419:    qla4_82xx_crb_win_lock(ha);

In this function, the function qla4_82xx_rd_32() is called:
389:    done = qla4_82xx_rd_32(ha, QLA82XX_PCIE_REG(PCIE_SEM7_LOCK));

In this function, ha->hw_lock is locked again:
442:    write_lock_irqsave(&ha->hw_lock, flags);

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

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

Best wishes,
Tuo Li

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-11 13:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 13:44 [BUG] scsi: qla4xxx: possible double lock in qla4_82xx_wr_32() Tuo Li

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