Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100284
b: refs/heads/master
c: 12ead6b
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent f13577f commit ccd7886
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 2d863e92ec1b1deb8167d7f5266f754f258e876a
refs/heads/master: 12ead6b098b65dd21d3ed4fcccf20025dbe86cc2
5 changes: 5 additions & 0 deletions trunk/drivers/char/mbcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/mm.h>
#include <linux/uio.h>
#include <linux/mutex.h>
#include <linux/smp_lock.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
Expand Down Expand Up @@ -382,15 +383,19 @@ static int mbcs_open(struct inode *ip, struct file *fp)
struct mbcs_soft *soft;
int minor;

lock_kernel();
minor = iminor(ip);

/* Nothing protects access to this list... */
list_for_each_entry(soft, &soft_list, list) {
if (soft->nasid == minor) {
fp->private_data = soft->cxdev;
unlock_kernel();
return 0;
}
}

unlock_kernel();
return -ENODEV;
}

Expand Down

0 comments on commit ccd7886

Please sign in to comment.