From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 880192E266C; Sat, 17 Oct 2026 17:20:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792257639; cv=none; b=WmV+YSDfLvb1mlnQcytqAP5LwV5d8xWQjtLhYkIzUbovX4mmwHk3M0wln4uylVDVIfVnLAoxSGtHpf8aBXrzxV8YjHB35lzhkfSZ07u7ENU5c3G/RXnp2XznUrZceVD0pkRRE2LaGCawTRVpgn86uillOEZ0/6jZxQzzw6AS6fQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792257639; c=relaxed/simple; bh=88vilMPircDXuHT19U7p33WqRu8kTepfA9okL/xxbdA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ldQvz2CHLAdfMAJ94tLkIAOuvPli3hdWXQgtmoyiiTL0tUxq6Gi43CZ5nAxZzlVy6V57Qqa7lmexcb2C/P3VK7WE4IlXNhtKDQYCaHcu1LdHd7hnG6ETYVyicUqsiTiGey9io3qjb9n/pgQzBcLFkLySKt/5jihptEKH+Lcrsrk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AFch6dWg; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AFch6dWg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B2251F000C4; Sat, 17 Oct 2026 17:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792257638; bh=7HvbuhBhGdTq4L7Ta4Yor0/IT9wKCQddHbQnDmlscsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AFch6dWgkkQQpCKPFBQB06d0EJy+jfpGXGuvbFt5odYnrNq4uI1+yBg21iVChJFux ndmhiN7DUbEW7UKon4yW7At5IWpsrOHWXzqfJ1RMqTZuGLN31GAaP09HMUWA72Q3oU vEUnwcKfm6KreeUGw9YtfozIg56jLRyW5HS/SCgE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Przemek Kitszel , Jacob Keller , Karol Kolacinski , Simon Horman , Tony Nguyen , Jakub Kicinski , Sasha Levin , Pucha Himasekhar Reddy Subject: [PATCH 6.6 0624/1674] ice: Dont process extts if PTP is disabled Date: Sat, 17 Oct 2026 17:48:16 +0200 Message-ID: <20261017160447.101399151@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261017160431.119607952@linuxfoundation.org> References: <20261017160431.119607952@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jacob Keller [ Upstream commit 996422e3230e41468f652d754fefd1bdbcd4604e ] The ice_ptp_extts_event() function can race with ice_ptp_release() and result in a NULL pointer dereference which leads to a kernel panic. Panic occurs because the ice_ptp_extts_event() function calls ptp_clock_event() with a NULL pointer. The ice driver has already released the PTP clock by the time the interrupt for the next external timestamp event occurs. To fix this, modify the ice_ptp_extts_event() function to check the PTP state and bail early if PTP is not ready. Fixes: 172db5f91d5f ("ice: add support for auxiliary input/output pins") Reviewed-by: Przemek Kitszel Signed-off-by: Jacob Keller Signed-off-by: Karol Kolacinski Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://patch.msgid.link/20240702171459.2606611-3-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_ptp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c index 0da6b47f5b527..f738e35395741 100644 --- a/drivers/net/ethernet/intel/ice/ice_ptp.c +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c @@ -1477,6 +1477,10 @@ void ice_ptp_extts_event(struct ice_pf *pf) u8 chan, tmr_idx; u32 hi, lo; + /* Don't process timestamp events if PTP is not ready */ + if (!test_bit(ICE_FLAG_PTP, pf->flags)) + return; + tmr_idx = hw->func_caps.ts_func_info.tmr_index_owned; /* Event time is captured by one of the two matched registers * GLTSYN_EVNT_L: 32 LSB of sampled time event -- 2.53.0