From patchwork Wed Apr 17 21:44:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10906223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF1D317E6 for ; Wed, 17 Apr 2019 21:45:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC18228A96 for ; Wed, 17 Apr 2019 21:45:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD7D628BB0; Wed, 17 Apr 2019 21:45:17 +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=-7.9 required=2.0 tests=BAYES_00,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 C886028A96 for ; Wed, 17 Apr 2019 21:45:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387930AbfDQVpP (ORCPT ); Wed, 17 Apr 2019 17:45:15 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41992 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387564AbfDQVpJ (ORCPT ); Wed, 17 Apr 2019 17:45:09 -0400 Received: by mail-pl1-f196.google.com with SMTP id cv12so107205plb.9 for ; Wed, 17 Apr 2019 14:45:09 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=xUvuSWWNU0dv9WWwbLZDcuhLrweaG0JkwgMwzhLnhDQ=; b=GfRPAvc2t8Jzb7o59ll64ti0vvzwQfGP9T3P2UHfVhz6wXIdVQ6LQhY37iaaCPyT1Z JXYyyhOzi4TpFHIs64IlrWKMtqD+vHugoKcF2nF6PUYJCP3SBeuI0r56TLJnXE+4Rb8k afGNsKk0eKdAVfdE4UpzARQERnwF4BE6eFaeDdniTeQQ2BOlmlbe0OzX78zE5HYhHfQ5 E7jYcppN1WbPiUnjgmeAL1mKYqdTH9Xtn4kBWtRYGH06W+kX3Pm1IN7yoiEV5lu3U2YD uFeV9hmESM6b99QXxjcV9XoGWGUdY6473mv85J7Z5OtTkmp9RUji0Z5vC8dnJ5plmOPV adyg== X-Gm-Message-State: APjAAAWnKbLnoiOgT1D6JCub3MPKEnrTTfLCn1/I7zSa8FSz721pD1Os EjurkCdVrv28n+oGmUb2PgY= X-Google-Smtp-Source: APXvYqwy9O7DJDYM93C6hV1RPhnEuAJLP4fhVRvBeKeuY0SvR954mqMiz1NQ1HzR2Xbs+MeSR44blA== X-Received: by 2002:a17:902:bc47:: with SMTP id t7mr66935935plz.122.1555537509069; Wed, 17 Apr 2019 14:45:09 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id d68sm219314pfg.16.2019.04.17.14.45.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 14:45:07 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Himanshu Madhani , Giridhar Malavali Subject: [PATCH 12/34] qla2xxx: Increase the size of the mailbox arrays from 4 to 8 Date: Wed, 17 Apr 2019 14:44:21 -0700 Message-Id: <20190417214443.243152-13-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190417214443.243152-1-bvanassche@acm.org> References: <20190417214443.243152-1-bvanassche@acm.org> MIME-Version: 1.0 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 This patch avoids that Coverity complains that qla2x00_async_event() writes outside the bounds of the mb[] arrays (MBA_IDC_AEN case). Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- drivers/scsi/qla2xxx/qla_nx.c | 6 +++--- drivers/scsi/qla2xxx/qla_nx2.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 8432ef05f20b..b781e8a47f43 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -49,7 +49,7 @@ qla2100_intr_handler(int irq, void *dev_id) int status; unsigned long iter; uint16_t hccr; - uint16_t mb[4]; + uint16_t mb[8]; struct rsp_que *rsp; unsigned long flags; @@ -168,7 +168,7 @@ qla2300_intr_handler(int irq, void *dev_id) unsigned long iter; uint32_t stat; uint16_t hccr; - uint16_t mb[4]; + uint16_t mb[8]; struct rsp_que *rsp; struct qla_hw_data *ha; unsigned long flags; diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index df1612b19f67..c12db16c3cf4 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c @@ -2039,7 +2039,7 @@ qla82xx_intr_handler(int irq, void *dev_id) unsigned long flags; unsigned long iter; uint32_t stat = 0; - uint16_t mb[4]; + uint16_t mb[8]; rsp = (struct rsp_que *) dev_id; if (!rsp) { @@ -2123,7 +2123,7 @@ qla82xx_msix_default(int irq, void *dev_id) unsigned long flags; uint32_t stat = 0; uint32_t host_int = 0; - uint16_t mb[4]; + uint16_t mb[8]; rsp = (struct rsp_que *) dev_id; if (!rsp) { @@ -2219,7 +2219,7 @@ qla82xx_poll(int irq, void *dev_id) int status = 0; uint32_t stat; uint32_t host_int = 0; - uint16_t mb[4]; + uint16_t mb[8]; unsigned long flags; rsp = (struct rsp_que *) dev_id; diff --git a/drivers/scsi/qla2xxx/qla_nx2.c b/drivers/scsi/qla2xxx/qla_nx2.c index 1adc4f3febe8..369ac04d0454 100644 --- a/drivers/scsi/qla2xxx/qla_nx2.c +++ b/drivers/scsi/qla2xxx/qla_nx2.c @@ -3895,7 +3895,7 @@ qla8044_intr_handler(int irq, void *dev_id) unsigned long flags; unsigned long iter; uint32_t stat; - uint16_t mb[4]; + uint16_t mb[8]; uint32_t leg_int_ptr = 0, pf_bit; rsp = (struct rsp_que *) dev_id;