From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751543Ab2GYS4r (ORCPT ); Wed, 25 Jul 2012 14:56:47 -0400 Received: from ogre.sisk.pl ([193.178.161.156]:56926 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090Ab2GYS4p (ORCPT ); Wed, 25 Jul 2012 14:56:45 -0400 From: "Rafael J. Wysocki" To: Linus Torvalds Subject: Re: [RFC PATCH 00/13] firmware loader: introduce cache/uncache firmware Date: Wed, 25 Jul 2012 21:02:31 +0200 User-Agent: KMail/1.13.6 (Linux/3.5.0+; KDE/4.6.0; x86_64; ; ) Cc: Ming Lei , "Greg Kroah-Hartman" , Borislav Petkov , linux-kernel@vger.kernel.org, Matthew Garrett , "linux-usb" , Alan Stern , Oliver Neukum References: <1343149213-10160-1-git-send-email-ming.lei@canonical.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201207252102.31830.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, July 25, 2012, Linus Torvalds wrote: > On Wed, Jul 25, 2012 at 5:35 AM, Ming Lei wrote: > > > > The below patch should fix the problem above. > > Actually, I think we could make this even simpler. > > There's nothing wrong with saying "user mode is enabled" *just* before > we unthaw things, if we also simply guarantee that there is no > sleeping lock or similar that we might get caught on (causing a > deadlock or other untimely waking) before we've actually thawed > everything. > > So *if* the only problem wrt the USB hub code comes from this area, > then I think the solution might be as simple as just moving the > "usermodehelper_enable()" up a few lines, with a comment. Something > like the *untested* and whitespace-damaged thing below.. > > Rafael? Yes, we can do this I think. > Who has one of those isight things and has seen the warning to test? That I can't answer, sorry. Rafael > --- > diff --git a/kernel/power/process.c b/kernel/power/process.c > index 19db29f67558..5bf50e488196 100644 > --- a/kernel/power/process.c > +++ b/kernel/power/process.c > @@ -181,6 +181,12 @@ void thaw_processes(void) > pm_freezing = false; > pm_nosig_freezing = false; > > + /* > + * User mode helper are available again (or will be, > + * modulo scheduling) > + */ > + usermodehelper_enable(); > + > oom_killer_enable(); > > printk("Restarting tasks ... "); > @@ -193,8 +199,6 @@ void thaw_processes(void) > } while_each_thread(g, p); > read_unlock(&tasklist_lock); > > - usermodehelper_enable(); > - > schedule(); > printk("done.\n"); > } > >