Double-lock bug in drivers/isdn/hardware/mISDN/hfcmulti.c

From: Iago Abal <hidden>
Date: 2018-05-04 07:27:51

Hi,

There is a potential double-lock sequence starting from hfc_remove_pci().

Forward trace:

  1. hfc_remove_pci()  LOCKS spin_lock_irqsave(&HFClock, flags) at 5284
  2. hfc_remove_pci()  calls release_card(card)                 at 5285
  3. release_card()    calls release_port(hc, hc->chan[ch].dch) at 4674
  4. release_port()    calls plxsd_checksync(hc, 1)             at 4595
  5. plxsd_checksync() calls hfcmulti_resync(hc, ..., rm)       at 1036 or 1044
  6. hfcmulti_resync() LOCKS spin_lock_irqsave(&HFClock, flags) at 933

NB: Bug found by static analysis thanks to EBA
(https://github.com/IagoAbal/eba).

Hope it helps,

-- iago
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help