Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp845506pxb; Wed, 1 Sep 2021 11:08:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6JRdfeAahJJ/S8Y1INdTojUroyLz+SqCgUNQP/cFdDlW473Ec8gDvUrcU5fFGQJCmEcii X-Received: by 2002:a02:93aa:: with SMTP id z39mr739069jah.29.1630519716276; Wed, 01 Sep 2021 11:08:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630519716; cv=none; d=google.com; s=arc-20160816; b=OcJE7hZcym1ijECjQqQZYuJ4B0eO64JSIO+K+FhgL/tz2oHKz7mx25wt+y7a/577R2 975SAQ9ozdHg1tIy6OOxSlWRso4fy1zcugjpGz7y5JKXWFWP10+0h5OLEpTAGAFGJW89 88cGfLcBWmDbib9Cdki3DrQWqvXKErhCKb6MfhD9kph2R509Jagk72cXTaY0F0WaGClH YzR3ymZRZgY0tLdEiQa9jtF2KbkXzzRn0bBr5J30f9VDtVF4IyCWMTv/m5cKkvTxrYgh hFqGTDGsj7wVpgGr3vAbNRig/qL8DqVkJkIa1JaoTlZQcgKthvNHaGJAZCUsUqlEWpO2 LfwQ== 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 :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=JGJFdApMcubNDWvC7wCYe/neX6g9lSnZlMWbSWb6VQQ=; b=m22CQAmSpCBfUEm8tuTESf5Po4M/0eJV0K8KtfbJRJmy/Icb5BEXwYFxUdJctH2T7f dNubppPVHuHlc16LVHD3Sckkdd0dQ3i/E9Zj+wZ8RaeGtyDzRvpMJwOoC5YaDBJnWQMy MWTH+bA0r7KCY7lF0Vp7FDPnaOSJ0aFmcSL3efaisbKHbczavMdva6ps4ZiK3T6SI1xn QpkMvQS5kNUh/OW9V3BBU1AlsvtypYmKR/VYba7r6NgDmwkLzlFn8EaVM4LIa/iHqtET cc8fWdzhddNfuAoABFapRwr8mtvWZKYOktQq6f4c8Quq1LW6bfuLvzdvi7KDWP6LwG8j BICg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Ur35WI6b; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x5si270752ila.106.2021.09.01.11.08.22; Wed, 01 Sep 2021 11:08:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@mediatek.com header.s=dk header.b=Ur35WI6b; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346703AbhIASHw (ORCPT + 99 others); Wed, 1 Sep 2021 14:07:52 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:57902 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1346734AbhIASHv (ORCPT ); Wed, 1 Sep 2021 14:07:51 -0400 X-UUID: 62de42abce6d4f228f00c53115857dc6-20210902 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=JGJFdApMcubNDWvC7wCYe/neX6g9lSnZlMWbSWb6VQQ=; b=Ur35WI6b93Vt0goLnNy7P0aVSgLl0QfsFqUtu7BacGCPDxLtH7Y59rbFUpO89t7mbny9cnSvQHTruxnUQiFFASq2huV8s72n8JQPcu4/UTUKWPnVQho14Sg9wYo+85NcuroaXsgq+aF9b6aNFY42ygXXAmxELBWgLk6x+r/TEfg=; X-UUID: 62de42abce6d4f228f00c53115857dc6-20210902 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2042623059; Thu, 02 Sep 2021 02:06:50 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Sep 2021 02:06:49 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Sep 2021 02:06:49 +0800 Message-ID: <32b9ac1244f38d20f89548b14aa8d2afb0fa779b.camel@mediatek.com> Subject: Re: [PATCH v5 1/2] mt76: mt7915: fix hwmon temp sensor mem use-after-free From: Ryder Lee To: Ben Greear , Felix Fietkau CC: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , , Date: Thu, 2 Sep 2021 02:06:49 +0800 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org T24gV2VkLCAyMDIxLTA5LTAxIGF0IDEwOjU1IC0wNzAwLCBCZW4gR3JlZWFyIHdyb3RlOg0KPiBP biA5LzEvMjEgMTA6NDkgQU0sIFJ5ZGVyIExlZSB3cm90ZToNCj4gPiBGcm9tOiBCZW4gR3JlZWFy IDxncmVlYXJiQGNhbmRlbGF0ZWNoLmNvbT4NCj4gPiANCj4gPiBXaXRob3V0IHRoaXMgY2hhbmdl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