From: Kenneth Lee <kenlee@dg.gov.cn>
To: linux-kernel@vger.kernel.org
Subject: Re: [Patch] kernel: bug fixing for kernel/kmod.c
Date: Wed, 2 Aug 2006 22:42:59 +0800 [thread overview]
Message-ID: <20060802144259.GA5827@kenny> (raw)
In-Reply-To: <20060802143046.GA5645@kenny>
Mr. Rusty Russell's mail server reject my mail. Anybody can tell me
where I should deliver the patch?
On Wed, Aug 02, 2006 at 10:30:46PM +0800, Kenneth Lee wrote:
> Subject: [Patch] kernel: bug fixing for kernel/kmod.c
>
> 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.
>
> Normally wait_for_helper() take a long time to finish, you may not get
> problem for most of the case. But if you remove /sbin/modprobe, it may
> become easier for you to get a oop in khelper.
>
> the following patch is made in 2.6.17.7
>
> --- linux-2.6.17.7/kernel/kmod.c.orig 2006-08-02 22:13:21.805902750
> +0800
> +++ linux-2.6.17.7/kernel/kmod.c 2006-08-02 22:15:36.946348500
> +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 prev parent reply other threads:[~2006-08-02 14:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-02 14:30 [Patch] kernel: bug fixing for kernel/kmod.c Kenneth Lee
2006-08-02 14:42 ` Kenneth Lee [this message]
2006-08-03 1:52 ` Matt Helsley
-- strict thread matches above, loose matches on Subject: below --
2006-08-01 17:20 kenny
2006-08-01 18:15 ` Steven Rostedt
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=20060802144259.GA5827@kenny \
--to=kenlee@dg.gov.cn \
--cc=linux-kernel@vger.kernel.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