scsi: be2iscsi: Include null char in SET_HOST_DATA
authorJitendra Bhivare <jitendra.bhivare@broadcom.com>
Thu, 7 Jun 2018 08:24:41 +0000 (13:54 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 20 Jun 2018 02:02:25 +0000 (22:02 -0400)
FW needs NULL terminated driver version string.

Signed-off-by: Ketan Mukadam <ketan.mukadam@broadcom.com>
Reviewed-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/be2iscsi/be_cmds.c

index 2eb66df3e3d6c95fbca7b6dc7ee017e02d533489..c10aac4dbc5ee6a9138bff2e885e879af679afda 100644 (file)
@@ -1545,7 +1545,7 @@ int beiscsi_set_host_data(struct beiscsi_hba *phba)
                snprintf((char *)ioctl->param.req.param_data,
                         sizeof(ioctl->param.req.param_data),
                         "Linux iSCSI v%s", BUILD_STR);
-       ioctl->param.req.param_len = ALIGN(ioctl->param.req.param_len, 4);
+       ioctl->param.req.param_len = ALIGN(ioctl->param.req.param_len + 1, 4);
        if (ioctl->param.req.param_len > BE_CMD_MAX_DRV_VERSION)
                ioctl->param.req.param_len = BE_CMD_MAX_DRV_VERSION;
        ret = be_mbox_notify(ctrl);