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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131218110807.GA3808@htj.dyndns.org>
Date:	Wed, 18 Dec 2013 06:08:07 -0500
From:	Tejun Heo <tj@...nel.org>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Jens Axboe <axboe@...nel.dk>, tomaz.solc@...lix.org,
	aaron.lu@...el.com, linux-kernel@...r.kernel.org,
	Oleg Nesterov <oleg@...hat.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Fengguang Wu <fengguang.wu@...el.com>
Subject: Re: [PATCH v2] libata, freezer: avoid block device removal while
 system is frozen

Hey, Rafael.

On Wed, Dec 18, 2013 at 02:04:35AM +0100, Rafael J. Wysocki wrote:
> > +	 * The core suspend/resume path is fundamentally broken due to
> > +	 * freezable kthreads and workqueue and may deadlock if a block
> > +	 * device gets removed while resume is in progress.  I don't know
> > +	 * what the solution is short of removing freezable kthreads and
> > +	 * workqueues altogether.
> 
> Do you mean the block device core or the SCSI core or something else?  It would
> be good to clarify that here to avoid confusion.

Will clarify.

> > +	 * The following is an ugly hack to avoid kicking off device
> > +	 * removal while freezer is active.  This is a joke but does avoid
> > +	 * this particular deadlock scenario.
> > +	 *
> > +	 * https://bugzilla.kernel.org/show_bug.cgi?id=62801
> > +	 * http://marc.info/?l=linux-kernel&m=138695698516487
> > +	 */
> > +	while (pm_freezing)
> > +		msleep(100);
> 
> Why is the sleep time 100 ms exactly?  And why does it matter?

Just a number I pulled out of my ass.

> For example, what would change if it were 10 ms?

Yeah, 10ms is my favorite human-visible polling duration too (because
it's slow enough not to cause overhead issues while fast enough to be
mostly unnoticeable to humans).  This one doesn't really matter
because the operation's latency isn't something which the user would
wait for actively.  That said, yeah, why not, I'll change it to 10ms.

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