summaryrefslogtreecommitdiff
path: root/arch/parisc/kernel
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-07-14 17:24:30 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2008-07-14 17:24:30 +1000
commit46a618fcbbc694ee90045a0f4254ed8f4e4938d6 (patch)
tree34e5bdf464ffb67a5cdd87cfc264ca3c94b4268a /arch/parisc/kernel
parent458cd2173212139f327ff830013fcce52a3405a4 (diff)
parentfeae1ef116ed381625d3731c5ae4f4ebcb3fa302 (diff)
Merge commit 'bkl-removal/bkl-removal'
Conflicts: fs/nfs/file.c
Diffstat (limited to 'arch/parisc/kernel')
-rw-r--r--arch/parisc/kernel/perf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c
index 89d6d5ad44b5..f696f57faa15 100644
--- a/arch/parisc/kernel/perf.c
+++ b/arch/parisc/kernel/perf.c
@@ -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;
}