diff options
| author | James Morris <jmorris@namei.org> | 2011-06-30 04:43:56 -0400 |
|---|---|---|
| committer | James Morris <jmorris@namei.org> | 2011-06-30 04:43:56 -0400 |
| commit | 5b944a71a192977c1c018bbcfa0c52dca48e2368 (patch) | |
| tree | 9f234c4a93bb28890ad086c846d2bf0b35f7f7ae /kernel | |
| parent | 0e4ae0e0dec634b2ae53ac57d14141b140467dbe (diff) | |
| parent | c017d0d1351f916c0ced3f358afc491fdcf490b4 (diff) | |
Merge branch 'linus' into next
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/exit.c | 31 | ||||
| -rw-r--r-- | kernel/gcov/Kconfig | 3 | ||||
| -rw-r--r-- | kernel/irq/manage.c | 3 | ||||
| -rw-r--r-- | kernel/kmod.c | 16 | ||||
| -rw-r--r-- | kernel/power/user.c | 4 | ||||
| -rw-r--r-- | kernel/rcutree.c | 398 | ||||
| -rw-r--r-- | kernel/rcutree.h | 12 | ||||
| -rw-r--r-- | kernel/rcutree_plugin.h | 419 | ||||
| -rw-r--r-- | kernel/rcutree_trace.c | 32 | ||||
| -rw-r--r-- | kernel/sched_rt.c | 6 | ||||
| -rw-r--r-- | kernel/signal.c | 2 | ||||
| -rw-r--r-- | kernel/smp.c | 5 | ||||
| -rw-r--r-- | kernel/softirq.c | 2 | ||||
| -rw-r--r-- | kernel/taskstats.c | 15 | ||||
| -rw-r--r-- | kernel/time/alarmtimer.c | 158 | ||||
| -rw-r--r-- | kernel/time/clocksource.c | 24 | ||||
| -rw-r--r-- | kernel/trace/ftrace.c | 9 | ||||
| -rw-r--r-- | kernel/trace/trace_kprobe.c | 8 | ||||
| -rw-r--r-- | kernel/trace/trace_printk.c | 5 |
19 files changed, 628 insertions, 524 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 20a406471525..f2b321bae440 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
| @@ -561,29 +561,28 @@ void exit_files(struct task_struct *tsk) | |||
| 561 | 561 | ||
| 562 | #ifdef CONFIG_MM_OWNER | 562 | #ifdef CONFIG_MM_OWNER |
| 563 | /* | 563 | /* |
| 564 | * Task p is exiting and it owned mm, lets find a new owner for it | 564 | * A task is exiting. If it owned this mm, find a new owner for the mm. |
| 565 | */ | 565 | */ |
| 566 | static inline int | ||
| 567 | mm_need_new_owner(struct mm_struct *mm, struct task_struct *p) | ||
| 568 | { | ||
| 569 | /* | ||
| 570 | * If there are other users of the mm and the owner (us) is exiting | ||
| 571 | * we need to find a new owner to take on the responsibility. | ||
| 572 | */ | ||
| 573 | if (atomic_read(&mm->mm_users) <= 1) | ||
| 574 | return 0; | ||
| 575 | if (mm->owner != p) | ||
| 576 | return 0; | ||
| 577 | return 1; | ||
| 578 | } | ||
| 579 | |||
| 580 | void mm_update_next_owner(struct mm_struct *mm) | 566 | void mm_update_next_owner(struct mm_struct *mm) |
| 581 | { | 567 | { |
| 582 | struct task_struct *c, *g, *p = current; | 568 | struct task_struct *c, *g, *p = current; |
| 583 | 569 | ||
| 584 | retry: | 570 | retry: |
| 585 | if (!mm_need_new_owner(mm, p)) | 571 | /* |
| 572 | * If the exiting or execing task is not the owner, it's | ||
| 573 | * someone else's problem. | ||
| 574 | */ | ||
| 575 | if (mm->owner != p) | ||
| 586 | return; | 576 | return; |
| 577 | /* | ||
| 578 | * The current owner is exiting/execing and there are no other | ||
| 579 | * candidates. Do not leave the mm pointing to a possibly | ||
| 580 | * freed task structure. | ||
| 581 | */ | ||
| 582 | if (atomic_read(&mm->mm_users) <= 1) { | ||
| 583 | mm->owner = NULL; | ||
| 584 | return; | ||
| 585 | } | ||
| 587 | 586 | ||
| 588 | read_lock(&tasklist_lock); | 587 | read_lock(&tasklist_lock); |
| 589 | /* | 588 | /* |
diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig index b8cadf70b1fb..5bf924d80b5c 100644 --- a/kernel/gcov/Kconfig +++ b/kernel/gcov/Kconfig | |||
| @@ -2,7 +2,8 @@ menu "GCOV-based kernel profiling" | |||
| 2 | 2 | ||
| 3 | config GCOV_KERNEL | 3 | config GCOV_KERNEL |
| 4 | bool "Enable gcov-based kernel profiling" | 4 | bool "Enable gcov-based kernel profiling" |
| 5 | depends on DEBUG_FS && CONSTRUCTORS | 5 | depends on DEBUG_FS |
| 6 | select CONSTRUCTORS | ||
| 6 | default n | 7 | default n |
| 7 | ---help--- | 8 | ---help--- |
| 8 | This option enables gcov-based code profiling (e.g. for code coverage | 9 | This option enables gcov-based code profiling (e.g. for code coverage |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index d64bafb1afd0..0a7840aeb0fb 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
| @@ -491,6 +491,9 @@ int irq_set_irq_wake(unsigned int irq, unsigned int on) | |||
| 491 | struct irq_desc *desc = irq_get_desc_buslock(irq, &flags); | 491 | struct irq_desc *desc = irq_get_desc_buslock(irq, &flags); |
| 492 | int ret = 0; | 492 | int ret = 0; |
| 493 | 493 | ||
| 494 | if (!desc) | ||
| 495 | return -EINVAL; | ||
| 496 | |||
| 494 | /* wakeup-capable irqs can be shared between drivers that | 497 | /* wakeup-capable irqs can be shared between drivers that |
| 495 | * don't need to have the same sleep mode behaviors. | 498 | * don't need to have the same sleep mode behaviors. |
| 496 | */ | 499 | */ |
diff --git a/kernel/kmod.c b/kernel/kmod.c index ad6a81c58b44..47613dfb7b28 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
| @@ -156,12 +156,6 @@ static int ____call_usermodehelper(void *data) | |||
| 156 | */ | 156 | */ |
| 157 | set_user_nice(current, 0); | 157 | set_user_nice(current, 0); |
| 158 | 158 | ||
| 159 | if (sub_info->init) { | ||
| 160 | retval = sub_info->init(sub_info); | ||
| 161 | if (retval) | ||
| 162 | goto fail; | ||
| 163 | } | ||
| 164 | |||
| 165 | retval = -ENOMEM; | 159 | retval = -ENOMEM; |
| 166 | new = prepare_kernel_cred(current); | 160 | new = prepare_kernel_cred(current); |
| 167 | if (!new) | 161 | if (!new) |
| @@ -173,6 +167,14 @@ static int ____call_usermodehelper(void *data) | |||
| 173 | new->cap_inheritable); | 167 | new->cap_inheritable); |
| 174 | spin_unlock(&umh_sysctl_lock); | 168 | spin_unlock(&umh_sysctl_lock); |
| 175 | 169 | ||
| 170 | if (sub_info->init) { | ||
| 171 | retval = sub_info->init(sub_info, new); | ||
| 172 | if (retval) { | ||
| 173 | abort_creds(new); | ||
| 174 | goto fail; | ||
| 175 | } | ||
| 176 | } | ||
| 177 | |||
| 176 | commit_creds(new); | 178 | commit_creds(new); |
| 177 | 179 | ||
| 178 | retval = kernel_execve(sub_info->path, | 180 | retval = kernel_execve(sub_info->path, |
| @@ -388,7 +390,7 @@ EXPORT_SYMBOL(call_usermodehelper_setup); | |||
| 388 | * context in which call_usermodehelper_exec is called. | 390 | * context in which call_usermodehelper_exec is called. |
| 389 | */ | 391 | */ |
| 390 | void call_usermodehelper_setfns(struct subprocess_info *info, | 392 | void call_usermodehelper_setfns(struct subprocess_info *info, |
| 391 | int (*init)(struct subprocess_info *info), | 393 | int (*init)(struct subprocess_info *info, struct cred *new), |
| 392 | void (*cleanup)(struct subprocess_info *info), | 394 | void (*cleanup)(struct subprocess_info *info), |
| 393 | void *data) | 395 | void *data) |
| 394 | { | 396 | { |
diff --git a/kernel/power/user.c b/kernel/power/user.c index 7d02d33be699..42ddbc6f0de6 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
| @@ -113,8 +113,10 @@ static int snapshot_open(struct inode *inode, struct file *filp) | |||
| 113 | if (error) | 113 | if (error) |
| 114 | pm_notifier_call_chain(PM_POST_RESTORE); | 114 | pm_notifier_call_chain(PM_POST_RESTORE); |
| 115 | } | 115 | } |
| 116 | if (error) | 116 | if (error) { |
| 117 | free_basic_memory_bitmaps(); | ||
| 117 | atomic_inc(&snapshot_device_available); | 118 | atomic_inc(&snapshot_device_available); |
| 119 | } | ||
| 118 | data->frozen = 0; | 120 | data->frozen = 0; |
| 119 | data->ready = 0; | 121 | data->ready = 0; |
| 120 | data->platform_support = 0; | 122 | data->platform_support = 0; |
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 89419ff92e99..7e59ffb3d0ba 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
| @@ -87,6 +87,8 @@ static struct rcu_state *rcu_state; | |||
| 87 | int rcu_scheduler_active __read_mostly; | 87 | int rcu_scheduler_active __read_mostly; |
| 88 | EXPORT_SYMBOL_GPL(rcu_scheduler_active); | 88 | EXPORT_SYMBOL_GPL(rcu_scheduler_active); |
| 89 | 89 | ||
| 90 | #ifdef CONFIG_RCU_BOOST | ||
| 91 | |||
| 90 | /* | 92 | /* |
| 91 | * Control variables for per-CPU and per-rcu_node kthreads. These | 93 | * Control variables for per-CPU and per-rcu_node kthreads. These |
| 92 | * handle all flavors of RCU. | 94 | * handle all flavors of RCU. |
| @@ -98,8 +100,11 @@ DEFINE_PER_CPU(unsigned int, rcu_cpu_kthread_loops); | |||
| 98 | DEFINE_PER_CPU(char, rcu_cpu_has_work); | 100 | DEFINE_PER_CPU(char, rcu_cpu_has_work); |
| 99 | static char rcu_kthreads_spawnable; | 101 | static char rcu_kthreads_spawnable; |
| 100 | 102 | ||
| 103 | #endif /* #ifdef CONFIG_RCU_BOOST */ | ||
| 104 | |||
| 101 | static void rcu_node_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu); | 105 | static void rcu_node_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu); |
| 102 | static void invoke_rcu_cpu_kthread(void); | 106 | static void invoke_rcu_core(void); |
| 107 | static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp); | ||
| 103 | 108 | ||
| 104 | #define RCU_KTHREAD_PRIO 1 /* RT priority for per-CPU kthreads. */ | 109 | #define RCU_KTHREAD_PRIO 1 /* RT priority for per-CPU kthreads. */ |
| 105 | 110 | ||
| @@ -1088,14 +1093,8 @@ static void __rcu_offline_cpu(int cpu, struct rcu_state *rsp) | |||
| 1088 | int need_report = 0; | 1093 | int need_report = 0; |
