From: Andrew Morton <andrewm@uow.edu.au>
To: David Woodhouse <dwmw2@infradead.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
linux-usb-devel@lists.sourceforge.net,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [patch] hotplug fixes
Date: Mon, 11 Dec 2000 00:14:34 +1100 [thread overview]
Message-ID: <3A3381BA.E93E025E@uow.edu.au> (raw)
In-Reply-To: <3A337727.FDED61E3@uow.edu.au> <Pine.LNX.4.30.0012101238120.25294-100000@imladris.demon.co.uk>
David Woodhouse wrote:
>
> On Sun, 10 Dec 2000, Andrew Morton wrote:
>
> > - PCMCIA layer calls call_usermodehelper from within keventd. But
> > call_usermodehelper blocks until keventd has run the helper! Duh.
> >
> > This patch special-cases the situation where keventd is calling
> > call_usermodehelper().
>
> + if (current_is_keventd()) {
> + /* We can't wait on keventd! */
> + __call_usermodehelper(&sub_info);
> + } else {
> + schedule_task(&tqs);
> + down(&sem); /* Wait until keventd has started the subprocess */
> + }
>
> That's sick. Do we have to? The PCMCIA coded obviously wants an async
> call_usermodehelper() or it wouldn't have been using schedule_task()
> for it in the first place, would it? Can't we pass an 'int async' arg to
> call_usermodehelper() instead of doing it this way?
Well, call_usermodehelper here _is_ async. We're just waiting for
acknowledgement that the subprocess has safely taken copies of
our local data (argv, envp, etc). And waiting to pick up the
return value from execve().
We can't call schedule_task() and then just return from
call_usermodehelper(), unless we take kmalloced copies of
everything (including the tq_struct) and then free them
after the vfork.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-12-10 13:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-10 12:29 [patch] hotplug fixes Andrew Morton
2000-12-10 12:44 ` David Woodhouse
2000-12-10 13:14 ` Andrew Morton [this message]
2000-12-10 16:47 ` Linus Torvalds
2000-12-10 17:01 ` David Woodhouse
2000-12-10 18:21 ` [linux-usb-devel] " David Brownell
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=3A3381BA.E93E025E@uow.edu.au \
--to=andrewm@uow.edu.au \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=torvalds@transmeta.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