aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2009-02-13 20:07:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-21 17:17:18 -0500
commit403f307576396f3362fbb65af190885b6036c72c (patch)
treed3737ebe960d65152b7ee119b8b5a7ad2d59e09b /drivers/net/smc91x.c
parentb090f9fa53d51c8a33370071de9e391919ee1fa7 (diff)
PM: Fix suspend_console and resume_console to use only one semaphore
This fixes a race where a thread acquires the console while the console is suspended, and the console is resumed before this thread releases it. In this case, the secondary console semaphore would be left locked, and the primary semaphore would be released twice. This in turn would cause the console switch on suspend or resume to hang forever. Note that suspend_console does not actually lock the console for clients that use acquire_console_sem, it only locks it for clients that use try_acquire_console_sem. If we change suspend_console to fully lock the console, then the kernel may deadlock on suspend. One client of try_acquire_console_sem is acquire_console_semaphore_for_printk, which uses it to prevent printk from using the console while it is suspended. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Len Brown <lenb@kernel.org> Cc: Greg KH <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/smc91x.c')
0 files changed, 0 insertions, 0 deletions