lkml.org 
[lkml]   [2007]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch 7/7] tidy up usermode helper waiting a bit
Johannes Berg wrote:
> [/me wonders why he was CC'ed]
>

Because I knew you'd ask a good question ;) No, I looked through the
recent changes on the files I changes and guessed at likely-looking
names. But come to think of it, cc:ing completely random people is not
a bad way of getting some extra review cycles you mightn't otherwise get...


>> /* CLONE_VFORK: wait until the usermode helper has execve'd
>> * successfully We need the data structures to stay around
>> * until that is done. */
>> - if (wait)
>> + if (wait == UMH_WAIT_PROC)
>> pid = kernel_thread(wait_for_helper, sub_info,
>> CLONE_FS | CLONE_FILES | SIGCHLD);
>> else
>> pid = kernel_thread(____call_usermodehelper, sub_info,
>> CLONE_VFORK | SIGCHLD);
>>
>
> Isn't that a change in behaviour? Previously it said
> if (wait)
> <=> if (wait != 0)
> <=> if (wait != UMH_WAIT_EXEC)
> or am I missing something?
>

Hm, you're right, it is a change in behaviour. Yep, and a bug, since
its expecting wait_for_helper() to free the info in the UMH_NO_WAIT case.

---
kernel/kmod.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

===================================================================
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -243,7 +243,7 @@ static void __call_usermodehelper(struct
/* CLONE_VFORK: wait until the usermode helper has execve'd
* successfully We need the data structures to stay around
* until that is done. */
- if (wait == UMH_WAIT_PROC)
+ if (wait == UMH_WAIT_PROC || wait == UMH_NO_WAIT)
pid = kernel_thread(wait_for_helper, sub_info,
CLONE_FS | CLONE_FILES | SIGCHLD);
else
Thanks,
J
-
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: 2007-05-11 22:05    [W:0.039 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site