]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mscc: ocelot: improve handling of TX timestamp for unknown skb
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 5 Dec 2024 14:55:16 +0000 (16:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Dec 2024 17:08:54 +0000 (18:08 +0100)
commit5422e628aefe8413548c32627f35a228f2a3c990
treee8dd708c7e8d0a18011fb81561b2efcc449397ef
parent534ad1c380b7a00e8f9ef11316b6b892731b4d4e
net: mscc: ocelot: improve handling of TX timestamp for unknown skb

[ Upstream commit b6fba4b3f0becb794e274430f3a0839d8ba31262 ]

This condition, theoretically impossible to trigger, is not really
handled well. By "continuing", we are skipping the write to SYS_PTP_NXT
which advances the timestamp FIFO to the next entry. So we are reading
the same FIFO entry all over again, printing stack traces and eventually
killing the kernel.

No real problem has been observed here. This is part of a larger rework
of the timestamp IRQ procedure, with this logical change split out into
a patch of its own. We will need to "goto next_ts" for other conditions
as well.

Fixes: 9fde506e0c53 ("net: mscc: ocelot: warn when a PTP IRQ is raised for an unknown skb")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20241205145519.1236778-3-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mscc/ocelot_ptp.c