Skip to content

Commit

Permalink
compat_ioctl: bsg: add handler
Browse files Browse the repository at this point in the history
bsg_ioctl() calls into scsi_cmd_ioctl() for a couple of generic commands
and relies on fs/compat_ioctl.c to handle it correctly in compat mode.

Adding a private compat_ioctl() handler avoids that round-trip and lets
us get rid of the generic emulation once this is done.

Note that bsg implements an SG_IO command that is different from the
other drivers and does not need emulation.

Reviewed-by: Ben Hutchings <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
arndb committed Jan 3, 2020
1 parent 7eafd13 commit fe0da4e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ static const struct file_operations bsg_fops = {
.open = bsg_open,
.release = bsg_release,
.unlocked_ioctl = bsg_ioctl,
.compat_ioctl = compat_ptr_ioctl,
.owner = THIS_MODULE,
.llseek = default_llseek,
};
Expand Down

0 comments on commit fe0da4e

Please sign in to comment.