Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp373674rwb; Thu, 22 Sep 2022 00:19:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7jSyPi7fNZ9g4qPQKt465uwlIeI6h7h3CcV/qUBKffGu6xTrMzMsQ1Q8wcQKTlfo8Hzr+C X-Received: by 2002:a50:ef03:0:b0:453:b5f6:5a0b with SMTP id m3-20020a50ef03000000b00453b5f65a0bmr1828845eds.101.1663831152914; Thu, 22 Sep 2022 00:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663831152; cv=none; d=google.com; s=arc-20160816; b=H3cI5eRBCGHfewn7Sbek4/KIrg/qdTNKdyMrqIFNwP4Viuw0TVujQY1aJnsMo4i29l ePeh6FlXL3J1epfBFcsOSrtr/KKbdUke3PnqHFFDWBYJPgXtzRx6qQVaLU+GSAzZ4S9m 3a0HLGTY14/m8S5GgeVgJKrSrLz2uZm26UjTffwJJQc0juTe+ZkBNaQwsroVsyKCUZNg pWjqU4r73yY+LAhyONvWzpt2cDj+zK1IPzkAE+bObta+g4hgvdgAJPWfs1Tr6rvrq+EM Q1gZ+B574RtfXo+R7/foHhfj7DnHNLSiPVt4BHInBerI+NFTzJOclwCesiyia8g47D4T ZauQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=2XBVncG2wMvDw+qa1UdJYBf3BhEfW0A14osnaSkMhmc=; b=WrL5418Xcsh7U7UVpwnNqFblE3KnPPSubzHyjpjPfVCq0tzq0F/+hjhDqOvT3RNsz3 yOF77I9fo73kaW1NEHRWmK7vZxnnNxFkrMfPCJHuZnrVhBgS6pF4MNmuNkS6lQJg2ItA q1hIVWEFAVdP5I9iFu36yUW80/tmNGjjTdxPSJXTrcs45dW1rERUhNVAk9XcCPeOz5U7 5zG5NE9ZYx0gIgpOI/8japM/HqOmi2X+SxMYZ17UNLcEjEuZF2bEdgCz4mnOj+9e6jpE 9sCPSSTx3h1U68JyPXKgOz0qEDwcxfpyAZuk2A17mXfY2SvUqyee7ORFJZ8l1B6ZvHQF 8KhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="b9IHPC/j"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk24-20020a170907767800b00780ada03a85si3620301ejc.61.2022.09.22.00.18.56; Thu, 22 Sep 2022 00:19:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="b9IHPC/j"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230368AbiIVHSQ (ORCPT + 63 others); Thu, 22 Sep 2022 03:18:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230316AbiIVHSP (ORCPT ); Thu, 22 Sep 2022 03:18:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBD6EEE15 for ; Thu, 22 Sep 2022 00:18:14 -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 612026288B for ; Thu, 22 Sep 2022 07:18:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE8C9C433D6; Thu, 22 Sep 2022 07:18:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663831093; bh=LczCGyYUtgLHBheWTd2v0OQvFzS3TqRlUwYWCvFwhis=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=b9IHPC/jDIKu3a1VDbmH1Jxz6eh4p4pHjK/jd8XFyvGl7wdMcUnF1cCiQpY44EIT9 H34rNIzr8H1b9xj/N3rj9zEd4NWtd51CGBd3/LqxbfKCpHtttKSV6brPiVpiiEoJc0 q5luePp66qRDtBvujzZvfLQJKNho2bNbwReYV+/6PVjd+5Mgr1i4OXGcXHFsEQU8ch dMsD0uObbyZYwHmVTWIHAF8clhTVcPt2Cu1nby4TgwB57e+l1ytYTxkA1e0tGx6ZrR 70QZH9Wx52pz3BUeTzM0R3SwI+pH9NQmdocRNcNKVn3frV7x4bIz/IuN43LsF/brSA b0YZHkV19TrTw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v2] ath10k: reset pointer after memory free to avoid potential use-after-free From: Kalle Valo In-Reply-To: <20220505092248.787-1-quic_wgong@quicinc.com> References: <20220505092248.787-1-quic_wgong@quicinc.com> To: Wen Gong Cc: , , User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <166383109059.28267.2524811686657433761.kvalo@kernel.org> Date: Thu, 22 Sep 2022 07:18:12 +0000 (UTC) X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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-wireless@vger.kernel.org Wen Gong wrote: > When running suspend test, kernel crash happened in ath10k, and it is > fixed by commit b72a4aff947b ("ath10k: skip ath10k_halt during suspend > for driver state RESTARTING"). > > Currently the crash is fixed, but as a common code style, it is better > to set the pointer to NULL after memory is free. > > This is to address the code style and it will avoid potential bug of > use-after-free. > > Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 > Signed-off-by: Wen Gong > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 1e1cb8e0b73e wifi: ath10k: reset pointer after memory free to avoid potential use-after-free -- https://patchwork.kernel.org/project/linux-wireless/patch/20220505092248.787-1-quic_wgong@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches