Skip to content

Commit

Permalink
USB: update to Documentation
Browse files Browse the repository at this point in the history
this mentions a new deadlock due to advanced power management.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Aug 14, 2008
1 parent 230ffc7 commit f0fa746
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Documentation/usb/power-management.txt
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,12 @@ post_reset; the USB core guarantees that this is true of internal
suspend/resume events as well.

If a driver wants to block all suspend/resume calls during some
critical section, it can simply acquire udev->pm_mutex.
critical section, it can simply acquire udev->pm_mutex. Note that
calls to resume may be triggered indirectly. Block IO due to memory
allocations can make the vm subsystem resume a device. Thus while
holding this lock you must not allocate memory with GFP_KERNEL or
GFP_NOFS.

Alternatively, if the critical section might call some of the
usb_autopm_* routines, the driver can avoid deadlock by doing:

Expand Down

0 comments on commit f0fa746

Please sign in to comment.