diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-07 20:06:54 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-07 20:06:54 -0400 |
| commit | 78417334b5cb6e1f915b8fdcc4fce3f1a1b4420c (patch) | |
| tree | 8e3fce9f27fd058904c0a3247a5c5ebb8df9fbe8 | |
| parent | cd816a0d84377c4e87f55cbe934a23417f9f5743 (diff) | |
| parent | 5f202bd5ca64132cdd7f186656bc0221f257733d (diff) | |
Merge branch 'bkl/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
do_coredump: Do not take BKL
init: Remove the BKL from startup code
| -rw-r--r-- | fs/exec.c | 7 | ||||
| -rw-r--r-- | init/main.c | 5 | ||||
| -rw-r--r-- | kernel/trace/trace.c | 8 |
3 files changed, 0 insertions, 20 deletions
| @@ -28,7 +28,6 @@ | |||
| 28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
| 29 | #include <linux/stat.h> | 29 | #include <linux/stat.h> |
| 30 | #include <linux/fcntl.h> | 30 | #include <linux/fcntl.h> |
| 31 | #include <linux/smp_lock.h> | ||
| 32 | #include <linux/swap.h> | 31 | #include <linux/swap.h> |
| 33 | #include <linux/string.h> | 32 | #include <linux/string.h> |
| 34 | #include <linux/init.h> | 33 | #include <linux/init.h> |
| @@ -1892,13 +1891,7 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs) | |||
| 1892 | */ | 1891 | */ |
| 1893 | clear_thread_flag(TIF_SIGPENDING); | 1892 | clear_thread_flag(TIF_SIGPENDING); |
| 1894 | 1893 | ||
| 1895 | /* | ||
| 1896 | * lock_kernel() because format_corename() is controlled by sysctl, which | ||
| 1897 | * uses lock_kernel() | ||
| 1898 | */ | ||
| 1899 | lock_kernel(); | ||
| 1900 | ispipe = format_corename(corename, signr); | 1894 | ispipe = format_corename(corename, signr); |
| 1901 | unlock_kernel(); | ||
| 1902 | 1895 | ||
| 1903 | if (ispipe) { | 1896 | if (ispipe) { |
| 1904 | int dump_count; | 1897 | int dump_count; |
diff --git a/init/main.c b/init/main.c index e97fadeec856..b8b6effe9ff4 100644 --- a/init/main.c +++ b/init/main.c | |||
| @@ -441,7 +441,6 @@ static noinline void __init_refok rest_init(void) | |||
| 441 | kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns); | 441 | kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns); |
| 442 | rcu_read_unlock(); | 442 | rcu_read_unlock(); |
| 443 | complete(&kthreadd_done); | 443 | complete(&kthreadd_done); |
| 444 | unlock_kernel(); | ||
| 445 | 444 | ||
| 446 | /* | 445 | /* |
| 447 | * The boot idle thread must execute schedule() | 446 | * The boot idle thread must execute schedule() |
| @@ -563,7 +562,6 @@ asmlinkage void __init start_kernel(void) | |||
| 563 | * Interrupts are still disabled. Do necessary setups, then | 562 | * Interrupts are still disabled. Do necessary setups, then |
| 564 | * enable them | 563 | * enable them |
| 565 | */ | 564 | */ |
| 566 | lock_kernel(); | ||
| 567 | tick_init(); | 565 | tick_init(); |
| 568 | boot_cpu_init(); | 566 | boot_cpu_init(); |
| 569 | page_address_init(); | 567 | page_address_init(); |
| @@ -820,7 +818,6 @@ static noinline int init_post(void) | |||
| 820 | /* need to finish all async __init code before freeing the memory */ | 818 | /* need to finish all async __init code before freeing the memory */ |
| 821 | async_synchronize_full(); | 819 | async_synchronize_full(); |
| 822 | free_initmem(); | 820 | free_initmem(); |
| 823 | unlock_kernel(); | ||
| 824 | mark_rodata_ro(); | 821 | mark_rodata_ro(); |
| 825 | system_state = SYSTEM_RUNNING; | 822 | system_state = SYSTEM_RUNNING; |
| 826 | numa_default_policy(); | 823 | numa_default_policy(); |
| @@ -860,8 +857,6 @@ static int __init kernel_init(void * unused) | |||
| 860 | * Wait until kthreadd is all set-up. | 857 | * Wait until kthreadd is all set-up. |
| 861 | */ | 858 | */ |
| 862 | wait_for_completion(&kthreadd_done); | 859 | wait_for_completion(&kthreadd_done); |
| 863 | lock_kernel(); | ||
| 864 | |||
| 865 | /* | 860 | /* |
| 866 | * init can allocate pages on any node | 861 | * init can allocate pages on any node |
| 867 | */ | 862 | */ |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index ed1032d6f81d..ba14a22be4cc 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
| @@ -741,13 +741,6 @@ __acquires(kernel_lock) | |||
| 741 | return -1; | 741 | return -1; |
| 742 | } | 742 | } |
| 743 | 743 | ||
| 744 | /* | ||
| 745 | * When this gets called we hold the BKL which means that | ||
| 746 | * preemption is disabled. Various trace selftests however | ||
| 747 | * need to disable and enable preemption for successful tests. | ||
| 748 | * So we drop the BKL here and grab it after the tests again. | ||
| 749 | */ | ||
| 750 | unlock_kernel(); | ||
| 751 | mutex_lock(&trace_types_lock); | 744 | mutex_lock(&trace_types_lock); |
| 752 | 745 | ||
| 753 | tracing_selftest_running = true; | 746 | tracing_selftest_running = true; |
| @@ -829,7 +822,6 @@ __acquires(kernel_lock) | |||
| 829 | #endif | 822 | #endif |
| 830 | 823 | ||
| 831 | out_unlock: | 824 | out_unlock: |
| 832 | lock_kernel(); | ||
| 833 | return ret; | 825 | return ret; |
| 834 | } | 826 | } |
| 835 | 827 | ||
