• brking@us.ibm.com's avatar
    [SCSI] Prevent scsi_execute_async from guessing cdb length · bb1d1073
    brking@us.ibm.com authored
    When the scsi_execute_async interface was added it ended up reducing
    the flexibility of userspace to send arbitrary scsi commands through
    sg using SG_IO. The SG_IO interface allows userspace to specify the
    CDB length. This is now ignored in scsi_execute_async and it is
    guessed using the COMMAND_SIZE macro, which is not always correct,
    particularly for vendor specific commands. This patch adds a cmd_len
    parameter to the scsi_execute_async interface to allow the caller
    to specify the length of the CDB.
    Signed-off-by: default avatarBrian King <brking@us.ibm.com>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
    bb1d1073
scsi_lib.c 57.3 KB