Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933390Ab3CLSmP (ORCPT ); Tue, 12 Mar 2013 14:42:15 -0400 Received: from mail-vc0-f180.google.com ([209.85.220.180]:52616 "EHLO mail-vc0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933370Ab3CLSmO (ORCPT ); Tue, 12 Mar 2013 14:42:14 -0400 MIME-Version: 1.0 In-Reply-To: <20130312182210.GA15862@redhat.com> References: <1363058712.4534.12.camel@pasglop> <20130312182210.GA15862@redhat.com> Date: Tue, 12 Mar 2013 11:42:13 -0700 X-Google-Sender-Auth: -UVa7tOgJtFCgHI6lkw9tv0vRtk Message-ID: Subject: Re: Regression with orderly_poweroff() From: Linus Torvalds To: Oleg Nesterov Cc: Lucas De Marchi , Benjamin Herrenschmidt , Linux Kernel Mailing List , Paul Mackerras , david@gibson.dropbear.id.au, Kees Cook , Serge Hallyn , "Rafael J. Wysocki" , Andrew Morton , Feng Hong , Lucas De Marchi Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 918 Lines: 20 On Tue, Mar 12, 2013 at 11:22 AM, Oleg Nesterov wrote: > > And how this can help? The real problem is not GFP_KERNEL. > call_usermodehelper_exec(UMH_WAIT_EXEC) will block. Well, it's probably a starting point. You need to do the argument handling atomically, because you cannot delay that in a workqueue (the arguments will be long gone by the time the workqueue starts up). So I think the fix is a combination of your and Lucas' code, where you first do the setup atomically (copying the arguments and allocating that space with GFP_ATOMIC) and then you do a workqueue to actually do the real work of the usermode helper thing. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/