lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 Aug 2008 16:04:46 -0700
From:	Jesse Barnes <jbarnes@...tuousgeek.org>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	David Miller <davem@...emloft.net>, arekm@...en.pl,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: BUG: scheduling while atomic: ip/23212/0x00000102

On Monday, August 04, 2008 3:10 pm Rafael J. Wysocki wrote:
> > -	pci_read_config_word(tp->pdev,
> > -			     pm + PCI_PM_CTRL,
> > -			     &power_control);
> > -	power_control |= PCI_PM_CTRL_PME_STATUS;
> > -	power_control &= ~(PCI_PM_CTRL_STATE_MASK);
> >  	switch (state) {
> >  	case PCI_D0:
> > -		power_control |= 0;
> > -		pci_write_config_word(tp->pdev,
> > -				      pm + PCI_PM_CTRL,
> > -				      power_control);
> > -		udelay(100);	/* Delay after power state change */
> > +		pci_enable_wake(tp->pdev, state, false);
> > +		pci_set_power_state(tp->pdev, PCI_D0);
>
> Still, I don't think drivers should access the standard PCI PM registers
> directly, so perhaps there should be a version of pci_set_power_state()
> using udelay() instead of msleep() or we can just replace the msleep()
> in pci_set_power_state() with udelay()?

I think we should get rid of the open coded PCI PM state management, since 
otherwise platform related bugs like the Intel PCIe PM quirk that sets 
pci_pm_d3_delay to 120ms would have to be duplicated around the tree.

That said, waiting for 120ms with a busy wait seems a bit absurd if we can 
avoid it.  Either we need to find a way to make drivers only change states 
(which can be very slow) in non-atomic context or we'll need to add a busy 
wait variant of the power state call...

Jesse
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ