Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9111705pxu; Mon, 28 Dec 2020 06:57:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJygSSp03mrBqNjNFdzTMViA+f3jlEVMwE9aKVP0x/eCmRueY8AA7c24j8NBQR+6PAB7A7A/ X-Received: by 2002:a17:906:eb49:: with SMTP id mc9mr40647342ejb.487.1609167451471; Mon, 28 Dec 2020 06:57:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609167451; cv=none; d=google.com; s=arc-20160816; b=eIsSiH5epf2dMO/yu7HkulsO3OqGZ9JyVsGCSkF2kxAnWRPwTygO9sZXowbMT4PMK+ zrvtmmevqycdJ6GNAJoZyHFZgVFX/cLG854tNQClT1A/1lytU9M3aAcwitPRPt5W9q7C 4xP28ZpT9gqCimlbFYxRoGxGDASV7kVyCmy7hIp+wBaPWGFjwXqQQbyuio83uSinncjs bZ71YlLRurQyqznxJBqAkkF0M30H1mVTKPtPdJa6PnSb99CyHH7LBfT6EvABKAp/jZYG 2K76Dz2Lvr5J65goolHC1/0D13GPTZYWdUQAxyH0DCojT9r1KDc5MC+k2HP32NvfLOvp gl2g== 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=QOWOhHM+uwfSvDVtGMbTd4YccrTBZmMvccK+DR4/yCk=; b=qr6RSKEq6dBDKH1QVD0C9D33ed+uYd1pl6by+oZqcQp634WkqjHMdNhyCw+0LQTzBZ eUPrp5SYzVRNGCUktGZSPO3r7uqFFFJJnbGmdU8ins3+dSCNnyXsFG12mQ6r/A7uZ7My mlt/tgq+tepRyhouZFPGiT/SNkRKmqlmDnDWl/6Ra34Wvma2odNundOlGsnP27MOm656 cbQpAowbxxZi+UvpwFg7oJnRUPZhP+mpnU+PUjhWhkn6CdtNa6F0eg08F2yyjK3AaG3b lrgXBSn5OPtPvphtylkcae+UESceihv86N1xmCN63IIOqRdC1KvOGTlgDK90W6XxEkgY tGfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pNzApnGR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt5si19289413ejb.639.2020.12.28.06.57.08; Mon, 28 Dec 2020 06:57:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pNzApnGR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391817AbgL1ORc (ORCPT + 99 others); Mon, 28 Dec 2020 09:17:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:52078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391802AbgL1OR2 (ORCPT ); Mon, 28 Dec 2020 09:17:28 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id A6BD5206D4; Mon, 28 Dec 2020 14:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165033; bh=Yd9oCDHvXydzN29nOp7x6zy+P2ktIVDoGN93GaZerrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pNzApnGRCtwGWE7WgMKGYtPffeMsT+dNY/wIE3fxMN23B0SMPKLGYj/q7ETrWx3vV Uob0Ph5c05IFrHkfllammf8TeKXnp4aJ7hq1kFJet38BJgY499KbbApfjp1fWajw0l KMeHBrf889Af2+50zoJhHC2D5bWB97/tWr/UtxrU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Gabay , Johannes Berg , Luca Coelho , Sasha Levin Subject: [PATCH 5.10 387/717] iwlwifi: dbg-tlv: fix old length in is_trig_data_contained() Date: Mon, 28 Dec 2020 13:46:25 +0100 Message-Id: <20201228125039.546474151@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg [ Upstream commit 58a1c9f9a9b6b9092ae10b84f6b571a06596e296 ] There's a bug in the lengths - the 'old length' needs to be calculated using the 'old' pointer, of course, likely a copy/paste mistake. Fix this. Reported-by: Daniel Gabay Signed-off-by: Johannes Berg Fixes: cf29c5b66b9f ("iwlwifi: dbg_ini: implement time point handling") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20201209231352.c0105ddffa74.I1ddb243053ff763c91b663748b6a593ecc3b5634@changeid Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c index 51ce93d21ffe5..8fa1c22fd96db 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c @@ -808,7 +808,7 @@ static bool is_trig_data_contained(struct iwl_ucode_tlv *new, struct iwl_fw_ini_trigger_tlv *old_trig = (void *)old->data; __le32 *new_data = new_trig->data, *old_data = old_trig->data; u32 new_dwords_num = iwl_tlv_array_len(new, new_trig, data); - u32 old_dwords_num = iwl_tlv_array_len(new, new_trig, data); + u32 old_dwords_num = iwl_tlv_array_len(old, old_trig, data); int i, j; for (i = 0; i < new_dwords_num; i++) { -- 2.27.0