Bug 14229 - tty change breaks resume from hibernation on MSI Wind U100
Summary: tty change breaks resume from hibernation on MSI Wind U100
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_other
Depends on:
Blocks: 14230
  Show dependency tree
Reported: 2009-09-25 22:20 UTC by Rafael J. Wysocki
Modified: 2009-09-27 21:59 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.31-git-94a8d5caba
Regression: Yes
Bisected commit-id:


Description Rafael J. Wysocki 2009-09-25 22:20:11 UTC
Resume from hibernation doesn't work any more on my MSI Wind U100 with the current mainline.  It hangs forever after devices have been resumed, apparently during the console switch back to the terminal where s2disk was started (the problem seems to be only reproducible with s2disk).

Bisection turned up the following commit as the one that introduced the regression:

commit b50989dc444599c8b21edc23536fc305f4e9b7d5
Author: Alan Cox <alan@linux.intel.com>
Date:   Sat Sep 19 13:13:22 2009 -0700

    tty: make the kref destructor occur asynchronously

    We want to be able to sleep in the destructor for USB at least. It isn't a
    hot path so just pushing it to a work queue doesn't really cause any

    Signed-off-by: Alan Cox <alan@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

I'm not sure about the actual root cause at the moment, but it appears to be a race condition of some sort, as I'm able to reproduce this on a faster machine.
Comment 1 Rafael J. Wysocki 2009-09-27 16:01:57 UTC
Handled-By : From: Dave Young <hidave.darkstar@gmail.com>
Patch : http://patchwork.kernel.org/patch/50321/
Comment 2 Rafael J. Wysocki 2009-09-27 16:02:51 UTC
Not-Handled-By : From: Dave Young <hidave.darkstar@gmail.com>
Handled-By : Dave Young <hidave.darkstar@gmail.com>
Comment 3 Linus Torvalds 2009-09-27 21:44:12 UTC
Committed (with fixes) as f278a2f7bbc2239f479eaf63d0b3ae573b1d746c.

The reason it causes problems for suspend and hibernate is that the X server will try to do a VT_ACTIVATE ioctl on the tty, but it gets rejected with EIO due to the hangup handling having been delayed due to the asynchronous workqueue thing.

Please verify that current git (I'll release -rc1 soon) works for everybody.

Note You need to log in before you can comment on or make changes to this bug.