public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Andi Kleen <ak@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Chris Wright <chrisw@sous-sol.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	Christoph Hellwig <hch@infradead.org>,
	Paul Mackerras <paulus@samba.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Joel Becker <joel.becker@oracle.com>,
	Tony Luck <tony.luck@intel.com>,
	Kay Sievers <kay.sievers@vrfy.org>,
	Srivatsa Vaddagiri <vatsa@in.ibm.com>,
	Oleg Nesterov <oleg@tv-sign.ru>,
	David Howells <dhowells@redhat.com>
Subject: Re: [patch 7/7] tidy up usermode helper waiting a bit
Date: Fri, 11 May 2007 13:01:38 -0700	[thread overview]
Message-ID: <4644CBA2.7000302@goop.org> (raw)
In-Reply-To: <1178912735.28304.4.camel@johannes.berg>

Johannes Berg wrote:
> [/me wonders why he was CC'ed]
>   

Because I knew you'd ask a good question ;)  No, I looked through the
recent changes on the files I changes and guessed at likely-looking
names.  But come to think of it, cc:ing completely random people is not
a bad way of getting some extra review cycles you mightn't otherwise get...


>>  	/* CLONE_VFORK: wait until the usermode helper has execve'd
>>  	 * successfully We need the data structures to stay around
>>  	 * until that is done.  */
>> -	if (wait)
>> +	if (wait == UMH_WAIT_PROC)
>>  		pid = kernel_thread(wait_for_helper, sub_info,
>>  				    CLONE_FS | CLONE_FILES | SIGCHLD);
>>  	else
>>  		pid = kernel_thread(____call_usermodehelper, sub_info,
>>  				    CLONE_VFORK | SIGCHLD);
>>     
>
> Isn't that a change in behaviour? Previously it said
> 	if (wait)
>  <=>	if (wait != 0)
>  <=>	if (wait != UMH_WAIT_EXEC)
> or am I missing something?
>   

Hm, you're right, it is a change in behaviour.  Yep, and a bug, since
its expecting wait_for_helper() to free the info in the UMH_NO_WAIT case.

---
 kernel/kmod.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

===================================================================
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -243,7 +243,7 @@ static void __call_usermodehelper(struct
 	/* CLONE_VFORK: wait until the usermode helper has execve'd
 	 * successfully We need the data structures to stay around
 	 * until that is done.  */
-	if (wait == UMH_WAIT_PROC)
+	if (wait == UMH_WAIT_PROC || wait == UMH_NO_WAIT)
 		pid = kernel_thread(wait_for_helper, sub_info,
 				    CLONE_FS | CLONE_FILES | SIGCHLD);
 	else

Thanks,
    J

      reply	other threads:[~2007-05-11 20:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10 23:57 [patch 0/7] A series of cleanup patches Jeremy Fitzhardinge
2007-05-10 23:57 ` [patch 1/7] i386: move common parts of smp into their own file Jeremy Fitzhardinge
2007-05-10 23:57 ` [patch 2/7] use elfnote.h to generate vsyscall notes Jeremy Fitzhardinge
2007-05-11 19:47   ` Roland McGrath
2007-05-11 19:48     ` Jeremy Fitzhardinge
2007-05-11 20:06     ` Jeremy Fitzhardinge
2007-05-10 23:57 ` [patch 3/7] add kstrndup Jeremy Fitzhardinge
2007-05-11 20:52   ` René Scharfe
2007-05-11 21:18     ` Jeremy Fitzhardinge
2007-05-10 23:57 ` [patch 4/7] add argv_split() Jeremy Fitzhardinge
2007-05-11 22:57   ` Randy Dunlap
2007-05-10 23:57 ` [patch 5/7] split usermodehelper setup from execution Jeremy Fitzhardinge
2007-05-10 23:57 ` [patch 6/7] Add common orderly_poweroff() Jeremy Fitzhardinge
2007-05-11 22:56   ` Randy Dunlap
2007-07-16 19:52   ` Andrew Morton
2007-07-16 19:59     ` Jeremy Fitzhardinge
2007-07-16 21:31     ` David Miller
2007-07-16 21:42       ` Andrew Morton
2007-05-10 23:57 ` [patch 7/7] tidy up usermode helper waiting a bit Jeremy Fitzhardinge
2007-05-11 19:45   ` Johannes Berg
2007-05-11 20:01     ` Jeremy Fitzhardinge [this message]

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=4644CBA2.7000302@goop.org \
    --to=jeremy@goop.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=chrisw@sous-sol.org \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=joel.becker@oracle.com \
    --cc=johannes@sipsolutions.net \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=paulus@samba.org \
    --cc=ralf@linux-mips.org \
    --cc=randy.dunlap@oracle.com \
    --cc=tony.luck@intel.com \
    --cc=vatsa@in.ibm.com \
    /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