From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6B41D73E84 for ; Thu, 29 Jan 2026 19:03:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 4D93C40CB3; Thu, 29 Jan 2026 19:03:40 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Q-igH527bHgp; Thu, 29 Jan 2026 19:03:38 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4491F40C92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1769713418; bh=A6kTyM3GeRdLGQZI7pzMmWc5l+zbSMFzRj+5AluvRlk=; h=Date:To:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=Y/NRIZChYJFXkv0fYdXcF4Za5BysyUGU3nkABqX1ULVT5HdcDFwEwv+OEGVmZrUR3 bd6i7GgmfrWm6jZaMRLVHivSk5lP/260iO24vctN2vTU2jS/+pgTPI/Y0M4WlhebCO jtFz6kpZyXG39dO8fhwQz/dmH5aIcD8ojlBVhg5qF/0rmx3akLBFcaeHScmxdgqGaM YSRamQ6Nzzm62ymzT6CBS31+/lCZhM1MkdErC4/H3h/K/ryojqL93O4y2dflGCNhUq IA0k0AaYM8qtt1MOInAuIxx1j3c39awAUg9aD4/qmDIqcN6TzGGVxBXlIEs196eI8s wmzg80xxHwCog== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 4491F40C92; Thu, 29 Jan 2026 19:03:38 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists1.osuosl.org (Postfix) with ESMTP id 1AC611BD for ; Thu, 29 Jan 2026 19:03:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 003B2606CF for ; Thu, 29 Jan 2026 19:03:37 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id cj_6iwFmi2fK for ; Thu, 29 Jan 2026 19:03:36 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=95.215.58.186; helo=out-186.mta1.migadu.com; envelope-from=vadim.fedorenko@linux.dev; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org CEEF2606C2 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org CEEF2606C2 Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) by smtp3.osuosl.org (Postfix) with ESMTPS id CEEF2606C2 for ; Thu, 29 Jan 2026 19:03:35 +0000 (UTC) Message-ID: Date: Thu, 29 Jan 2026 19:03:23 +0000 MIME-Version: 1.0 To: Petr Oros , netdev@vger.kernel.org References: <20260129095723.7269-1-poros@redhat.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20260129095723.7269-1-poros@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1769713409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A6kTyM3GeRdLGQZI7pzMmWc5l+zbSMFzRj+5AluvRlk=; b=BH4gOlPeEIUSOMSfF0ZSaktXankCYoXjWR7kR3Gq6q9oZjue6jSZMrhFWclFii4eZOq3m0 oi3CzQtLh8F/cyGX8WAYu0RQHwCvsQbjq+Hzg5+qu5JCtrWgv1DBe1qRWvE8AbFA/fTDaf 0BnQjqlZbHiZoj6EFANNY2sJLEGWfUA= X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=BH4gOlPe Subject: Re: [Intel-wired-lan] [PATCH net] iavf: fix PTP use-after-free during reset X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ivecera@redhat.com, Przemek Kitszel , Richard Cochran , linux-kernel@vger.kernel.org, Andrew Lunn , Eric Dumazet , Tony Nguyen , Simon Horman , Mateusz Polchlopek , Jacob Keller , Jakub Kicinski , Paolo Abeni , "David S. Miller" , intel-wired-lan@lists.osuosl.org Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On 29/01/2026 09:57, Petr Oros wrote: > Commit 7c01dbfc8a1c5f ("iavf: periodically cache PHC time") introduced a > worker to cache PHC time, but failed to stop it during reset or disable. > > This creates a race condition where `iavf_reset_task()` or > `iavf_disable_vf()` free adapter resources (AQ) while the worker is still > running. If the worker triggers `iavf_queue_ptp_cmd()` during teardown, it > accesses freed memory/locks, leading to a crash. > > Fix this by calling `iavf_ptp_release()` before tearing down the adapter. > This ensures `ptp_clock_unregister()` synchronously cancels the worker and > cleans up the chardev before the backing resources are destroyed. > > Fixes: 7c01dbfc8a1c5f ("iavf: periodically cache PHC time") > Signed-off-by: Petr Oros > --- > drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++++ > 1 file changed, 4 insertions(+) Reviewed-by: Vadim Fedorenko