Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311601
b: refs/heads/master
c: 6d93592
h: refs/heads/master
i:
  311599: 2811347
v: v3
  • Loading branch information
Jan Kara authored and Jens Axboe committed Jun 15, 2012
1 parent 9ff7e0b commit f7f3131
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76aaa5101fffaef12b45b4c01ed0d0528f23dedf
refs/heads/master: 6d9359280753d2955f86d6411047516a9431eb51
5 changes: 4 additions & 1 deletion trunk/block/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,14 @@ int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd)
break;
}

if (capable(CAP_SYS_RAWIO))
return 0;

/* In particular, rule out all resets and host-specific ioctls. */
printk_ratelimited(KERN_WARNING
"%s: sending ioctl %x to a partition!\n", current->comm, cmd);

return capable(CAP_SYS_RAWIO) ? 0 : -ENOIOCTLCMD;
return -ENOIOCTLCMD;
}
EXPORT_SYMBOL(scsi_verify_blk_ioctl);

Expand Down

0 comments on commit f7f3131

Please sign in to comment.