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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Feb 2012 12:46:52 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Jens Axboe <axboe@...nel.dk>, "Rafael J. Wysocki" <rjw@...k.pl>,
	Linux-pm mailing list <linux-pm@...r.kernel.org>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Bug in disk event polling

(cc'ing Rafael)

Hello, Alan.

On Fri, Feb 10, 2012 at 03:31:20PM -0500, Alan Stern wrote:
> Don't ask me why this hasn't shown up earlier...  There's a big fat bug 
> in the implementation of disk event polling.
> 
> The polling is done using the system_nrt_wq work queue, which isn't
> freezable.  As a result, polling continues while the system is
> preparing for suspend or hibernation.
> 
> Obviously I/O to suspended devices doesn't work well.  Somewhat less 
> obviously, error recovery for the failed I/O attempts can interfere 
> with normal system resume.

Hmmm.... I see.  Yeah, that can be a problem.

> You can see this for yourself easily enough by suspending or
> hibernating while a USB flash drive is plugged in.  You don't even need
> to go through the full suspend procedure; the first two stages are
> enough (echo devices >/sys/power/pm_test).  Check the system log
> afterward; most likely you'll find the flash drive got errors and had
> to be unregistered and re-enumerated.

Do you happen to have log of such failure?  Polilng failure itself
shouldn't lead to such failure mode.

> I have verified that changing all occurrences of system_nrt_wq in 
> block/genhd.c to system_freezable_wq fixes the bug.  However this may 
> not be the way you want to solve it; you may prefer to have a freezable 
> non-reentrant work queue.

Please feel free to send out a patch to fix the issue. :)

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ