summaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/perf.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-07-15 21:19:14 +0200
committerBen Dooks <ben-linux@fluff.org>2008-07-15 21:19:14 +0200
commit0c17e4ceedd35c78b1c7413dbd16279a350be6bc (patch)
tree313b3b9ca04727f3704464e01d8dd97da1dd534b /arch/parisc/kernel/perf.c
parent[ARM] S3C24XX: Fix SERIAL_SAMSUNG entry (diff)
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pen... (diff)
downloadlinux-0c17e4ceedd35c78b1c7413dbd16279a350be6bc.tar.xz
linux-0c17e4ceedd35c78b1c7413dbd16279a350be6bc.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-rmk
Diffstat (limited to 'arch/parisc/kernel/perf.c')
-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;
}