Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933538Ab3CLUh1 (ORCPT ); Tue, 12 Mar 2013 16:37:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47314 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932514Ab3CLUh0 (ORCPT ); Tue, 12 Mar 2013 16:37:26 -0400 Date: Tue, 12 Mar 2013 21:35:14 +0100 From: Oleg Nesterov To: Linus Torvalds Cc: Andi Kleen , 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 Subject: Re: Regression with orderly_poweroff() Message-ID: <20130312203514.GA23488@redhat.com> References: <1363058712.4534.12.camel@pasglop> <20130312182210.GA15862@redhat.com> <20130312191118.GA17439@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 992 Lines: 26 On 03/12, Linus Torvalds wrote: > > So yeah, I guess > everything could just go into a workqueue. OK, I'll try to make the patch tomorrow. Should be trivial but it is not clear how we should pass "bool force" without allocating the work_struct which would be nice to avoid. And I am a bit worried about UMH_WAIT_EXEC from system_wq. Should be fine afaics... And. It seems there is another problem. argv_split(poweroff_cmd) can obviously race with proc_dostring() ? If nothing else, argv_split() doesn't check 'argc' when it does "*argvp++ = t". And this is not __orderly_poweroff-specific. This looks simple... and probably we can even simplify argv_split/argv_free. We can simply kstrndup() the original string once and do s/space/0/. Oleg. -- 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/