* [BUG] gma500: Possible sleep-in-atomic bugs in gma_resume_pci
@ 2017-10-08 12:31 Jia-Ju Bai
0 siblings, 0 replies; only message in thread
From: Jia-Ju Bai @ 2017-10-08 12:31 UTC (permalink / raw)
To: patrik.r.jakobsson, airlied, bhelgaas; +Cc: dri-devel, linux-kernel, linux-pci
The driver may sleep under a spinlock, and the function call paths are:
gma_power_begin (acquire the spinlock)
gma_resume_pci
pci_set_power_state
__pci_start_power_transition (drivers/pci/pci.c)
msleep --> may sleep
gma_power_begin (acquire the spinlock)
gma_resume_pci
pci_enable_device
pci_enable_device_flags (drivers/pci/pci.c)
do_pci_enable_device
pci_set_power_state
__pci_start_power_transition
msleep --> may sleep
A possible fix is to replace msleep with mdelay in
__pci_start_power_transition in drivers/pci/pci.c.
These bugs are found by my static analysis tool and my code review.
Thanks,
Jia-Ju Bai
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-08 12:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-08 12:31 [BUG] gma500: Possible sleep-in-atomic bugs in gma_resume_pci 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
all inboxes | Powered by JetHome®