From: Jonathan Corbet Date: Thu, 19 Jun 2008 21:44:57 +0000 (-0600) Subject: i2o: fasync BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~11 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=743115ee05f09f356d86763316acf627a7f5a6b3;p=linux-2.6-omap-h63xx.git i2o: fasync BKL pushdown This driver appears to really need the BKL to protect open_files. Signed-off-by: Jonathan Corbet --- diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index 95b4c108585..4238de98d4a 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)