lkml.org 
[lkml]   [2004]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] call_usermodehelper needs to wait longer
During my testing of call_usermodehelper, I noticed that 
if it is called from a workqueue function, it does really wait
(when asked to) for the usermodehelper to exit.

Patch below should fix it. It has been tested against 2.6.4-rc2-mm1
on a 4-way x86 SMP box.

--- kmod.c.org 2004-03-09 18:52:19.000000000 +0530
+++ kmod.c 2004-03-09 18:52:38.000000000 +0530
@@ -258,10 +258,13 @@
if (current_is_keventd()) {
/* We can't wait on keventd! */
__call_usermodehelper(&sub_info);
- } else {
+ if (!wait)
+ goto out;
+ } else
schedule_work(&work);
- wait_for_completion(&done);
- }
+
+ wait_for_completion(&done);
+
out:
return sub_info.retval;
}


--


Thanks and Regards,
Srivatsa Vaddagiri,
Linux Technology Center,
IBM Software Labs,
Bangalore, INDIA - 560017
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.057 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site