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:	Wed, 12 Dec 2012 15:20:25 +0000
From:	"Lin, Mengdong" <mengdong.lin@...el.com>
To:	Borislav Petkov <bp@...en8.de>, "Rafael J. Wysocki" <rjw@...k.pl>
CC:	Takashi Iwai <tiwai@...e.de>, lkml <linux-kernel@...r.kernel.org>,
	Linux PM list <linux-pm@...r.kernel.org>
Subject: RE: pci_pm_runtime_suspend(): azx_runtime_suspend+0x0/0x50
 [snd_hda_intel] returns -11

> -----Original Message-----
> From: Borislav Petkov [mailto:bp@...en8.de]
> Sent: Wednesday, December 12, 2012 6:52 PM


> > It looks like azx_runtime_suspend() is new in 3.7 and it returns
> > -EAGAIN to indicate that it actually can't be suspended (if my
> > understanding the code is correct).  However, it shouldn't do that,
> > because that causes the runtime PM core to repeat the attempts.  It
> > rather should implement a .runtime_idle() callback returning an error code
> instead.


Hi Boris and Rafael,

I remember I didn't observed repetitive attempts to suspend if the azx_runtime_suspend() returns -EAGAIN.

Because the HD-A driver does not implement the runtime idle callback, pci_pm_runtime_idle() will call pm_runtime_suspend(dev),
and then __pm_runtime_suspend(dev, 0) will be called. 
Finally the code will go to 'fail' of rpm_suspend: 
...
fail:
	__update_runtime_status(dev, RPM_ACTIVE);
	dev->power.deferred_resume = false;
	wake_up_all(&dev->power.wait_queue);

	if (retval == -EAGAIN || retval == -EBUSY) {
		dev->power.runtime_error = 0;
		...
		if ((rpmflags & RPM_AUTO) &&
		    pm_runtime_autosuspend_expiration(dev) != 0)      ... but since the rpmflags is 0, the code will not go to 'repeat' but to 'out'.
			goto repeat;
	} else {
		pm_runtime_cancel_pending(dev);
	}
	goto out;

Please correct me if I misunderstand something.

Thanks
Mengdong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ