summaryrefslogtreecommitdiff
path: root/drivers/message/i2o
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-06-20 01:44:57 +0400
committerJonathan Corbet <corbet@lwn.net>2008-07-03 01:06:27 +0400
commit743115ee05f09f356d86763316acf627a7f5a6b3 (patch)
treefbcf31862c77065d982dadf80b4c666aa0083aac /drivers/message/i2o
parentb7e3e1fbf69d1b6abfd337460ea17d7230e3a6e5 (diff)
downloadlinux-743115ee05f09f356d86763316acf627a7f5a6b3.tar.xz
i2o: fasync BKL pushdown
This driver appears to really need the BKL to protect open_files. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/message/i2o')
-rw-r--r--drivers/message/i2o/i2o_config.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 95b4c108585c..4238de98d4a6 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -1084,15 +1084,17 @@ static int cfg_fasync(int fd, struct file *fp, int on)
{
ulong id = (ulong) fp->private_data;
struct i2o_cfg_info *p;
+ int ret = -EBADF;
+ lock_kernel();
for (p = open_files; p; p = p->next)
if (p->q_id == id)
break;
- if (!p)
- return -EBADF;
-
- return fasync_helper(fd, fp, on, &p->fasync);
+ if (p)
+ ret = fasync_helper(fd, fp, on, &p->fasync);
+ unlock_kernel();
+ return ret;
}
static int cfg_release(struct inode *inode, struct file *file)