Re: [PATCH] pci: Fix a possible sleep-in-atomic bug in pci_set_power_state

2017-10-11 Thread Dan Carpenter
On Mon, Oct 09, 2017 at 12:15:17PM -0500, Bjorn Helgaas wrote: > I assume it's easy to produce an actual failure here? Why haven't we > seen bug reports about this? The bug was detected with static analysis. You have to enable a debug feature in the .config if you want sleeping with spinlock

Re: [PATCH] pci: Fix a possible sleep-in-atomic bug in pci_set_power_state

2017-10-09 Thread Rafael J. Wysocki
On Mon, Oct 9, 2017 at 7:18 PM, Bjorn Helgaas wrote: > On Mon, Oct 09, 2017 at 12:15:17PM -0500, Bjorn Helgaas wrote: >> [+cc Rafael, linux-pm] >> >> Hi Jia-Ju, >> >> On Mon, Oct 09, 2017 at 04:16:20PM +0800, Jia-Ju Bai wrote: >> > The drivers vt6655 and gma500 call

Re: [PATCH] pci: Fix a possible sleep-in-atomic bug in pci_set_power_state

2017-10-09 Thread Bjorn Helgaas
On Mon, Oct 09, 2017 at 12:15:17PM -0500, Bjorn Helgaas wrote: > [+cc Rafael, linux-pm] > > Hi Jia-Ju, > > On Mon, Oct 09, 2017 at 04:16:20PM +0800, Jia-Ju Bai wrote: > > The drivers vt6655 and gma500 call pci_set_power_state under a spinlock, > > which may sleep. > > The function call paths

Re: [PATCH] pci: Fix a possible sleep-in-atomic bug in pci_set_power_state

2017-10-09 Thread Bjorn Helgaas
[+cc Rafael, linux-pm] Hi Jia-Ju, On Mon, Oct 09, 2017 at 04:16:20PM +0800, Jia-Ju Bai wrote: > The drivers vt6655 and gma500 call pci_set_power_state under a spinlock, > which may sleep. > The function call paths are: > gma_power_begin (acquire the spinlock) (drivers/gpu/drm/gma500/power.c) >

Re: [PATCH] pci: Fix a possible sleep-in-atomic bug in pci_set_power_state

2017-10-09 Thread Jia-Ju Bai
Oh, sorry, I will send the patches for each driver. Thanks, Jia-Ju Bai On 2017/10/9 16:17, Greg KH wrote: On Mon, Oct 09, 2017 at 04:16:20PM +0800, Jia-Ju Bai wrote: The drivers vt6655 and gma500 call pci_set_power_state under a spinlock, which may sleep. The function call paths are:

Re: [PATCH] pci: Fix a possible sleep-in-atomic bug in pci_set_power_state

2017-10-09 Thread Greg KH
On Mon, Oct 09, 2017 at 04:16:20PM +0800, Jia-Ju Bai wrote: > The drivers vt6655 and gma500 call pci_set_power_state under a spinlock, > which may sleep. > The function call paths are: > gma_power_begin (acquire the spinlock) (drivers/gpu/drm/gma500/power.c) > gma_resume_pci >