public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] vt6655: A possible sleep-in-atomic bug in vt6655_suspend
@ 2017-10-09  1:10 Jia-Ju Bai
  2017-10-09  5:43 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Jia-Ju Bai @ 2017-10-09  1:10 UTC (permalink / raw)
  To: forest, gregkh, simon, tvboxspy, scott, dan.a.cashman,
	golubev.mikhail, bhelgaas
  Cc: devel, Linux Kernel Mailing List, linux-pci

According to device_main.c, the driver may sleep under a spinlock,
and the function call path is:
vt6655_suspend (acquire the spinlock)
   pci_set_power_state
     __pci_start_power_transition (drivers/pci/pci.c)
       msleep --> may sleep

A possible fix is to replace msleep with mdelay in 
__pci_start_power_transition in drivers/pci/pci.c.

This bug is found by my static analysis tool and my code review.


Thanks,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-09  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09  1:10 [BUG] vt6655: A possible sleep-in-atomic bug in vt6655_suspend Jia-Ju Bai
2017-10-09  5:43 ` Greg KH
2017-10-09  7:56   ` Jia-Ju Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox