From patchwork Thu Jun 7 08:24:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jitendra Bhivare X-Patchwork-Id: 10451427 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 188E660233 for ; Thu, 7 Jun 2018 08:25:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 081A829C41 for ; Thu, 7 Jun 2018 08:25:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0EA529C4B; Thu, 7 Jun 2018 08:25:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A65F529C41 for ; Thu, 7 Jun 2018 08:25:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932632AbeFGIZM (ORCPT ); Thu, 7 Jun 2018 04:25:12 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:33629 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932240AbeFGIZJ (ORCPT ); Thu, 7 Jun 2018 04:25:09 -0400 Received: by mail-qk0-f194.google.com with SMTP id h7-v6so5777910qkm.0 for ; Thu, 07 Jun 2018 01:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Bb4LX7+koLFtHSEf4Oq0XrNqgtzmDiAWiF/PD9+34nM=; b=TD7QCD5C9ByVIoVLS32aEhGz5peSj/xqqteiwpx9XQoEEgjcqFs2Rz9Zy8YVRv+FUs m8yZjWedZaCOwSUA7sOzAoMjRwyzzKG8PDn4hi32pXmTfE9J4qTKmoTIvR1F7xxg3CEY QWOd8GdBL7CT8MhzqEAZmzivUmihCX1B6hk7A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Bb4LX7+koLFtHSEf4Oq0XrNqgtzmDiAWiF/PD9+34nM=; b=n/jobHa7EVv5yw2vuIIz8V7sDh41M+H8EiLRXjKy751zmCEeZUapz/EaUCSljsbXt6 8SjrDa5ERR917jxUogGm5u2gef1eValqmlgqKSZzau8+OV2M2mudOEBSE4/5tuVb6iSf mSJOmKcH6rAsnOlTuF5P2CuVx/oPfg4iohOQUik1zmhid9EBsXUvzQ8q6L6whQj+5xbZ 9l/bbmlfCgPW9w3BiGp9Zi3ONNrxy7WFUe+xb1xHnjqd12rPvMnRdnQ1UcRj5tlWo9Nl 8LqJZfxggLmOKPLLQvy3HjcSV1qeZ+Ygd/E7K3VsYHYmEl84Z8gjGFPjLt4HeKnltTT+ iQKQ== X-Gm-Message-State: APt69E17Bjlhg82I1XIlDXeoJKNO0tw3IzHODeK5p6U3LR2UwWcOotc7 MN2RdZtld3nPAY95N5ADXxcFnA== X-Google-Smtp-Source: ADUXVKILfHm26aUESy8T0+prM/ayQ9ILfFzqWlEg4g8AkIjpZsiw+C5O7U82NjPsh8DwFruk/XF++A== X-Received: by 2002:a37:7806:: with SMTP id t6-v6mr663315qkc.2.1528359908903; Thu, 07 Jun 2018 01:25:08 -0700 (PDT) Received: from android.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id k6-v6sm5179506qtm.30.2018.06.07.01.25.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jun 2018 01:25:08 -0700 (PDT) From: Jitendra Bhivare To: cleech@redhat.com, lduncan@suse.com Cc: linux-scsi@vger.kernel.org, ketan.mukadam@broadcom.com, Jitendra Bhivare Subject: [PATCH 1/3] scsi: be2iscsi: Include null char in SET_HOST_DATA Date: Thu, 7 Jun 2018 13:54:41 +0530 Message-Id: <1528359883-13054-2-git-send-email-jitendra.bhivare@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528359883-13054-1-git-send-email-jitendra.bhivare@broadcom.com> References: <1528359883-13054-1-git-send-email-jitendra.bhivare@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP FW needs NULL terminated driver version string. Signed-off-by: Ketan Mukadam Reviewed-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index 2eb66df..c10aac4 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -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);