[PATCH] Affinity of call_usermode_helper fix
From: Rusty Russell (rusty_at_rustcorp.com.au)
Date: 01/30/04
- Previous message: Rusty Russell: "[PATCH 2/2] Module removal to use kthread"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: akpm@osdl.org Date: Fri, 30 Jan 2004 15:52:34 +1100
Vatsa and I noticed this.
call_usermode_helper uses keventd, so the process created inherits its
cpus_allowed mask. Unset it.
Name: call_usermode_helper Without Being Bound To A Specific CPU
Author: Rusty Russell
Status: Booted on 2.6.2-rc2-bk2
D: call_usermode_helper uses keventd, so the process created inherits
D: its cpus_allowed mask. Unset it.
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .6951-linux-2.6.2-rc2-bk2/kernel/kmod.c .6951-linux-2.6.2-rc2-bk2.updated/kernel/kmod.c
--- .6951-linux-2.6.2-rc2-bk2/kernel/kmod.c 2004-01-10 13:59:39.000000000 +1100
+++ .6951-linux-2.6.2-rc2-bk2.updated/kernel/kmod.c 2004-01-29 16:08:31.000000000 +1100
@@ -168,6 +168,8 @@ static int ____call_usermodehelper(void
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
+ /* We can run anywhere, unlike our parent keventd(). */
+ set_cpus_allowed(current, CPU_MASK_ALL);
retval = -EPERM;
if (current->fs->root)
retval = execve(sub_info->path, sub_info->argv,sub_info->envp);
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - 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/
- Previous message: Rusty Russell: "[PATCH 2/2] Module removal to use kthread"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]