Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp846629pxb; Wed, 6 Apr 2022 01:44:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznMGQsNohIYh7xxN/vzDMNF+R3/5aIh+KrW7HDpv6QqpXGzrXeOiMCrB8V0VhUy9OwIvF9 X-Received: by 2002:a62:18cf:0:b0:4fa:6d07:8b9b with SMTP id 198-20020a6218cf000000b004fa6d078b9bmr7689977pfy.61.1649234690085; Wed, 06 Apr 2022 01:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649234690; cv=none; d=google.com; s=arc-20160816; b=pUWZCAPfPV+NGZehGT0r96tt9dRnLbPam3ShBTqcErwFIMiF70iDF8lpspYHZgvkAK 12jGDzmHZGPqZaljXsWioM3ohumJPx7UN6FfPdfEcRMFymPeCAJjPtNYzrCHSvSAfqvr B+pMIIY5+dSCNCAxZcDFeEt1AZgtlAipql8m9Sv4ZGdz4errgqbiikYtM1KaTfBTkbJ0 GnqO29vxTKLl+FPNLC640J5DSjYJafFCfE5X8c1I7NHp5HrB4yEflTx7AdIQCa8HeybU No/2+XuVocbH1VKje8/+f8SqhyKQT5Ky7s6yTXLTVC75/YxFus7Nw/yNZFsabZZ97zUV i2Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LNo5Vs86U1xWNMLvOASsq2KlDXOjcE5igglzeyCEN5s=; b=YiBa9gBFIPtHd81GeZK2ApMb5BXBh+js+tJmcNglpvWjvLRccBQStWUDaXsHRL7xXu 5lkZr1UxtVp8uVqBnJir6z/ZVdZ2B1p9oyQQGMiWlRHso21Yl26hfgY8Dnh98NwHhL3P tUsMxzFslcmm8dA7hTbOFDsXYAUGWom6xTq2mrE7FIJ101P7uzdlXAGGl9gQ/A6enKIx GIYfnFhahqKn+MHzSaIeXnfL+Iem2yzqX37I++c2sVa1Jll1O7Kn/X+3a2Rvbuce7bNw ObhnsTDk6Erl8FwVHnHrN1NECeGoesC31SRPGwPmHePKQth1nW2BoT7DExNaEAOC4k+3 jZZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n5pAdb4H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k13-20020a170902ce0d00b00153b2d165a8si14436576plg.432.2022.04.06.01.44.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 01:44:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n5pAdb4H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1D8FC565E36; Wed, 6 Apr 2022 01:30:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1578023AbiDEXSC (ORCPT + 99 others); Tue, 5 Apr 2022 19:18:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353417AbiDEKGK (ORCPT ); Tue, 5 Apr 2022 06:06:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0564ABF953; Tue, 5 Apr 2022 02:55:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9A49CB818F6; Tue, 5 Apr 2022 09:54:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBAE6C385A3; Tue, 5 Apr 2022 09:54:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152498; bh=VpvgJUPwkPLk9GTxl57w4IvFsD7R7c3aMkC2Vn9EM7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n5pAdb4H8Rvq8oFXpw8Tk5YzklZ1UuPrTt5MDGGaHeUz9OOtsJvrovkny3a0QOR0G ctsVeRe+bMlYhU5bVDI5G1M6Mw87sFdFrRyaLdyIf2Sq4sxvEoFfhL8LaKzT38tvCi +QKkscN1aZSttLTCknR2lsIKjL5CNnqstUOri9G4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joe Carnuccio , Nilesh Javali , "Martin K. Petersen" Subject: [PATCH 5.15 799/913] scsi: qla2xxx: Check for firmware dump already collected Date: Tue, 5 Apr 2022 09:31:01 +0200 Message-Id: <20220405070403.781945178@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joe Carnuccio commit cfbafad7c6032d449a5a07f2d273acd2437bbc6a upstream. While allocating firmware dump, check if dump is already collected and do not re-allocate the buffer. Link: https://lore.kernel.org/r/20220110050218.3958-17-njavali@marvell.com Cc: stable@vger.kernel.org Signed-off-by: Joe Carnuccio Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_init.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -3463,6 +3463,14 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *v struct rsp_que *rsp = ha->rsp_q_map[0]; struct qla2xxx_fw_dump *fw_dump; + if (ha->fw_dump) { + ql_dbg(ql_dbg_init, vha, 0x00bd, + "Firmware dump already allocated.\n"); + return; + } + + ha->fw_dumped = 0; + ha->fw_dump_cap_flags = 0; dump_size = fixed_size = mem_size = eft_size = fce_size = mq_size = 0; req_q_size = rsp_q_size = 0;