From: kenny <nek.in.cn@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: torvalds@osdl.org
Subject: [Patch] kernel: bug fixing for kernel/kmod.c
Date: Wed, 2 Aug 2006 01:20:24 +0800 [thread overview]
Message-ID: <20060801172024.GA24303@kenny> (raw)
I think there is a bug in kmod.c. In __call_usermodehelper(), when
kernel_thread(wait_for_helper, ...) return success, since
wait_for_helper() might call complete() at any time, the sub_info should
not be used any more.
the following patch is made in 2.6.17.7
--- kmod.c 2006-07-25 11:36:01.000000000 +0800
+++ /tmp/kmod.c 2006-08-02 01:01:42.702054000 +0800
@@ -198,6 +198,7 @@ static void __call_usermodehelper(void *
{
struct subprocess_info *sub_info = data;
pid_t pid;
+ int wait = sub_info->wait;
/* CLONE_VFORK: wait until the usermode helper has execve'd
* successfully We need the data structures to stay around
@@ -212,7 +213,7 @@ static void __call_usermodehelper(void *
if (pid < 0) {
sub_info->retval = pid;
complete(sub_info->complete);
- } else if (!sub_info->wait)
+ } else if (!wait)
complete(sub_info->complete);
}
--
next reply other threads:[~2006-08-01 17:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-01 17:20 kenny [this message]
2006-08-01 18:15 ` [Patch] kernel: bug fixing for kernel/kmod.c Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2006-08-02 14:30 Kenneth Lee
2006-08-02 14:42 ` Kenneth Lee
2006-08-03 1:52 ` Matt Helsley
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=20060801172024.GA24303@kenny \
--to=nek.in.cn@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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