Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100306
b: refs/heads/master
c: c0bed68
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent f24dfbc commit f6d1830
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8c71d7ae2a7f723d171d9175212b6d0a727655d
refs/heads/master: c0bed680f0ca603864375ed5f9fed4296a53aa62
3 changes: 3 additions & 0 deletions trunk/drivers/char/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/smp_lock.h>

#include <asm/uaccess.h>

Expand Down Expand Up @@ -53,6 +54,7 @@ static int raw_open(struct inode *inode, struct file *filp)
return 0;
}

lock_kernel();
mutex_lock(&raw_mutex);

/*
Expand All @@ -79,6 +81,7 @@ static int raw_open(struct inode *inode, struct file *filp)
bdev->bd_inode->i_mapping;
filp->private_data = bdev;
mutex_unlock(&raw_mutex);
unlock_kernel();
return 0;

out2:
Expand Down

0 comments on commit f6d1830

Please sign in to comment.