From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932635Ab3CLWAf (ORCPT ); Tue, 12 Mar 2013 18:00:35 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59862 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755636Ab3CLWA3 (ORCPT ); Tue, 12 Mar 2013 18:00:29 -0400 Date: Tue, 12 Mar 2013 15:00:27 -0700 From: Andrew Morton To: Lucas De Marchi Cc: Oleg Nesterov , lucas.de.marchi@gmail.com, David Howells , James Morris , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/7] usermodehelper: Export _exec() and _setup() functions Message-Id: <20130312150027.51fed974151929f755b51b54@linux-foundation.org> In-Reply-To: References: <1363049291-946-1-git-send-email-lucas.demarchi@profusion.mobi> <1363049291-946-2-git-send-email-lucas.demarchi@profusion.mobi> <20130312133148.106946def5edb288aafdfb51@linux-foundation.org> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Mar 2013 18:52:54 -0300 Lucas De Marchi wrote: > On Tue, Mar 12, 2013 at 5:31 PM, Andrew Morton > wrote: > > On Mon, 11 Mar 2013 21:48:06 -0300 Lucas De Marchi wrote: > > > >> call_usermodehelper_setup() + call_usermodehelper_exec() need to be > >> called instead of call_usermodehelper_fns() when the cleanup function > >> needs to be called even when an ENOMEM error occurs. In this case using > >> call_usermodehelper_fns() the user can't distinguish if the cleanup > >> function was called or not. > > > > call_usermodehelper_exec() was exported to modules but > > call_usermodehelper_setup() was not? > > > > That was a mistake. We need both functions exported. Should I send and > updated patch or a fixup? From: Andrew Morton Subject: usermodehelper-export-_exec-and-_setup-functions-fix export call_usermodehelper_setup() to modules Cc: "Rafael J. Wysocki" Cc: Al Viro Cc: David Howells Cc: James Morris Cc: Lucas De Marchi Cc: Oleg Nesterov Cc: Tejun Heo Signed-off-by: Andrew Morton --- kernel/kmod.c | 1 + 1 file changed, 1 insertion(+) diff -puN kernel/kmod.c~usermodehelper-export-_exec-and-_setup-functions-fix kernel/kmod.c --- a/kernel/kmod.c~usermodehelper-export-_exec-and-_setup-functions-fix +++ a/kernel/kmod.c @@ -541,6 +541,7 @@ struct subprocess_info *call_usermodehel out: return sub_info; } +EXPORT_SYMBOL(call_usermodehelper_setup); /** * call_usermodehelper_exec - start a usermode application _