Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp604850pxb; Tue, 5 Apr 2022 15:41:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXyqkPKzDUVulixjzCefxieDF2X71yYbquAtSqr67AhVNjpxthqIwGJ6JurYY6LLyKzA/p X-Received: by 2002:a17:902:d2d0:b0:156:c07d:8228 with SMTP id n16-20020a170902d2d000b00156c07d8228mr5564597plc.27.1649198516602; Tue, 05 Apr 2022 15:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649198516; cv=none; d=google.com; s=arc-20160816; b=egJVoBlehEqo5zBoxsiqKdQ+kQL+uwVEshOWJ1pxxJG9zX/kNfEwCXilJ+JEJWoJ97 jyoGs+o5mxcyo/elQFhJOF68F9fRQdg08CMMZPGj62YIue1i6v74ZVMvOOw5LZB3nkgk ie0favqPg752Jn27+JarHhPZHvFSvW2H5+k3901yzqkn5pGDeFL9dceggKbqrykfcfKZ k+nXDknGF98mh0FSEoKVy7BMC2e3Tu8VgTCnz3ohh9t2FBEd8KZaSa2Z1C+ougnvn1mS WeSr+3jO/K8zwXKkcTX021nmicH3BAkm5vRXsMbfofIEmondjyPgCvTi16a0Bfn3MRcF c5VQ== 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=HkCvUj4iZxvBsd1JFgMUu03CVpaNGEhnbAtcyrkdPGw=; b=mbfGpItPQ46k6/eZWkGgWFm9/6GiM+4XFDpm/EeHkWrOSQbqJSsOpbgkFdpyWE7ueA dfVbkuJTGhVG0r10EQWvdG7tyJa9bXdQcYijV/kUsyiSmeSdmIqjrmIW9eQxolaOS4pn vdHqUigLTQCri/aovTQT4pHi3vqIP/p/vcPPQUiEfeiQJ0qBOUxDBLg7K5T+A5WcqXvM 2Jjq9LCT9Qplnpe8VPdhIXNY6yB7R0WnrYyFeMpvH779mTm5aBgRezpilXhSP/suLnV4 3QCCCKpWrDJBsvqTvXKCn+NsDYWKyYTeTuOj8dE4AjBgPXWOzDcdseduozBfcW3nurOt XCAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WIuQ6gC4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id w26-20020a63161a000000b003816043f130si14138478pgl.805.2022.04.05.15.41.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 15:41:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WIuQ6gC4; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 5897D25297; Tue, 5 Apr 2022 15:23:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384017AbiDENbv (ORCPT + 99 others); Tue, 5 Apr 2022 09:31:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345711AbiDEJW6 (ORCPT ); Tue, 5 Apr 2022 05:22:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A81C6A420; Tue, 5 Apr 2022 02:11:55 -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 121C2B81A12; Tue, 5 Apr 2022 09:11:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 615E9C385A0; Tue, 5 Apr 2022 09:11:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149912; bh=gKjV3QLPv6TeU0BZhoxIGrkmjtEcGY8pEsjKlh+Y7xY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WIuQ6gC4NQouZRUI0/eMeW1Qs5aN0yz5NOasamW/pl4A4d5FiiyIPbpqZbyEdbqO5 LME5yv3b4unOBJkB61yYkJUCsvp89r7T2jN290WJTmEEw5wXQeUxq7kpRxOWy/p6gI E/7JQGF99ZWkm4ETV0KfIZDnk8EshEO0zFNeNc8o= 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.16 0887/1017] scsi: qla2xxx: Check for firmware dump already collected Date: Tue, 5 Apr 2022 09:30:00 +0200 Message-Id: <20220405070420.559766029@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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 @@ -3482,6 +3482,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;