ethtool: eeprom: add missing ethnl_ops_begin() / _complete() during fallback
All ethtool driver op calls should be sandwiched between
ethnl_ops_begin() / ethnl_ops_complete(). In Netlink eeprom code,
if the paged access failed we fall back to old API, but we
first call _complete() and the fallback never does its own
ethnl_ops_begin(). Move the fallback into the _begin() / _complete()
section.
Fixes: 96d971e307 ("ethtool: Add fallback to get_module_eeprom from netlink command")
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20260526153533.2779187-10-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
master
parent
a8d8bef6b4
commit
2376586f85
|
|
@ -141,12 +141,11 @@ static int eeprom_prepare_data(const struct ethnl_req_info *req_base,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_ops:
|
err_ops:
|
||||||
|
if (ret == -EOPNOTSUPP)
|
||||||
|
ret = eeprom_fallback(request, reply);
|
||||||
ethnl_ops_complete(dev);
|
ethnl_ops_complete(dev);
|
||||||
err_free:
|
err_free:
|
||||||
kfree(page_data.data);
|
kfree(page_data.data);
|
||||||
|
|
||||||
if (ret == -EOPNOTSUPP)
|
|
||||||
return eeprom_fallback(request, reply);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue