diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 6 | ||||
-rw-r--r-- | kernel/sched.c | 6 | ||||
-rw-r--r-- | kernel/softirq.c | 20 |
3 files changed, 26 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index b373322ca497..9bd7b65ee418 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1534,6 +1534,12 @@ asmlinkage long sys_unshare(unsigned long unshare_flags) | |||
1534 | 1534 | ||
1535 | check_unshare_flags(&unshare_flags); | 1535 | check_unshare_flags(&unshare_flags); |
1536 | 1536 | ||
1537 | /* Return -EINVAL for all unsupported flags */ | ||
1538 | err = -EINVAL; | ||
1539 | if (unshare_flags & ~(CLONE_THREAD|CLONE_FS|CLONE_NEWNS|CLONE_SIGHAND| | ||
1540 | CLONE_VM|CLONE_FILES|CLONE_SYSVSEM)) | ||
1541 | goto bad_unshare_out; | ||
1542 | |||
1537 | if ((err = unshare_thread(unshare_flags))) | 1543 | if ((err = unshare_thread(unshare_flags))) |
1538 | goto bad_unshare_out; | 1544 | goto bad_unshare_out; |
1539 | if ((err = unshare_fs(unshare_flags, &new_fs))) | 1545 | if ((err = unshare_fs(unshare_flags, &new_fs))) |
diff --git a/kernel/sched.c b/kernel/sched.c index 4d46e90f59c3..6b6e0d70eb30 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -707,12 +707,6 @@ static int recalc_task_prio(task_t *p, unsigned long long now) | |||
707 | DEF_TIMESLICE); | 707 | DEF_TIMESLICE); |
708 | } else { | 708 | } else { |
709 | /* | 709 | /* |
710 | * The lower the sleep avg a task has the more | ||
711 | * rapidly it will rise with sleep time. | ||
712 | */ | ||
713 | sleep_time *= (MAX_BONUS - CURRENT_BONUS(p)) ? : 1; | ||
714 | |||
715 | /* | ||
716 | * Tasks waking from uninterruptible sleep are | 710 | * Tasks waking from uninterruptible sleep are |
717 | * limited in their sleep_avg rise as they | 711 | * limited in their sleep_avg rise as they |
718 | * are likely to be waiting on I/O | 712 | * are likely to be waiting on I/O |
diff --git a/kernel/softirq.c b/kernel/softirq.c index ad3295cdded5..ec8fed42a86f 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/cpu.h> | 16 | #include <linux/cpu.h> |
17 | #include <linux/kthread.h> | 17 | #include <linux/kthread.h> |
18 | #include <linux/rcupdate.h> | 18 | #include <linux/rcupdate.h> |
19 | #include <linux/smp.h> | ||
19 | 20 | ||
20 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
21 | /* | 22 | /* |
@@ -495,3 +496,22 @@ __init int spawn_ksoftirqd(void) | |||
495 | register_cpu_notifier(&cpu_nfb); | 496 | register_cpu_notifier(&cpu_nfb); |
496 | return 0; | 497 | return 0; |
497 | } | 498 | } |
499 | |||
500 | #ifdef CONFIG_SMP | ||
501 | /* | ||
502 | * Call a function on all processors | ||
503 | */ | ||
504 | int on_each_cpu(void (*func) (void *info), void *info, int retry, int wait) | ||
505 | { | ||
506 | int ret = 0; | ||
507 | |||
508 | preempt_disable(); | ||
509 | ret = smp_call_function(func, info, retry, wait); | ||
510 | local_irq_disable(); | ||
511 | func(info); | ||
512 | local_irq_enable(); | ||
513 | preempt_enable(); | ||
514 | return ret; | ||
515 | } | ||
516 | EXPORT_SYMBOL(on_each_cpu); | ||
517 | #endif | ||