Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100348
b: refs/heads/master
c: 4a7e79a
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jun 20, 2008
1 parent 02b22c5 commit b4e4e59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 742a2fe31bf311d065a2bbacc2b363103b351300
refs/heads/master: 4a7e79a7deab9718d51dc8d3ee938bd0eb789b7b
9 changes: 8 additions & 1 deletion trunk/drivers/misc/hdpuftrs/hdpu_cpustate.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
#include <linux/miscdevice.h>
#include <linux/proc_fs.h>
#include <linux/hdpu_features.h>
Expand Down Expand Up @@ -151,7 +152,13 @@ static ssize_t cpustate_write(struct file *file, const char *buf,

static int cpustate_open(struct inode *inode, struct file *file)
{
return cpustate_get_ref((file->f_flags & O_EXCL));
int ret;

lock_kernel();
ret = cpustate_get_ref((file->f_flags & O_EXCL));
unlock_kernel();

return ret;
}

static int cpustate_release(struct inode *inode, struct file *file)
Expand Down

0 comments on commit b4e4e59

Please sign in to comment.