diff options
author | Jan Engelhardt <jengelh@linux01.gwdg.de> | 2007-05-08 03:28:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:07 -0400 |
commit | b73a7e76c1eeaa770a41554698917c3c45686a07 (patch) | |
tree | 70c9016ca24bc06d1781ace007ce557bbe3d3cf8 | |
parent | 6672f76a5a1878d42264c1deba8f1ab52b4618d9 (diff) |
Fix kevent's childs priority greediness
Fix kevent's childs priority greediness. Such tasks were always scheduled
at nice level -5 and, at that time, udev stole us the CPU time with -5.
Already posted at http://lkml.org/lkml/2005/1/10/85
[akpm@linux-foundation.org: add comment]
Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/kmod.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c index 11c584cd16b3..49cc4b9c1a8d 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -165,6 +165,12 @@ static int ____call_usermodehelper(void *data) | |||
165 | /* We can run anywhere, unlike our parent keventd(). */ | 165 | /* We can run anywhere, unlike our parent keventd(). */ |
166 | set_cpus_allowed(current, CPU_MASK_ALL); | 166 | set_cpus_allowed(current, CPU_MASK_ALL); |
167 | 167 | ||
168 | /* | ||
169 | * Our parent is keventd, which runs with elevated scheduling priority. | ||
170 | * Avoid propagating that into the userspace child. | ||
171 | */ | ||
172 | set_user_nice(current, 0); | ||
173 | |||
168 | retval = -EPERM; | 174 | retval = -EPERM; |
169 | if (current->fs->root) | 175 | if (current->fs->root) |
170 | retval = kernel_execve(sub_info->path, | 176 | retval = kernel_execve(sub_info->path, |