linux/net/ethtool
Maxime Chevallier 1ad84a151a net: ethtool: phy: Don't set the context dev pointer for unfiltered DUMP
The context info allows continuing DUMP requests, shall they fill the
netlink buffer.

In the case of filtered DUMP requests, a reference on the netdev is
grabbed in the .start() callback and release in .done().

Unfiltered DUMP request don't need the dev pointer to be set in the context
info, doing so will trigger an unwanted netdev_put() in .done().

Reported-by: syzbot+e9ed4e4368d450c8f9db@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/000000000000d3bf150621d361a7@google.com/
Fixes: 17194be4c8 ("net: ethtool: Introduce a command to list PHYs on an interface")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20240913100515.167341-1-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-09-13 21:40:12 -07:00
..
bitset.c
bitset.h
cabletest.c net: ethtool: cable-test: Release RTNL when the PHY isn't found 2024-08-28 17:18:53 -07:00
channels.c ethtool: refactor checking max channels 2024-08-09 21:52:13 -07:00
cmis_cdb.c net: ethtool: Enhance error messages sent to user space 2024-09-13 21:12:27 -07:00
cmis_fw_update.c net: ethtool: Allow write mechanism of LPL and both LPL and EPL 2024-08-15 12:20:14 +02:00
cmis.h ethtool: cmis_cdb: Remove unused declaration ethtool_cmis_page_fini() 2024-08-06 12:16:58 -07:00
coalesce.c
common.c netdev: support binding dma-buf to netdevice 2024-09-11 20:44:31 -07:00
common.h ethtool: refactor checking max channels 2024-08-09 21:52:13 -07:00
debug.c
eee.c
eeprom.c
features.c
fec.c
ioctl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-29 11:49:10 -07:00
linkinfo.c ethtool: Don't check for NULL info in prepare_data callbacks 2024-08-01 09:03:52 -07:00
linkmodes.c ethtool: Don't check for NULL info in prepare_data callbacks 2024-08-01 09:03:52 -07:00
linkstate.c
Makefile net: ethtool: Introduce a command to list PHYs on an interface 2024-08-23 13:04:34 +01:00
mm.c
module_fw.h
module.c
netlink.c net: ethtool: Introduce a command to list PHYs on an interface 2024-08-23 13:04:34 +01:00
netlink.h net: ethtool: Introduce a command to list PHYs on an interface 2024-08-23 13:04:34 +01:00
pause.c
phc_vclocks.c
phy.c net: ethtool: phy: Don't set the context dev pointer for unfiltered DUMP 2024-09-13 21:40:12 -07:00
plca.c net: ethtool: plca: Target the command to the requested PHY 2024-08-23 13:04:34 +01:00
privflags.c
pse-pd.c ethtool: pse-pd: move pse validation into set 2024-08-30 12:14:57 -07:00
rings.c
rss.c ethtool: rss: support skipping contexts during dump 2024-08-12 14:16:24 +01:00
stats.c
strset.c net: ethtool: strset: Allow querying phy stats by index 2024-08-23 13:04:35 +01:00
tsinfo.c
tunnels.c
wol.c