Re: [RFC] breakage in bsg

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Al Viro
Date: Sunday, July 20, 2008 - 11:27 pm

On Sun, Jul 20, 2008 at 05:34:06PM +0100, Al Viro wrote:


Actually, cmd_filter changeset breaks all users of blk_verify_command().
It expects that struct file passed to will be that of a block device:
        inode = file->f_dentry->d_inode;
        if (!inode)
                return -EINVAL;

        disk = inode->i_bdev->bd_disk;

        return blk_cmd_filter_verify_command(&disk->cmd_filter,
                                                 cmd, &file->f_mode);

Unfortunately, all of those can get struct file of *character* device, with
obvious results.

The minimal fix is to pass disk / mode explicitly.  I'll post the patch,
but that still leaves bsg broken.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] breakage in bsg, Al Viro, (Sun Jul 20, 9:34 am)
Re: [RFC] breakage in bsg, Al Viro, (Sun Jul 20, 11:27 pm)