Commit d4514d1b authored by Jonathan Corbet's avatar Jonathan Corbet

aacraid: cdev lock_kernel() pushdown

Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 647d87bd
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -667,6 +668,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file) ...@@ -667,6 +668,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
unsigned minor_number = iminor(inode); unsigned minor_number = iminor(inode);
int err = -ENODEV; int err = -ENODEV;
lock_kernel(); /* BKL pushdown: nothing else protects this list */
list_for_each_entry(aac, &aac_devices, entry) { list_for_each_entry(aac, &aac_devices, entry) {
if (aac->id == minor_number) { if (aac->id == minor_number) {
file->private_data = aac; file->private_data = aac;
...@@ -674,6 +676,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file) ...@@ -674,6 +676,7 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
break; break;
} }
} }
unlock_kernel();
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment