Re: [patch] hotplug fixes

From: David Woodhouse (dwmw2@infradead.org)
Date: Sun Dec 10 2000 - 07:44:32 EST


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?

-- 
dwmw2

- 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/



This archive was generated by hypermail 2b29 : Fri Dec 15 2000 - 21:00:19 EST