Linus Torvalds writes: (Summary) It will do a sg_scsi_ioctl(), but
before that it does the same crazy sg_allow_access() case - and only
for read-only opens.
for read-only opens.
But that's *doubly* wrong, because
But that's *doubly* wrong, because
(a) it's racy, and does the command check on a local copy that might not be the final one.
not be the final one.
(b) it's pointless, because sg_scsi_ioctl() actually does the proper command check on the final command as it was copied from user space.
for read-only opens.
But that's *doubly* wrong, because
But that's *doubly* wrong, because
(a) it's racy, and does the command check on a local copy that might not be the final one.
not be the final one.
(b) it's pointless, because sg_scsi_ioctl() actually does the proper command check on the final command as it was copied from user space.