Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100282
b: refs/heads/master
c: 309c455
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 1c857a6 commit b042545
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: 1f439647a4072ec64bb2e4b9290cd7be6aee8328
refs/heads/master: 309c4551c0fa0897d5343c36cbfbfa39f1f41b88
3 changes: 3 additions & 0 deletions trunk/drivers/char/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <linux/device.h>
#include <linux/tty.h>
#include <linux/kmod.h>
#include <linux/smp_lock.h>

/*
* Head entry for the doubly linked miscdevice list
Expand Down Expand Up @@ -118,6 +119,7 @@ static int misc_open(struct inode * inode, struct file * file)
int err = -ENODEV;
const struct file_operations *old_fops, *new_fops = NULL;

lock_kernel();
mutex_lock(&misc_mtx);

list_for_each_entry(c, &misc_list, list) {
Expand Down Expand Up @@ -155,6 +157,7 @@ static int misc_open(struct inode * inode, struct file * file)
fops_put(old_fops);
fail:
mutex_unlock(&misc_mtx);
unlock_kernel();
return err;
}

Expand Down

0 comments on commit b042545

Please sign in to comment.