Skip to content

Commit fe0da4e

Browse files
committed
compat_ioctl: bsg: add handler
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]>
1 parent 7eafd13 commit fe0da4e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

block/bsg.c

+1
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ static const struct file_operations bsg_fops = {
382382
.open = bsg_open,
383383
.release = bsg_release,
384384
.unlocked_ioctl = bsg_ioctl,
385+
.compat_ioctl = compat_ptr_ioctl,
385386
.owner = THIS_MODULE,
386387
.llseek = default_llseek,
387388
};

0 commit comments

Comments
 (0)