Re: [PATCH v3 2/7] usermodehelper: Export _exec() and _setup()functions

From: Andrew Morton
Date: Tue Mar 12 2013 - 18:00:42 EST


On Tue, 12 Mar 2013 18:52:54 -0300 Lucas De Marchi <lucas.demarchi@xxxxxxxxxxxxxx> wrote:

> On Tue, Mar 12, 2013 at 5:31 PM, Andrew Morton
> <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> > On Mon, 11 Mar 2013 21:48:06 -0300 Lucas De Marchi <lucas.demarchi@xxxxxxxxxxxxxx> 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 <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: usermodehelper-export-_exec-and-_setup-functions-fix

export call_usermodehelper_setup() to modules

Cc: "Rafael J. Wysocki" <rjw@xxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: James Morris <james.l.morris@xxxxxxxxxx>
Cc: Lucas De Marchi <lucas.demarchi@xxxxxxxxxxxxxx>
Cc: Oleg Nesterov <oleg@xxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

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
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/