From: Neil Horman <nhorman@tuxdriver.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
jmoskovc@redhat.com, mingo@redhat.com, drbd-dev@lists.linbit.com,
benh@kernel.crashing.org, t.sailer@alumni.ethz.ch,
abelay@mit.edu, gregkh@suse.de, spock@gentoo.org,
viro@zeniv.linux.org.uk, neilb@suse.de, mfasheh@suse.com,
menage@google.com, shemminger@linux-foundation.org,
takedakn@nttdata.co.jp
Subject: Re: [PATCH 1/2] exec: allow core_pipe recursion check to look for a value of 1 rather than 0 (v2)
Date: Sun, 31 Jan 2010 10:41:35 -0500 [thread overview]
Message-ID: <20100131154135.GA1950@localhost.localdomain> (raw)
In-Reply-To: <20100131144606.GA13402@redhat.com>
On Sun, Jan 31, 2010 at 03:46:06PM +0100, Oleg Nesterov wrote:
> On 01/29, Neil Horman wrote:
> >
> > Add init function to usermodehelper
> >
> > Convert call_usermodehelper_cleanup to usermodehelper_fns and allow it to assign
> > both an init function and a cleanup function.
>
> Can't apply this patch, I guess -mm tree has other changes which
> this patch depends on. However afaics this series is fine, just
> a couple of nits.
>
Yeah, this will only apply to latest -mm
> > @@ -154,7 +155,9 @@ struct subprocess_info {
> > enum umh_wait wait;
> > int retval;
> > struct file *stdin;
> > - void (*cleanup)(char **argv, char **envp);
> > + int (*init)(void *data);
> > + void (*cleanup)(char **argv, char **envp, void *data);
> > + void *data;
>
> OK, we add *data. But why this patch changes the prototype of ->cleanup() ?
> OTOH, I completely agree, it should be changed, and it should lose the
> ugly argv/envp arguments.
>
> Since we add subprocess_info->data ptr, I think both ->init and ->cleanup
> funcs should have the single arg, "subprocess_info *info". argv, envp, data
> they all can be accessed via *info.
>
Yeah, I can do that.
> Also. It is not clear why this patch changes call_usermodehelper_setup()
> to set info->data. Unless the caller uses call_usermodehelper_setinit()
> or call_usermodehelper_setcleanup() info->data is not used. Perhaps
> it is better to have a single helper which takes (init, cleanup, data)
> args.
>
> What do you think?
>
Yeah, that seems reasonable, Honestly, I'm a bit confused as to why there are
set* helpers in the first place, we could just eliminate them entirely, since
callers can set all three independently with call_usermodehelper_fns. Anywho,
I'll clean that up some more.
> In any case, I believe you should fix the subjects ;)
>
Not sure whats wrong with the subjects, although I guess I am doing a good bit
more than just fixing that at this point :). I'll expand them.
Give me a few days, and I'll repost.
Neil
> Oleg.
>
>
next prev parent reply other threads:[~2010-01-31 15:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-21 20:08 [PATCH] exec: allow core_pipe recursion check to look for a value of 1 rather than 0 Neil Horman
2010-01-21 21:29 ` Thomas Sailer
2010-01-25 21:13 ` Neil Horman
2010-01-26 23:53 ` Andrew Morton
2010-01-29 15:10 ` [PATCH 0/2] exec: allow core_pipe recursion check to look for a value of 1 rather than 0 (v2) Neil Horman
2010-01-29 15:13 ` [PATCH 1/2] " Neil Horman
2010-01-31 14:46 ` Oleg Nesterov
2010-01-31 15:41 ` Neil Horman [this message]
2010-01-29 15:14 ` [PATCH 2/2] " Neil Horman
2010-01-31 15:50 ` Oleg Nesterov
2010-01-31 17:41 ` Neil Horman
2010-02-01 10:29 ` Oleg Nesterov
2010-02-01 10:39 ` Oleg Nesterov
2010-02-01 13:16 ` Neil Horman
2010-02-01 14:18 ` Oleg Nesterov
2010-02-02 19:19 ` [PATCH 0/2] exec: refactor how call_usermodehelper works, and update the sense of the core_pipe recursion check (v3) Neil Horman
2010-02-02 19:20 ` [PATCH 1/2] " Neil Horman
2010-02-03 20:09 ` Oleg Nesterov
2010-02-02 19:21 ` [PATCH 2/2] " Neil Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100131154135.GA1950@localhost.localdomain \
--to=nhorman@tuxdriver.com \
--cc=abelay@mit.edu \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=drbd-dev@lists.linbit.com \
--cc=gregkh@suse.de \
--cc=jmoskovc@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=mfasheh@suse.com \
--cc=mingo@redhat.com \
--cc=neilb@suse.de \
--cc=oleg@redhat.com \
--cc=shemminger@linux-foundation.org \
--cc=spock@gentoo.org \
--cc=t.sailer@alumni.ethz.ch \
--cc=takedakn@nttdata.co.jp \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox