Centos-kernel-stream-9/net/ethtool
Michal Schmidt d2245e8984 net: ethtool: phy: Don't set the context dev pointer for unfiltered DUMP
JIRA: https://issues.redhat.com/browse/RHEL-57751

commit 1ad84a151af7f4b3933983677bc75074f957bdf5
Author: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date:   Fri Sep 13 12:05:14 2024 +0200

    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: 17194be4c8e1 ("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>

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2024-11-05 11:39:25 +01:00
..
Makefile net: ethtool: Introduce a command to list PHYs on an interface 2024-11-05 11:39:22 +01:00
bitset.c
bitset.h
cabletest.c net: ethtool: cable-test: Release RTNL when the PHY isn't found 2024-11-05 11:39:23 +01:00
channels.c ethtool: refactor checking max channels 2024-11-04 19:42:47 +01:00
cmis.h ethtool: cmis_cdb: Remove unused declaration ethtool_cmis_page_fini() 2024-11-04 19:42:46 +01:00
cmis_cdb.c net: ethtool: Enhance error messages sent to user space 2024-11-05 11:39:25 +01:00
cmis_fw_update.c net: ethtool: Allow write mechanism of LPL and both LPL and EPL 2024-10-01 12:19:15 +02:00
coalesce.c net: ethtool: Fix the panic caused by dev being null when dumping coalesce 2024-10-01 12:19:14 +02:00
common.c ethtool: RX software timestamp for all 2024-11-05 11:39:23 +01:00
common.h ethtool: refactor checking max channels 2024-11-04 19:42:47 +01:00
debug.c
eee.c net: ethtool: eee: Remove legacy _u32 from keee 2024-10-01 08:41:12 +02:00
eeprom.c ethtool: move firmware flashing flag to struct ethtool_netdev_state 2024-10-01 12:19:14 +02:00
features.c
fec.c
ioctl.c ethtool: rss: don't report key if device doesn't support it 2024-11-05 11:21:58 +01:00
linkinfo.c ethtool: Don't check for NULL info in prepare_data callbacks 2024-11-04 19:42:45 +01:00
linkmodes.c ethtool: Don't check for NULL info in prepare_data callbacks 2024-11-04 19:42:45 +01:00
linkstate.c ethtool: netlink: do not return SQI value if link is down 2024-10-01 12:19:14 +02:00
mm.c
module.c net: ethtool: Monotonically increase the message sequence number 2024-10-01 12:19:15 +02:00
module_fw.h ethtool: Add ability to flash transceiver modules' firmware 2024-10-01 12:19:13 +02:00
netlink.c net: ethtool: Introduce a command to list PHYs on an interface 2024-11-05 11:39:22 +01:00
netlink.h net: ethtool: Introduce a command to list PHYs on an interface 2024-11-05 11:39:22 +01:00
pause.c
phc_vclocks.c
phy.c net: ethtool: phy: Don't set the context dev pointer for unfiltered DUMP 2024-11-05 11:39:25 +01:00
plca.c net: ethtool: plca: Target the command to the requested PHY 2024-11-05 11:39:22 +01:00
privflags.c
pse-pd.c ethtool: pse-pd: move pse validation into set 2024-11-05 11:39:23 +01:00
rings.c
rss.c ethtool: rss: support skipping contexts during dump 2024-11-05 11:36:13 +01:00
stats.c
strset.c net: ethtool: strset: Allow querying phy stats by index 2024-11-05 11:39:22 +01:00
tsinfo.c net: Add struct kernel_ethtool_ts_info 2024-10-01 12:19:15 +02:00
tunnels.c
wol.c net: move ethtool-related netdev state into its own struct 2024-10-01 12:19:13 +02:00