diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-03-04 05:51:29 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-03-04 05:51:29 -0500 |
| commit | e02c4fd3142dfb9412531bbfabd510a2a7c6ea46 (patch) | |
| tree | 61b64506b2c016e050f940a89d1ffd36b7c00fdf /kernel | |
| parent | ae1f30384baef4056438d81b305a6a5199b0d16c (diff) | |
| parent | ac91d85456372a90af5b85eb6620fd2efb1e431b (diff) | |
Merge branch 'tip/tracing/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into tracing/urgent
Diffstat (limited to 'kernel')
50 files changed, 3933 insertions, 3253 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 864ff75d65f2..6aebdeb2aa34 100644 --- a/kernel/Makefile +++ b/kernel/Makefile | |||
| @@ -100,6 +100,7 @@ obj-$(CONFIG_SLOW_WORK_DEBUG) += slow-work-debugfs.o | |||
| 100 | obj-$(CONFIG_PERF_EVENTS) += perf_event.o | 100 | obj-$(CONFIG_PERF_EVENTS) += perf_event.o |
| 101 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o | 101 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o |
| 102 | obj-$(CONFIG_USER_RETURN_NOTIFIER) += user-return-notifier.o | 102 | obj-$(CONFIG_USER_RETURN_NOTIFIER) += user-return-notifier.o |
| 103 | obj-$(CONFIG_PADATA) += padata.o | ||
| 103 | 104 | ||
| 104 | ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y) | 105 | ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y) |
| 105 | # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is | 106 | # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index aa3bee566446..4fd90e129772 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #include <linux/cgroup.h> | 25 | #include <linux/cgroup.h> |
| 26 | #include <linux/module.h> | ||
| 26 | #include <linux/ctype.h> | 27 | #include <linux/ctype.h> |
| 27 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
| 28 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
| @@ -166,6 +167,20 @@ static DEFINE_SPINLOCK(hierarchy_id_lock); | |||
| 166 | */ | 167 | */ |
| 167 | static int need_forkexit_callback __read_mostly; | 168 | static int need_forkexit_callback __read_mostly; |
| 168 | 169 | ||
| 170 | #ifdef CONFIG_PROVE_LOCKING | ||
| 171 | int cgroup_lock_is_held(void) | ||
| 172 | { | ||
| 173 | return lockdep_is_held(&cgroup_mutex); | ||
| 174 | } | ||
| 175 | #else /* #ifdef CONFIG_PROVE_LOCKING */ | ||
| 176 | int cgroup_lock_is_held(void) | ||
| 177 | { | ||
| 178 | return mutex_is_locked(&cgroup_mutex); | ||
| 179 | } | ||
| 180 | #endif /* #else #ifdef CONFIG_PROVE_LOCKING */ | ||
| 181 | |||
| 182 | EXPORT_SYMBOL_GPL(cgroup_lock_is_held); | ||
| 183 | |||
| 169 | /* convenient tests for these bits */ | 184 | /* convenient tests for these bits */ |
| 170 | inline int cgroup_is_removed(const struct cgroup *cgrp) | 185 | inline int cgroup_is_removed(const struct cgroup *cgrp) |
| 171 | { | 186 | { |
diff --git a/kernel/exit.c b/kernel/exit.c index 546774a31a66..45ed043b8bf5 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
| @@ -85,7 +85,9 @@ static void __exit_signal(struct task_struct *tsk) | |||
| 85 | BUG_ON(!sig); | 85 | BUG_ON(!sig); |
| 86 | BUG_ON(!atomic_read(&sig->count)); | 86 | BUG_ON(!atomic_read(&sig->count)); |
| 87 | 87 | ||
| 88 | sighand = rcu_dereference(tsk->sighand); | 88 | sighand = rcu_dereference_check(tsk->sighand, |
| 89 | rcu_read_lock_held() || | ||
| 90 | lockdep_is_held(&tasklist_lock)); | ||
| 89 | spin_lock(&sighand->siglock); | 91 | spin_lock(&sighand->siglock); |
| 90 | 92 | ||
| 91 | posix_cpu_timers_exit(tsk); | 93 | posix_cpu_timers_exit(tsk); |
| @@ -170,8 +172,10 @@ void release_task(struct task_struct * p) | |||
| 170 | repeat: | 172 | repeat: |
| 171 | tracehook_prepare_release_task(p); | 173 | tracehook_prepare_release_task(p); |
| 172 | /* don't need to get the RCU readlock here - the process is dead and | 174 | /* don't need to get the RCU readlock here - the process is dead and |
| 173 | * can't be modifying its own credentials */ | 175 | * can't be modifying its own credentials. But shut RCU-lockdep up */ |
| 176 | rcu_read_lock(); | ||
| 174 | atomic_dec(&__task_cred(p)->user->processes); | 177 | atomic_dec(&__task_cred(p)->user->processes); |
| 178 | rcu_read_unlock(); | ||
| 175 | 179 | ||
| 176 | proc_flush_task(p); | 180 | proc_flush_task(p); |
| 177 | 181 | ||
| @@ -473,9 +477,11 @@ static void close_files(struct files_struct * files) | |||
| 473 | /* | 477 | /* |
| 474 | * It is safe to dereference the fd table without RCU or | 478 | * It is safe to dereference the fd table without RCU or |
| 475 | * ->file_lock because this is the last reference to the | 479 | * ->file_lock because this is the last reference to the |
| 476 | * files structure. | 480 | * files structure. But use RCU to shut RCU-lockdep up. |
| 477 | */ | 481 | */ |
| 482 | rcu_read_lock(); | ||
| 478 | fdt = files_fdtable(files); | 483 | fdt = files_fdtable(files); |
| 484 | rcu_read_unlock(); | ||
| 479 | for (;;) { | 485 | for (;;) { |
| 480 | unsigned long set; | 486 | unsigned long set; |
| 481 | i = j * __NFDBITS; | 487 | i = j * __NFDBITS; |
| @@ -521,10 +527,12 @@ void put_files_struct(struct files_struct *files) | |||
| 521 | * at the end of the RCU grace period. Otherwise, | 527 | * at the end of the RCU grace period. Otherwise, |
| 522 | * you can free files immediately. | 528 | * you can free files immediately. |
| 523 | */ | 529 | */ |
| 530 | rcu_read_lock(); | ||
| 524 | fdt = files_fdtable(files); | 531 | fdt = files_fdtable(files); |
| 525 | if (fdt != &files->fdtab) | 532 | if (fdt != &files->fdtab) |
| 526 | kmem_cache_free(files_cachep, files); | 533 | kmem_cache_free(files_cachep, files); |
| 527 | free_fdtable(fdt); | 534 | free_fdtable(fdt); |
| 535 | rcu_read_unlock(); | ||
| 528 | } | 536 | } |
| 529 | } | 537 | } |
| 530 | 538 | ||
diff --git a/kernel/fork.c b/kernel/fork.c index f88bd984df35..17bbf093356d 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
| @@ -86,6 +86,7 @@ int max_threads; /* tunable limit on nr_threads */ | |||
| 86 | DEFINE_PER_CPU(unsigned long, process_counts) = 0; | 86 | DEFINE_PER_CPU(unsigned long, process_counts) = 0; |
| 87 | 87 | ||
| 88 | __cacheline_aligned DEFINE_RWLOCK(tasklist_lock); /* outer */ | 88 | __cacheline_aligned DEFINE_RWLOCK(tasklist_lock); /* outer */ |
