Skip to content

Commit

Permalink
aacraid: cdev lock_kernel() pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 647d87b commit d4514d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <linux/moduleparam.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/spinlock.h>
#include <linux/syscalls.h>
#include <linux/delay.h>
Expand Down Expand Up @@ -667,13 +668,15 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
unsigned minor_number = iminor(inode);
int err = -ENODEV;

lock_kernel(); /* BKL pushdown: nothing else protects this list */
list_for_each_entry(aac, &aac_devices, entry) {
if (aac->id == minor_number) {
file->private_data = aac;
err = 0;
break;
}
}
unlock_kernel();

return err;
}
Expand Down

0 comments on commit d4514d1

Please sign in to comment.