[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130225180802.GA6160@redhat.com>
Date: Mon, 25 Feb 2013 19:08:02 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Lucas De Marchi <lucas.demarchi@...fusion.mobi>
Cc: linux-kernel@...r.kernel.org, David Howells <dhowells@...hat.com>,
James Morris <james.l.morris@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] usermodehelper: Fix -ENOMEM return logic
On 02/25, Lucas De Marchi wrote:
>
> Yep. The current interface is confusing. I agree that a separate
> setup() + exec() would make more sense.
Great,
> > @@ -98,8 +98,14 @@ static int call_modprobe(char *module_na
> > argv[3] = module_name; /* check free_modprobe_argv() */
> > argv[4] = NULL;
> >
> > - return call_usermodehelper_fns(modprobe_path, argv, envp,
> > - wait | UMH_KILLABLE, NULL, free_modprobe_argv, NULL);
> > + info = call_usermodehelper_setup(...); // better name, please...
> > + if (!info)
> > + goto free_modname;
> > +
> > + return call_usermodehelper_exec(info, wait);
>
> I'd say that in these cases the "call_" prefix has no meaning, and we
> could just use a "usermodehelper" as the namespace.
Oh, I agree with any naming.
So, I hope you will send v2. I'd suggest to split the fixes. 1/3
should create/export the new helpers, and 2-3 fix should call_modprobe()
and call_usermodehelper_keys(). But this is up to you, I won't insist.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists