Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp721424pxb; Tue, 5 Apr 2022 20:18:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyHxyT09xgQxQLNYSlNDzprv+m34w6arkapsTJbNfN46IhEdT0KJFDHsLec9aacIGYG0nu X-Received: by 2002:a17:902:e545:b0:154:4d5b:2006 with SMTP id n5-20020a170902e54500b001544d5b2006mr6606158plf.94.1649215087214; Tue, 05 Apr 2022 20:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649215087; cv=none; d=google.com; s=arc-20160816; b=e53aR8DRKHndvury+9NoB1R0nWPlN+0Fqjvo/Cs4zGn4+Ier6xLBeihrH4WNgq7e6N aHUp4YMzN/axNFo6kL/JWW+YlmheaGhg2XF0NeBQxvRPUc/Ajpco11WQgDfz0YY68cbg 4QSrBiNDQxh45OF19WG7o4Ue7FlZmo2dtVSL+xp+uZ5wZMvT0t1zsq89Qq0Hx9/oyoIs C900qXpikmIQiN0lCmf6k/F+iSVPFkF6jGRDZi6YtJm7KTwBAGwBcxzcAGMJ60lIXVuQ 0EjwwIv7dyc4aoiguKN8N0i56oRuQ9xj1mEGiDQkgM4SL5K89JtA9vxBJyz8BvsnWt/W 8IBg== 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=EZk3yAuc+RsiolWzVtTv1lyrynAzZAnd/v25com5LdFCgMtZ2UUgb/m8kX87LszhaQ hbXA5vikTn5oDFV3NQJy4svsPVE7R37ifUjLaqUkO1tFGgCxE8gn1YBp+z3vyVFyrqJD m2HA2bsCjPrnfTPAh6n9Ehw+U7JnymPeIr+CU5oQevLx/FfA5wlxk6iOvo+WNcle788L rEVmnAa/qfwja8X/Olxr6s0HnsTLDnoiYpVAdIX2oQNGHQRgwpKAB5oOiP2EmJEvzWko vDbMg79HlOsgLqUX2H3Rm5M7+VwJVSOgqdJ9V12xxR7tPthRS8lIcdgTSxAB/I+nyJAi ta+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fMmmA1kb; 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 b23-20020a63eb57000000b0038245e35ac0si16541351pgk.772.2022.04.05.20.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 20:18:07 -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=fMmmA1kb; 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 C510B15AAFE; Tue, 5 Apr 2022 19:54:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345384AbiDEKlL (ORCPT + 99 others); Tue, 5 Apr 2022 06:41:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240354AbiDEIby (ORCPT ); Tue, 5 Apr 2022 04:31:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B8976FA21; Tue, 5 Apr 2022 01:24:21 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4B9FC60FFB; Tue, 5 Apr 2022 08:24:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61EF0C385A0; Tue, 5 Apr 2022 08:24:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649147045; bh=gKjV3QLPv6TeU0BZhoxIGrkmjtEcGY8pEsjKlh+Y7xY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fMmmA1kbMLWccjQJkW4E2Ci/gZHkrt96z7JRKv77cbYrlQjIMY6muNThVnFj+Bofp mc4hiROlnChCbe8BcjeMhd7aDIQAVyw4FXjk1MW6RjnT5T73MO9vjXk9n2comORmMc Wnzv6I4Ny7sX7x7OFghtdzsJLyLBiRpwHPAk54EQ= 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.17 0982/1126] scsi: qla2xxx: Check for firmware dump already collected Date: Tue, 5 Apr 2022 09:28:49 +0200 Message-Id: <20220405070436.323124241@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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;