Commit b6917500 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Corbet

parisc-kernel-perf: BKL pushdown

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 6044c319
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/smp_lock.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -260,13 +261,16 @@ printk("Preparing to start counters\n"); ...@@ -260,13 +261,16 @@ printk("Preparing to start counters\n");
*/ */
static int perf_open(struct inode *inode, struct file *file) static int perf_open(struct inode *inode, struct file *file)
{ {
lock_kernel();
spin_lock(&perf_lock); spin_lock(&perf_lock);
if (perf_enabled) { if (perf_enabled) {
spin_unlock(&perf_lock); spin_unlock(&perf_lock);
unlock_kernel();
return -EBUSY; return -EBUSY;
} }
perf_enabled = 1; perf_enabled = 1;
spin_unlock(&perf_lock); spin_unlock(&perf_lock);
unlock_kernel();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment