From: Rusty Russell <rusty@rustcorp.com.au>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Affinity of call_usermode_helper fix
Date: Fri, 30 Jan 2004 15:52:34 +1100 [thread overview]
Message-ID: <20040130055513.2B6282C0CA@lists.samba.org> (raw)
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.
reply other threads:[~2004-01-30 5:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040130055513.2B6282C0CA@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®