mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: ethtool: reject an out of range hwtstamp provider index
A provider index of 0xFFFFFFFF picks a provider on hardware that has none. phc_index is an int where -1 means no PHC, and the u32 from user space ends up as -1, so the two match. TSINFO_GET uses -1 for "no provider requested" and answers with the default provider instead of an error. Reject the value in the netlink policy, which covers every comparison site. Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de> Reviewed-by: Kory Maincent <kory.maincent@bootlin.com> Link: https://patch.msgid.link/20260925135237.3432266-2-nb@tipi-net.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
0a1a3898ab
commit
67da300938
1 changed files with 7 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue