Linux/linux 70dd4ee — drivers/pinctrl pinctrl-amd.c, drivers/pinctrl/qcom pinctrl-nord.c pinctrl-maili.c

Merge tag 'pinctrl-v7.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:

 - AMD: Clear S4 wake bits when firmware has _AEI, this is important for
   some AMD systems.

 - Do not accumulate sunxi npins across probe() attempts with deferred
   probe. (desc->npins just went ++ and ++...)

 - Qualcomm patch galore: split QUP functions on the Nord pin
   controller, fix an OF module alias on IPQ5210 so the module
   modprobes, fix two groups on the IPQ5018, make direction changes
   exclusive on the SPMI-GPIO, and fix the interrupt target width on
   four different SoCs.

* tag 'pinctrl-v7.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: sunxi: dt: do not accumulate npins across probe attempts
  pinctrl: amd: Clear S4 wake bits when firmware has _AEI

    [10 lines not shown]
DeltaFile
+29-8drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+10-10drivers/pinctrl/qcom/pinctrl-ipq5018.c
+9-0drivers/pinctrl/pinctrl-amd.c
+1-0drivers/pinctrl/qcom/pinctrl-nord.c
+1-0drivers/pinctrl/qcom/pinctrl-maili.c
+1-0drivers/pinctrl/qcom/pinctrl-hawi.c
+51-182 files not shown
+53-188 files

Linux/linux 7b441fe — drivers/power/sequencing pwrseq-qcom-wcn.c

Merge tag 'pwrseq-fixes-for-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull power sequencing fix from Bartosz Golaszewski:

 - with the PCIe code reworked to power the endpoint via pwrctl before
   it starts the link training, we can now remove the workaround for
   WLAN power which instead started causing an issue with endpoint
   enumeration

* tag 'pwrseq-fixes-for-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  power: sequencing: qcom-wcn: power off WLAN at probe
DeltaFile
+1-15drivers/power/sequencing/pwrseq-qcom-wcn.c
+1-151 files

Linux/linux 586a28a — drivers/gpio gpio-nct6694.c gpiolib.c, tools/gpio Makefile

Merge tag 'gpio-fixes-for-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - gracefully handle unsupported fwnode-only, no-device GPIO lookup for
   shared pins

 - mark the GPIO controller as sleeping in gpio-nct6694

 - fix a GPIO device reference leak in kunit tests

 - fix memory leak in error path in gpiod_set_array_value_complex()

 - fix races in GPIO controller and its associated irqchip setup in
   gpio-mxc

 - use atomic bitops where races can occur in gpio-mxc

 - fix build failure in gpio tools

    [12 lines not shown]
DeltaFile
+22-14drivers/gpio/gpio-mxc.c
+14-5drivers/gpio/gpiolib-shared.c
+5-4drivers/gpio/gpiolib.c
+7-2drivers/gpio/gpiolib-kunit.c
+6-0tools/gpio/Makefile
+1-1drivers/gpio/gpio-nct6694.c
+55-266 files

Linux/linux 1dbb742 — fs namei.c namespace.c, fs/autofs waitq.c

Merge tag 'vfs-7.3-rc8.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

 - Fix a range of use-after-frees during rcu pathwalk caused by non-rcu
   frees.

   Whatever ->permission(), ->d_revalidate(), ->get_link(), ->d_hash()
   and ->d_compare() read in rcu mode has to be freed after a grace
   period. umount(2) hides most of it because namespace_unlock() waits
   for one, but a chdir() out of a lazily unmounted directory or the
   close() of the last file on it drops the last reference without.

    * ext4_get_link() reads the sbi and the extent status counters for a
      symlink stored in a data block. Both are freed after a grace
      period now.

    * The unicode map of casefolded ext4, f2fs and tmpfs was freed under
      generic_ci_d_hash() and generic_ci_d_compare().

    [96 lines not shown]
DeltaFile
+122-0tools/testing/selftests/filesystems/umount_propagation/locked_mount_test.c
+36-13fs/ntfs3/super.c
+23-10fs/namespace.c
+1-31fs/namei.c
+19-6fs/autofs/waitq.c
+17-4fs/unicode/utf8-core.c
+218-6428 files not shown
+325-9234 files

Linux/linux 519abe8 — . MAINTAINERS

MAINTAINERS: remove myself

After 14 years at Oracle and 23 years working on Linux, I've decided to
step back for a while.

Signed-off-by: "Darrick J. Wong" <djwong at kernel.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
DeltaFile
+0-1MAINTAINERS
+0-11 files

Linux/linux 9020135 — drivers/net/wireless/ath/ath9k wmi.h wmi.c

wifi: atk9k: Revert "wifi: ath9k: reject short WMI command responses"

This reverts commit 93ce8ea70451e800601bc9444aa33043de15d67b.

Mehmet reported that the offending commit breaks his AR9271 USB adapter
which uses zero-length replies to commands that don't return a value.
Revert the whole thing to restore the functionality.

Cc: stable at vger.kernel.org # the offending commit is in 6.12.113
Reported-by: Mehmet Fide <mehmet.fide at gmail.com>
Signed-off-by: Toke Høiland-Jørgensen <toke at toke.dk>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
DeltaFile
+2-14drivers/net/wireless/ath/ath9k/wmi.c
+0-1drivers/net/wireless/ath/ath9k/wmi.h
+2-152 files

Linux/linux 214897a — fs namei.c

Revert "namei: don't reveal overmounted entries in refwalk"

This reverts commit 8189ab688f5a2c745dc90b63374da02f213d6994.

This bug class is bigger than can be fixed with this simple patch.
Back out of it and give us some time to fix this properly.

Signed-off-by: Christian Brauner <brauner at kernel.org>
DeltaFile
+0-29fs/namei.c
+0-291 files

Linux/linux 2f2f7ee — arch/arm/boot/dts/ti/omap dra7xx-clocks.dtsi, arch/arm/configs sama5_defconfig

Merge tag 'soc-fixes-7.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC fixes from Arnd Bergmann:
 "A small number of last minute bug fixes came up since LPC.
  Most of these are for devicetree files:

   - Tegra264 needs fan descriptions to keep the system from overheating

   - A cleanup on TI DRA7 caused a regression on PCI support and needs a
     fixup

   - The beaglev-fire board can no longer probe the mcp3564 sensor after
     a an inconsistent update in 7.1

   - A few fixes address compile time dtc warnings on tegra

  The other three patches are all addressing minor problems
  in tegra drivers and the sama5 defconfig"


    [10 lines not shown]
DeltaFile
+156-24arch/arm64/boot/dts/nvidia/tegra264.dtsi
+0-18arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
+13-0arch/arm64/boot/dts/nvidia/tegra264-p4071-0000+p3834.dtsi
+2-2arch/arm/configs/sama5_defconfig
+1-1drivers/soc/tegra/fuse/tegra-apbmisc.c
+1-1arch/arm/boot/dts/ti/omap/dra7xx-clocks.dtsi
+173-461 files not shown
+174-467 files

Linux/linux 62f482f — drivers/iommu/amd init.c iommu.c, drivers/iommu/generic_pt/fmt Makefile

Merge tag 'iommu-fixes-v7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux

Pull IOMMU fixes from Joerg Roedel:
 "AMD IOMMU:

   - Revert an interrupt remapping check removal that caused GPU
     regressions on some platforms

  Generic page tables:

   - Fix KUnit builds with distributed Clang ThinLTO by preserving
     compiler flags, preventing x86-64 code generation from arm64
     bitcode"

* tag 'iommu-fixes-v7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux:
  iommupt/kunit: Use if_changed_rule for the kunit
  Revert "iommu/amd: Remove redundant check in irq_remapping_select()"
DeltaFile
+3-0drivers/iommu/amd/iommu.c
+3-0drivers/iommu/amd/amd_iommu_types.h
+1-1drivers/iommu/generic_pt/fmt/Makefile
+1-1drivers/iommu/amd/init.c
+8-24 files

Linux/linux 045958a — drivers/net/ethernet/broadcom/genet bcmgenet.c, net/netlink af_netlink.c

Merge tag 'net-7.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Paolo Abeni:
 "This is considerably smaller than in recent history, mostly due to
  reduced capacity and increased backlog. Also we actively redirected
  more stuff towards next. I'm not aware of any pending regression.

  Current release - regressions:

   - eth: move netops initialization to fix crash

  Previous releases - regressions:

   - sched: fix use-after-free in __tcf_action_put()

   - rds: fix uninitialized trans dereference in CM event handler

  Previous releases - always broken:


    [28 lines not shown]
DeltaFile
+33-5net/rds/rdma_transport.c
+21-12net/sctp/socket.c
+8-9net/vmw_vsock/af_vsock.c
+5-6net/sched/act_api.c
+7-3net/netlink/af_netlink.c
+10-0drivers/net/ethernet/broadcom/genet/bcmgenet.c
+84-3514 files not shown
+117-5120 files

Linux/linux 9aa622d — arch/x86/kernel kvm.c, arch/x86/kvm/vmx nested.c

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "Even more x86 fixes:

   - Avoid a false positive panic in the #PF handler, if the kernel
     triggers a page fault within the asynchronous page fault handler
     before the flags are reset.

     This can happen for example because of a perf NMI.

   - Always reset a vCPU's MMU pointer back to the root MMU when loading
     nested guest state fails during RSM or KVM_SET_NESTED_STATE.

     Otherwise KVM tries to run a non-nested guest with a nested MMU,
     which can result in a NULL pointer dereference attempting to get
     the nested MMU's pgd (EPTP or nested CR3)"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:

    [2 lines not shown]
DeltaFile
+29-3arch/x86/kernel/kvm.c
+3-1arch/x86/kvm/vmx/nested.c
+32-42 files

Linux/linux 6a66840 — . MAINTAINERS, arch/x86/hyperv hv_init.c

Merge tag 'hyperv-fixes-signed-20261015' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux

Pull Hyper-V fixes from Wei Liu:

 - Typo and comment fixes (Hemanth Selam, Jiangshan Yi)

 - Update maintainers list (Wei Liu, Long Li)

 - Two Hyper-V PCI driver fixes (Naman Jain, Sahil Chandna)

 - Small fixes for core Hyper-V code (Hardik Garg, Michael Kelley,
   Waiman Long)

* tag 'hyperv-fixes-signed-20261015' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
  MAINTAINERS: drop KY from Hyper-V maintainers list
  PCI: hv: Warn when wait_for_response() waits indefinitely
  PCI: hv: Probe vPCI buses asynchronously
  MAINTAINERS: remove myself from the Hyper-V entries
  mshv_vtl: Check per-CPU register page before mmap

    [6 lines not shown]
DeltaFile
+39-10drivers/pci/controller/pci-hyperv.c
+7-12drivers/hv/vmbus_drv.c
+9-3drivers/hv/channel_mgmt.c
+4-3arch/x86/hyperv/hv_init.c
+0-3MAINTAINERS
+3-0drivers/hv/mshv_vtl_main.c
+62-313 files not shown
+64-349 files

Linux/linux aa07285 — drivers/net/ethernet/stmicro/stmmac dwmac1000_core.c

net: stmmac: dwmac1000: clear the RGMII status interrupt

Since commit 2e2c878a3141 ("net: stmmac: remove SGMII/RGMII/SMII
interrupt handling") nothing on the RGMII path reads GMAC_RGSMIIIS, so
RGSMIIIS stays pending behind GMAC_INT_MASK from the first link change
on. stmmac_resume() resets the MAC in stmmac_hw_setup(); the reset sets
GMAC_INT_MASK to 0 until dwmac1000_core_init() writes the mask again,
and the pending status storms the line:

  dwmac_dma_interrupt: unexpected status 04000000

A register dump at the first message on ODROID-HC4 showed it:

  core int_status 00000001 int_mask 00000000 pmt 00000000 rgsmiiis 0000000d

When the resume thread runs on the CPU that takes the MAC interrupt,
the storm starves it: a soft lockup, then a watchdog reset or a hang.

Read GMAC_RGSMIIIS in dwmac1000_irq_status() when the status is not

    [15 lines not shown]
DeltaFile
+6-0drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
+6-01 files

Linux/linux b7719c5 — drivers/gpio gpio-mxc.c

gpio: mxc: fix both_edges bit operations

gpio_set_irq_type() can be called concurrently for different pins on
the same port.  The IRQ core serializes per irq descriptor, but
different pins have different descriptors, so on SMP systems two
concurrent gpio_set_irq_type() calls for pins on the same port run
without mutual exclusion.

The read-modify-write of port->both_edges is performed outside the
port-wide scoped_guard(gpio_generic_lock_irqsave) section, so
concurrent updates for different pins can overwrite each other,
causing missed interrupts or stuck IRQ lines on dual-edge triggered
pins.

The original uniprocessor MXC SoCs were not affected; the race
became reachable on multi-core i.MX7 and i.MX8 SoCs that reuse this
driver.

Convert both_edges from u32 to unsigned long and use set_bit(),

    [9 lines not shown]
DeltaFile
+5-4drivers/gpio/gpio-mxc.c
+5-41 files

Linux/linux 170aeff — drivers/gpio gpio-mxc.c

gpio: mxc: fix wakeup_pads bit operations

gpio_set_wake_irq() can be called concurrently for different pins on
the same port. The writer-vs-writer race is the concern: two concurrent
gpio_set_wake_irq() calls for different pins on the same port both do
a non-atomic read-modify-write on the same wakeup_pads word. The old
|= and &= compile to separate load/modify/store instructions that can
interleave, losing one CPU's update.

assign_bit() uses an atomic RMW instruction, so concurrent writers to
different bits in the same word are safe.

The reader side (for_each_set_bit in noirq_suspend, wakeup_pads > 0)
runs in noirq context where no concurrent writer can execute, so
reader atomicity is not needed.

wakeup_pads is a u32, while assign_bit() operates on unsigned long
pointers. On 64-bit platforms, this causes an 8-byte read-modify-write
on a 4-byte field, corrupting the adjacent is_pad_wakeup. So change

    [13 lines not shown]
DeltaFile
+6-4drivers/gpio/gpio-mxc.c
+6-41 files

Linux/linux 205cccd — drivers/gpio gpio-mxc.c

gpio: mxc: fix race between gpiochip registration and IRQ domain setup

devm_gpiochip_add_data() makes the GPIO chip visible to consumers
immediately. Since the chip sets .to_irq = mxc_gpio_to_irq, which calls
irq_find_mapping(port->domain, offset), any to_irq() call between
gpiochip registration and IRQ domain creation will operate on a NULL
domain.

Fix by moving devm_gpiochip_add_data() after the IRQ domain and generic
irq chip are fully initialized, ensuring port->domain and the irq chip
handlers are ready before the chip becomes visible to consumers.

Fixes: d37a65bb4663 ("gpio/mxc: Move Freescale MXC gpio driver to drivers/gpio")
Signed-off-by: Peng Fan <peng.fan at nxp.com>
Reviewed-by: Linus Walleij <linusw at kernel.org>
Reviewed-by: Frank Li <Frank.Li at nxp.com>
Reviewed-by: Andy Shevchenko <andy at kernel.org>
Link: https://patch.msgid.link/20261013-gpio-mxc-cleanup-v7-4-c4d769587d3e@nxp.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
DeltaFile
+9-4drivers/gpio/gpio-mxc.c
+9-41 files

Linux/linux 38d44f7 — drivers/gpio gpio-mxc.c

gpio: mxc: fix race between chained IRQ handler install and probe completion

mxc_update_irq_chained_handler() is called before the IRQ domain, the
generic IRQ chip, and the port list entry are set up. If an interrupt
arrives in that window:

 - mx3_gpio_irq_handler() calls generic_handle_domain_irq() with
   port->domain still NULL.
 - mx2_gpio_irq_handler() walks mxc_gpio_ports, but the port has not
   been added to the list yet.

Additionally, if any of the subsequent probe steps
(gpio_generic_chip_init(), devm_gpiochip_add_data(),
irq_domain_create_legacy(), or mxc_gpio_init_gc()) fail, the error
paths never unregister the chained handler, leaving a dangling handler
that points at freed memory.

Move the handler installation after all its dependencies are ready and
after list_add_tail(), so the handler is never live while the data

    [11 lines not shown]
DeltaFile
+2-2drivers/gpio/gpio-mxc.c
+2-21 files

Linux/linux c28846c — drivers/gpio gpiolib.c

gpiolib: fix memory leak in gpiod_set_array_value_complex() on error paths

A drive-by review by Sashiko reports that, after a failed call to
gpiochip_set_multiple(), gpiod_set_array_value() returns abruptly,
bypassing the freeing of possibly alloced bitmaps, potentially leaking
memory. It is an unlikely error path, but is possible.

Defer the return code check until after the bitmap_free() block.

Fixes: 9b407312755f ("gpiolib: rework the wrapper around gpio_chip::set_multiple()")
Reported-by: Sashiko <sashiko-bot at kernel.org>
Link: https://lore.kernel.org/linux-gpio/sashiko-outbox-168233@kernel.org/
Signed-off-by: Kent Gibson <warthog618 at gmail.com>
Link: https://patch.msgid.link/20261015025749.47039-1-warthog618@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
DeltaFile
+5-4drivers/gpio/gpiolib.c
+5-41 files

Linux/linux 851bb4a — drivers/gpio gpiolib-kunit.c

gpio: kunit: fix GPIO device reference leak with __free()

KUnit aborts the test thread immediately using kthread_exit() so the
variable annotated with __free() never really goes out of scope and the
associated callback is not called. Schedule a kunit action instead.

Fixes: a05cfd98c5ec ("gpio: kunit: add test cases for software node hogs")
Reported-by: Sashiko <sashiko-bot at kernel.org>
Closes: https://sashiko.dev/#/patchset/20261013-gpio-kunit-plat-lookup-v3-0-3907f913e964%40oss.qualcomm.com?part=1
Link: https://patch.msgid.link/20261014-gpio-kunit-autofree-leak-fix-v1-1-5bfa7be0eb1f@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
DeltaFile
+7-2drivers/gpio/gpiolib-kunit.c
+7-21 files

Linux/linux cf73c3f — drivers/gpio gpiolib-shared.c

gpio: shared: gracefully handle no-device lookup of shared GPIOs

We use platform lookup tables for shared GPIOs. This mechanism needs a
struct device to work so fwnode-based lookup with no device associated
currently causes a NULL-pointer deference.

Adding this functionality will require a larger rework and it has never
worked anyway so add a check that allows the kernel to gracefully handle
this situation with an error ahead of implementing that functionality as
a new feature.

Cc: stable at vger.kernel.org
Reported-by: Abel Vesa <abelvesa at kernel.org>
Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support")
Link: https://patch.msgid.link/20261014-gpio-shared-fwnode-lookup-v4-2-2253ad645fd6@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
DeltaFile
+6-1drivers/gpio/gpiolib-shared.c
+6-11 files

Linux/linux bd22f7e — drivers/gpio gpiolib-shared.c

gpio: shared: fix use-after-free bug when adding shared proxies

The GPIO lookup table can stay alive for longer than the kobject whose
name string's address we're assigning to lookup->dev_id. Fix a potential
UAF by duplicating the string.

Cc: stable at vger.kernel.org
Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support")
Reviewed-by: Linus Walleij <linusw at kernel.org>
Link: https://patch.msgid.link/20261014-gpio-shared-fwnode-lookup-v4-1-2253ad645fd6@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
DeltaFile
+8-4drivers/gpio/gpiolib-shared.c
+8-41 files

Linux/linux 7b16eb9 — net/sched act_api.c

net/sched: fix use-after-free in __tcf_action_put()

__tcf_action_put() decrements the reference count before decrementing the
binding count. Another thread can free the action between these operations,
causing the binding-count update to access freed memory. KASAN reports it
as:

  BUG: KASAN: slab-use-after-free in __tcf_action_put+0x327/0x340
  Write of size 4 at addr ff11000000d46420 by task tc-put-pause/64

Hold the action IDR mutex across both counter updates and IDR removal,
keeping cleanup outside the lock.

Fixes: 16af6067392c ("net: sched: implement reference counted action release")
Cc: stable at vger.kernel.org
Assisted-by: LLM
Signed-off-by: Jérémy Jean <Jeremy.Jean at oss.cyber.gouv.fr>
Reviewed-by: Simon Horman <horms at kernel.org>
Link: https://patch.msgid.link/20261008181348.527035-2-Jeremy.Jean@oss.cyber.gouv.fr
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
DeltaFile
+5-6net/sched/act_api.c
+5-61 files

Linux/linux 8070ed5 — net/ipv6 calipso.c

calipso: keep BIG TCP payload_len in calipso_skbuff_setattr()

calipso_skbuff_setattr() adjusts payload_len by the length of the
option it inserts or resizes:

        payload = ntohs(ip6_hdr->payload_len);
        ip6_hdr->payload_len = htons(payload + len_delta);

GRO can build BIG TCP packets larger than IPV6_MAXPLEN, and stores
payload_len == 0 for them; ipv6_payload_len() then falls back to
skb->len.  For such a packet forwarded to a destination mapped to
CALIPSO, the code above writes len_delta (or 65536 + len_delta when
shrinking) into payload_len, and ipv6_payload_len() no longer falls
back to skb->len.  nf_tables, conntrack and sch_cake rely on it.

The same arithmetic also wraps when a packet grows past IPV6_MAXPLEN,
and a BIG TCP packet that shrinks below IPV6_MAXPLEN should get its
real length back.


    [34 lines not shown]
DeltaFile
+3-3net/ipv6/calipso.c
+3-31 files

Linux/linux 1c1e8c2 — . MAINTAINERS

MAINTAINERS: add Gustavo Luiz Duarte as netconsole reviewer

Gustavo has been the most active netconsole reviewer, let's add him
to the MAINTAINERS file.

Add an R: entry so get_maintainer.pl Cc's Gustavo on netconsole patches.

Signed-off-by: Breno Leitao <leitao at debian.org>
Acked-by: Gustavo Luiz Duarte <gustavold at gmail.com>
Link: https://patch.msgid.link/20261009-netcon_main-v1-1-6d298ab5a0cd@debian.org
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
DeltaFile
+1-0MAINTAINERS
+1-01 files

Linux/linux 89771ce — drivers/net/ethernet/broadcom/genet bcmgenet.c

net: bcmgenet: unshare the skb before writing the control block

bcmgenet stores first_cb, last_cb and bytes_sent in the skb control
block and reads them back on completion to free the skb and credit BQL.
ether_setup() leaves IFF_TX_SKB_SHARING set, so the stack can resubmit
a shared skb that is still in the ring. The next transmit overwrites
last_cb, so the earlier slots complete without crediting their bytes
and BQL stalls the queue until the watchdog resets it.

Unshare the skb before writing the control block.

Reproduce with pktgen in clone_skb mode, which hands the driver the same
skb while earlier copies are still in the ring:

  modprobe pktgen
  pg=/proc/net/pktgen
  echo "add_device eth0" > $pg/kpktgend_0
  echo "dst_mac AA:BB:CC:DD:EE:FF" > $pg/eth0
  echo "dst 192.0.2.1" > $pg/eth0

    [16 lines not shown]
DeltaFile
+10-0drivers/net/ethernet/broadcom/genet/bcmgenet.c
+10-01 files

Linux/linux 052b892 — drivers/net/ethernet ethoc.c, drivers/net/ethernet/actions owl-emac.c

Merge branch 'net-move-setting-of-netops-to-fix-crash'

David Yang says:

====================
net: Move setting of netops to fix crash

Commit ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev()
locking assertion") put a netdev_need_ops_lock() check on the
phy_attach_direct() path, in phy_link_topo_add_phy(). With
CONFIG_NET_SHAPER enabled netdev_need_ops_lock() reads
dev->netdev_ops->net_shaper_ops, so any driver that connects a PHY
before assigning ndev->netdev_ops now dies with a NULL pointer
dereference at probe time. The breakage showed up in v7.3-rc1.

ibm/emac was hit first and fixed by commit 7c9f391ec89c ("net: emac:
move setting of netops to fix crash"). These ten patches apply the
same one-line move to the remaining in-tree drivers whose probe path
attaches a PHY before filling in netdev_ops:

    [23 lines not shown]
DeltaFile
+2-2drivers/net/ethernet/marvell/mv643xx_eth.c
+2-1drivers/net/ethernet/ethoc.c
+2-1drivers/net/ethernet/amd/au1000_eth.c
+2-1drivers/net/ethernet/aeroflex/greth.c
+2-1drivers/net/ethernet/adi/adin1140.c
+2-1drivers/net/ethernet/actions/owl-emac.c
+12-74 files not shown
+20-1110 files

Linux/linux 2a3f6d2 — drivers/net/ethernet/microchip/lan865x lan865x.c

microchip: lan865x: move setting of netops to fix crash

lan865x_probe() assigns netdev_ops only after oa_tc6_init(), which
connects the internal MAC-PHY through phy_connect_direct().
phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops
through netdev_need_ops_lock() since the commit in question, so probing
crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is
enabled.

Assign netdev_ops before the PHY attach, as was done for emac in commit
7c9f391ec89c ("net: emac: move setting of netops to fix crash").

Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion")
Signed-off-by: David Yang <mmyangfl at gmail.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
Link: https://patch.msgid.link/20261008022656.3592191-11-mmyangfl@gmail.com
Reviewed-by: Jijie Shao <shaojijie at huawei.com>
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
DeltaFile
+2-1drivers/net/ethernet/microchip/lan865x/lan865x.c
+2-11 files

Linux/linux 0d93427 — drivers/net/ethernet/hisilicon hip04_eth.c

net: hisilicon: hip04_eth: Move setting of netops to fix crash

hip04_mac_probe() calls of_phy_connect() before ndev->netdev_ops is
assigned. phy_attach_direct() -> phy_link_topo_add_phy() reads
dev->netdev_ops through netdev_need_ops_lock() since the commit in
question, so probing crashes with a NULL pointer dereference when
CONFIG_NET_SHAPER is enabled.

Assign netdev_ops before the PHY attach, as was done for emac in commit
7c9f391ec89c ("net: emac: move setting of netops to fix crash").

Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion")
Signed-off-by: David Yang <mmyangfl at gmail.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
Link: https://patch.msgid.link/20261008022656.3592191-3-mmyangfl@gmail.com
Reviewed-by: Jijie Shao <shaojijie at huawei.com>
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
DeltaFile
+2-1drivers/net/ethernet/hisilicon/hip04_eth.c
+2-11 files

Linux/linux 955bb7c — drivers/net/ethernet/ti/icssm icssm_prueth.c

net: ti: icssm-prueth: Move setting of netops to fix crash

icssm_prueth_netdev_init() calls of_phy_get_and_connect() before
ndev->netdev_ops is assigned. phy_attach_direct() ->
phy_link_topo_add_phy() reads dev->netdev_ops through
netdev_need_ops_lock() since the commit in question, so probing crashes
with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled.

Assign netdev_ops before the PHY attach, as was done for emac in commit
7c9f391ec89c ("net: emac: move setting of netops to fix crash").

Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion")
Signed-off-by: David Yang <mmyangfl at gmail.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
Link: https://patch.msgid.link/20261008022656.3592191-10-mmyangfl@gmail.com
Reviewed-by: Jijie Shao <shaojijie at huawei.com>
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
DeltaFile
+2-1drivers/net/ethernet/ti/icssm/icssm_prueth.c
+2-11 files

Linux/linux d71483f — drivers/net/ethernet/aeroflex greth.c

net: ethernet: aeroflex: move setting of netops to fix crash

greth_of_probe() calls greth_mdio_init(), which connects the PHY,
before dev->netdev_ops is assigned. phy_attach_direct() ->
phy_link_topo_add_phy() reads dev->netdev_ops through
netdev_need_ops_lock() since the commit in question, so probing crashes
with a NULL pointer dereference when CONFIG_NET_SHAPER is enabled.

Assign netdev_ops before the PHY attach, as was done for emac in commit
7c9f391ec89c ("net: emac: move setting of netops to fix crash").

Fixes: ded86da4bbb7 ("net: ethtool: relax ethnl_req_get_phydev() locking assertion")
Signed-off-by: David Yang <mmyangfl at gmail.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
Acked-by: Andreas Larsson <andreas at gaisler.com>
Link: https://patch.msgid.link/20261008022656.3592191-9-mmyangfl@gmail.com
Reviewed-by: Jijie Shao <shaojijie at huawei.com>
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
DeltaFile
+2-1drivers/net/ethernet/aeroflex/greth.c
+2-11 files