[RAMEN9610-9484][COMMON] scsi: rpmb: fix bug of data lengh in memcopy
authorHyeyeon Chung <hyeon.chung@samsung.com>
Fri, 7 Dec 2018 03:37:36 +0000 (12:37 +0900)
committerhskang <hs1218.kang@samsung.com>
Sat, 15 Dec 2018 08:51:32 +0000 (17:51 +0900)
Change-Id: If1849061ab3fa3adc14d3a2bb3a43121721b362c
Signed-off-by: Hyeyeon Chung <hyeon.chung@samsung.com>
drivers/scsi/scsi_ioctl.c

index 81a029da8f3a0c017d15d53c60c2c021225666d9..083eb4e291fc551921004ada39cea2965b04de57 100644 (file)
@@ -192,7 +192,7 @@ static int srpmb_ioctl_secu_prot_command(struct scsi_device *sdev, char *cmd,
                                  &sshdr, timeout, retries, NULL);
 
        if (prot_in_out == SCSI_IOCTL_SECURITY_PROTOCOL_IN) {
-               memcpy(req->rpmb_data, buf, req->data_len);
+               memcpy(req->rpmb_data, buf, bufflen);
        }
        SCSI_LOG_IOCTL(2, printk("Ioctl returned  0x%x\n", result));