Skip to content

Commit

Permalink
i2o: fasync BKL pushdown
Browse files Browse the repository at this point in the history
This driver appears to really need the BKL to protect open_files.

Signed-off-by: Jonathan Corbet <[email protected]>
  • Loading branch information
Jonathan Corbet committed Jul 2, 2008
1 parent b7e3e1f commit 743115e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/message/i2o/i2o_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 743115e

Please sign in to comment.