ethtool: pse-pd: move pse validation into set
authorDiogo Jahchan Koike <djahchankoike@gmail.com>
Thu, 29 Aug 2024 18:48:27 +0000 (15:48 -0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 30 Aug 2024 19:14:57 +0000 (12:14 -0700)
commitcff69f72d33318f4ccfe7d5ff6c5616d00dd45a7
treebcbc1a2197e85b646c072391d3313385af0a45c4
parent6af91e3d2cfc8bb579b1aa2d22cd91f8c34acdf6
ethtool: pse-pd: move pse validation into set

Move validation into set, removing .set_validate operation as its current
implementation holds the rtnl lock for acquiring the PHY device, defeating
the intended purpose of checking before grabbing the lock.

Reported-by: syzbot+ec369e6d58e210135f71@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=ec369e6d58e210135f71
Fixes: 31748765bed3 ("net: ethtool: pse-pd: Target the command to the requested PHY")
Signed-off-by: Diogo Jahchan Koike <djahchankoike@gmail.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20240829184830.5861-1-djahchankoike@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/pse-pd.c