]> git.ipfire.org Git - thirdparty/linux.git/commit
ethtool: module: check fw_flash_in_progress under rtnl_lock
authorJakub Kicinski <kuba@kernel.org>
Fri, 22 May 2026 23:13:07 +0000 (16:13 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 May 2026 15:19:32 +0000 (08:19 -0700)
commit504eaefa44c8dec50f7499edcb36d24f3aefab2a
treeb760ec2e2e943760be8a8615999067c414cb2e93
parent7a84b965ffc12030af63cd10a8f3a1123ff39b7a
ethtool: module: check fw_flash_in_progress under rtnl_lock

ethnl_set_module_validate() inspects module_fw_flash_in_progress
but validate is meant for _input_ validation, not state validation.
rtnl_lock is not held, yet. Move the check into ethnl_set_module().

Fixes: 32b4c8b53ee7 ("ethtool: Add ability to flash transceiver modules' firmware")
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Danielle Ratson <danieller@nvidia.com>
Link: https://patch.msgid.link/20260522231312.1710836-5-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ethtool/module.c