linux-yocto/net/ethtool
Maxime Chevallier ec9faff49a net: ethtool: Don't call .cleanup_data when prepare_data fails
[ Upstream commit 4f038a6a02 ]

There's a consistent pattern where the .cleanup_data() callback is
called when .prepare_data() fails, when it should really be called to
clean after a successful .prepare_data() as per the documentation.

Rewrite the error-handling paths to make sure we don't cleanup
un-prepared data.

Fixes: c781ff12a2 ("ethtool: Allow network drivers to dump arbitrary EEPROM data")
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250407130511.75621-1-maxime.chevallier@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-25 10:43:25 +02:00
..
bitset.c ethtool: Fix wrong mod state in case of verbose and no_mask bitset 2024-12-14 19:54:23 +01:00
bitset.h
cabletest.c
channels.c
coalesce.c
common.c
common.h
debug.c
eee.c
eeprom.c
features.c ethtool: netlink: Add missing ethnl_ops_begin/complete 2024-01-25 15:27:51 -08:00
fec.c
ioctl.c ethtool: check device is present when getting link settings 2024-09-04 13:25:01 +02:00
linkinfo.c
linkmodes.c
linkstate.c ethtool: netlink: do not return SQI value if link is down 2024-07-18 13:18:35 +02:00
Makefile
module.c
netlink.c net: ethtool: Don't call .cleanup_data when prepare_data fails 2025-04-25 10:43:25 +02:00
netlink.h
pause.c
phc_vclocks.c
privflags.c
pse-pd.c
rings.c
stats.c
strset.c
tsinfo.c
tunnels.c
wol.c