[linux-pm] [PATCH 2/2] Fix console handling during suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 23 Jun 2006, Linus Torvalds wrote:

> Ok, here.
> 
> This simple patch is nothing but cleanups, cleanups, cleanups.

>  - "suspend_prepare()" is called for every device (with the semaphore 
>    held, you are _not_ allowed to try to unlink yourself in the prepare 
>    function)

There should be a big fat warning about this somewhere, maybe added to the 
documentation.  It's quite possible for dpm_list_sem to be acquired while 
holding a device's lock; since the suspend_prepare() method is called 
while holding dpm_list_sem it therefore mustn't do _anything_ to acquire 
any device's lock.  That includes plenty of other actions in addition to 
unregistering the device.

In particular, it may complicate synchronization between suspend_prepare() 
and the rest of the driver.

Alan Stern



[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux