]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
parisc-kernel-perf: BKL pushdown
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 May 2008 17:16:31 +0000 (19:16 +0200)
committerJonathan Corbet <corbet@lwn.net>
Wed, 2 Jul 2008 21:06:24 +0000 (15:06 -0600)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/parisc/kernel/perf.c

index 89d6d5ad44b5258f4ff61ae487c8ed1020bf115b..f696f57faa15b58dfd32e2101379f32e27ce70c0 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/init.h>
 #include <linux/proc_fs.h>
 #include <linux/miscdevice.h>
+#include <linux/smp_lock.h>
 #include <linux/spinlock.h>
 
 #include <asm/uaccess.h>
@@ -260,13 +261,16 @@ printk("Preparing to start counters\n");
  */
 static int perf_open(struct inode *inode, struct file *file)
 {
+       lock_kernel();
        spin_lock(&perf_lock);
        if (perf_enabled) {
                spin_unlock(&perf_lock);
+               unlock_kernel();
                return -EBUSY;
        }
        perf_enabled = 1;
        spin_unlock(&perf_lock);
+       unlock_kernel();
 
        return 0;
 }