This is the start of the stable review cycle for the 6.12.50 release.
There are 89 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Thu, 02 Oct 2025 14:37:59 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.50-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.12.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.12.50-rc1
Niklas Neronin <niklas.neronin(a)linux.intel.com>
Revert "usb: xhci: remove option to change a default ring's TRB cycle bit"
Jason Gunthorpe <jgg(a)ziepe.ca>
iommufd: Fix race during abort for file descriptors
Thomas Zimmermann <tzimmermann(a)suse.de>
fbcon: Fix OOB access in font allocation
Samasth Norway Ananda <samasth.norway.ananda(a)oracle.com>
fbcon: fix integer overflow in fbcon_do_set_font
Jinjiang Tu <tujinjiang(a)huawei.com>
mm/hugetlb: fix folio is still mapped when deleted
Eric Biggers <ebiggers(a)kernel.org>
kmsan: fix out-of-bounds access to shadow memory
Hans de Goede <hansg(a)kernel.org>
gpiolib: Extend software-node support to support secondary software-nodes
Jakub Acs <acsjakub(a)amazon.de>
fs/proc/task_mmu: check p->vec_buf for NULL
Zhen Ni <zhen.ni(a)easystack.cn>
afs: Fix potential null pointer dereference in afs_put_server
Nirmoy Das <nirmoyd(a)nvidia.com>
drm/ast: Use msleep instead of mdelay for edid read
Josua Mayer <josua(a)solid-run.com>
arm64: dts: marvell: cn9132-clearfog: fix multi-lane pci x2 and x4 ports
Josua Mayer <josua(a)solid-run.com>
arm64: dts: marvell: cn9132-clearfog: disable eMMC high-speed modes
Nobuhiro Iwamatsu <iwamatsu(a)nigauri.org>
ARM: dts: socfpga: sodia: Fix mdio bus probe and PHY address
Masami Hiramatsu (Google) <mhiramat(a)kernel.org>
tracing: dynevent: Add a missing lockdown check on dynevent
Eric Biggers <ebiggers(a)kernel.org>
crypto: af_alg - Fix incorrect boolean values in af_alg_ctx
Lukasz Czapnik <lukasz.czapnik(a)intel.com>
i40e: improve VF MAC filters accounting
Lukasz Czapnik <lukasz.czapnik(a)intel.com>
i40e: add mask to apply valid bits for itr_idx
Lukasz Czapnik <lukasz.czapnik(a)intel.com>
i40e: add max boundary check for VF filters
Lukasz Czapnik <lukasz.czapnik(a)intel.com>
i40e: fix validation of VF state in get resources
Lukasz Czapnik <lukasz.czapnik(a)intel.com>
i40e: fix input validation logic for action_meta
Lukasz Czapnik <lukasz.czapnik(a)intel.com>
i40e: fix idx validation in config queues msg
Lukasz Czapnik <lukasz.czapnik(a)intel.com>
i40e: fix idx validation in i40e_validate_queue_map
Lukasz Czapnik <lukasz.czapnik(a)intel.com>
i40e: add validation for ring_len param
Amit Chaudhari <amitchaudhari(a)mac.com>
HID: asus: add support for missing PX series fn keys
Sang-Heon Jeon <ekffu200098(a)gmail.com>
smb: client: fix wrong index reference in smb2_compound_op()
Daniel Lee <dany97(a)live.ca>
platform/x86: lg-laptop: Fix WMAB call in fan_mode_store()
Adrián Larumbe <adrian.larumbe(a)collabora.com>
drm/panthor: Defer scheduler entitiy destruction to queue release
Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
futex: Prevent use-after-free during requeue-PI
Zabelin Nikita <n.zabelin(a)mt-integration.ru>
drm/gma500: Fix null dereference in hdmi teardown
Hugh Dickins <hughd(a)google.com>
mm: folio_may_be_lru_cached() unless folio_test_large()
Hugh Dickins <hughd(a)google.com>
mm: revert "mm/gup: clear the LRU flag of a page before adding to LRU batch"
Hugh Dickins <hughd(a)google.com>
mm/gup: local lru_add_drain() to avoid lru_add_drain_all()
Dan Carpenter <dan.carpenter(a)linaro.org>
octeontx2-pf: Fix potential use after free in otx2_tc_add_flow()
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: dsa: lantiq_gswip: suppress -EINVAL errors for bridge FDB entries added to the CPU port
Vladimir Oltean <vladimir.oltean(a)nxp.com>
net: dsa: lantiq_gswip: move gswip_add_single_port_br() call to port_setup()
Ido Schimmel <idosch(a)nvidia.com>
selftests: fib_nexthops: Fix creation of non-FDB nexthops
Ido Schimmel <idosch(a)nvidia.com>
nexthop: Forbid FDB status change while nexthop is in a group
Jason Baron <jbaron(a)akamai.com>
net: allow alloc_skb_with_frags() to use MAX_SKB_FRAGS
Alok Tiwari <alok.a.tiwari(a)oracle.com>
bnxt_en: correct offset handling for IPv6 destination address
Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
vhost: Take a reference on the task in struct vhost_task.
Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
Bluetooth: hci_event: Fix UAF in hci_acl_create_conn_sync
Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
Bluetooth: hci_sync: Fix hci_resume_advertising_sync
Petr Malat <oss(a)malat.biz>
ethernet: rvu-af: Remove slash from the driver name
Sidraya Jayagond <sidraya(a)linux.ibm.com>
net/smc: fix warning in smc_rx_splice() when calling get_page()
Wang Liang <wangliang74(a)huawei.com>
net: tun: Update napi->skb after XDP process
Stéphane Grosjean <stephane.grosjean(a)hms-networks.com>
can: peak_usb: fix shift-out-of-bounds issue
Vincent Mailhol <mailhol(a)kernel.org>
can: mcba_usb: populate ndo_change_mtu() to prevent buffer overflow
Vincent Mailhol <mailhol(a)kernel.org>
can: sun4i_can: populate ndo_change_mtu() to prevent buffer overflow
Vincent Mailhol <mailhol(a)kernel.org>
can: hi311x: populate ndo_change_mtu() to prevent buffer overflow
Vincent Mailhol <mailhol(a)kernel.org>
can: etas_es58x: populate ndo_change_mtu() to prevent buffer overflow
Sabrina Dubroca <sd(a)queasysnail.net>
xfrm: xfrm_alloc_spi shouldn't use 0 as SPI
Leon Hwang <leon.hwang(a)linux.dev>
bpf: Reject bpf_timer for PREEMPT_RT
Geert Uytterhoeven <geert+renesas(a)glider.be>
can: rcar_can: rcar_can_resume(): fix s2ram with PSCI
James Guan <guan_yufei(a)163.com>
wifi: virt_wifi: Fix page fault on connect
Mark Harmstone <mark(a)harmstone.com>
btrfs: don't allow adding block device of less than 1 MB
Jiri Olsa <olsajiri(a)gmail.com>
bpf: Check the helper function is valid in get_helper_proto
Stefan Metzmacher <metze(a)samba.org>
smb: server: use disable_work_sync in transport_rdma.c
Stefan Metzmacher <metze(a)samba.org>
smb: server: don't use delayed_work for post_recv_credits_work
Christian Loehle <christian.loehle(a)arm.com>
cpufreq: Initialize cpufreq-based invariance before subsys
Jihed Chaibi <jihed.chaibi.dev(a)gmail.com>
ARM: dts: kirkwood: Fix sound DAI cells for OpenRD clients
Peng Fan <peng.fan(a)nxp.com>
arm64: dts: imx8mp: Correct thermal sensor index
Peng Fan <peng.fan(a)nxp.com>
firmware: imx: Add stub functions for SCMI MISC API
Basavaraj Natikar <Basavaraj.Natikar(a)amd.com>
HID: amd_sfh: Add sync across amd sfh work functions
Or Har-Toov <ohartoov(a)nvidia.com>
IB/mlx5: Fix obj_type mismatch for SRQ event subscriptions
Aleksander Jan Bajkowski <olek2(a)wp.pl>
net: sfp: add quirk for FLYPRO copper SFP+ module
qaqland <anguoli(a)uniontech.com>
ALSA: usb-audio: Add mute TLV for playback volumes on more devices
Cryolitia PukNgae <cryolitia(a)uniontech.com>
ALSA: usb-audio: move mixer_quirks' min_mute into common quirk
noble.yang <noble.yang(a)comtrue-inc.com>
ALSA: usb-audio: Add DSD support for Comtrue USB Audio device
Heikki Krogerus <heikki.krogerus(a)linux.intel.com>
i2c: designware: Add quirk for Intel Xe
Benoît Monin <benoit.monin(a)bootlin.com>
mmc: sdhci-cadence: add Mobileye eyeQ support
Chris Morgan <macromorgan(a)hotmail.com>
net: sfp: add quirk for Potron SFP+ XGSPON ONU Stick
Marc Kleine-Budde <mkl(a)pengutronix.de>
net: fec: rename struct fec_devinfo fec_imx6x_info -> fec_imx6sx_info
Jiayi Li <lijiayi(a)kylinos.cn>
usb: core: Add 0x prefix to quirks debug output
Takashi Iwai <tiwai(a)suse.de>
ALSA: usb-audio: Fix build with CONFIG_INPUT=n
Stefan Binding <sbinding(a)opensource.cirrus.com>
ALSA: hda/realtek: Add support for ASUS NUC using CS35L41 HDA
Chen Ni <nichen(a)iscas.ac.cn>
ALSA: usb-audio: Convert comma to semicolon
Kerem Karabay <kekrby(a)gmail.com>
HID: multitouch: specify that Apple Touch Bar is direct
Kerem Karabay <kekrby(a)gmail.com>
HID: multitouch: take cls->maxcontacts into account for Apple Touch Bar even without a HID_DG_CONTACTMAX field
Kerem Karabay <kekrby(a)gmail.com>
HID: multitouch: support getting the tip state from HID_DG_TOUCH fields in Apple Touch Bar
Kerem Karabay <kekrby(a)gmail.com>
HID: multitouch: Get the contact ID from HID_DG_TRANSDUCER_INDEX fields in case of Apple Touch Bar
Cristian Ciocaltea <cristian.ciocaltea(a)collabora.com>
ALSA: usb-audio: Add mixer quirk for Sony DualSense PS5
Cristian Ciocaltea <cristian.ciocaltea(a)collabora.com>
ALSA: usb-audio: Remove unneeded wmb() in mixer_quirks
Cristian Ciocaltea <cristian.ciocaltea(a)collabora.com>
ALSA: usb-audio: Simplify NULL comparison in mixer_quirks
Cristian Ciocaltea <cristian.ciocaltea(a)collabora.com>
ALSA: usb-audio: Avoid multiple assignments in mixer_quirks
Cristian Ciocaltea <cristian.ciocaltea(a)collabora.com>
ALSA: usb-audio: Drop unnecessary parentheses in mixer_quirks
Cristian Ciocaltea <cristian.ciocaltea(a)collabora.com>
ALSA: usb-audio: Fix block comments in mixer_quirks
Cristian Ciocaltea <cristian.ciocaltea(a)collabora.com>
ALSA: usb-audio: Fix code alignment in mixer_quirks
Takashi Sakamoto <o-takashi(a)sakamocchi.jp>
firewire: core: fix overlooked update of subsystem ABI version
Alok Tiwari <alok.a.tiwari(a)oracle.com>
scsi: ufs: mcq: Fix memory allocation checks for SQE and CQE
-------------
Diffstat:
Documentation/admin-guide/laptops/lg-laptop.rst | 4 +-
Makefile | 4 +-
.../dts/intel/socfpga/socfpga_cyclone5_sodia.dts | 6 +-
.../boot/dts/marvell/kirkwood-openrd-client.dts | 2 +-
arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 +-
arch/arm64/boot/dts/marvell/cn9132-clearfog.dts | 16 +-
arch/arm64/boot/dts/marvell/cn9132-sr-cex7.dtsi | 8 +
drivers/cpufreq/cpufreq.c | 20 +-
drivers/firewire/core-cdev.c | 2 +-
drivers/gpio/gpiolib.c | 21 +-
drivers/gpu/drm/ast/ast_dp.c | 2 +-
drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 +-
drivers/gpu/drm/panthor/panthor_sched.c | 8 +-
drivers/hid/amd-sfh-hid/amd_sfh_client.c | 12 +-
drivers/hid/amd-sfh-hid/amd_sfh_common.h | 3 +
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 4 +
drivers/hid/hid-asus.c | 3 +
drivers/hid/hid-multitouch.c | 45 +-
drivers/i2c/busses/i2c-designware-platdrv.c | 7 +-
drivers/infiniband/hw/mlx5/devx.c | 1 +
drivers/iommu/iommufd/fault.c | 4 +-
drivers/iommu/iommufd/main.c | 34 +-
drivers/mmc/host/sdhci-cadence.c | 11 +
drivers/net/can/rcar/rcar_can.c | 8 +-
drivers/net/can/spi/hi311x.c | 1 +
drivers/net/can/sun4i_can.c | 1 +
drivers/net/can/usb/etas_es58x/es58x_core.c | 3 +-
drivers/net/can/usb/mcba_usb.c | 1 +
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 +-
drivers/net/dsa/lantiq_gswip.c | 21 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 +-
drivers/net/ethernet/freescale/fec_main.c | 4 +-
drivers/net/ethernet/intel/i40e/i40e.h | 3 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 26 +-
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 110 +++--
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 3 +-
drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 3 +-
.../net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 2 +-
drivers/net/phy/sfp.c | 24 +-
drivers/net/tun.c | 3 +
drivers/net/wireless/virtual/virt_wifi.c | 4 +-
drivers/platform/x86/lg-laptop.c | 34 +-
drivers/ufs/core/ufs-mcq.c | 4 +-
drivers/usb/core/quirks.c | 2 +-
drivers/usb/host/xhci-dbgcap.c | 2 +-
drivers/usb/host/xhci-mem.c | 50 +-
drivers/usb/host/xhci.c | 2 +-
drivers/usb/host/xhci.h | 6 +-
drivers/video/fbdev/core/fbcon.c | 13 +-
fs/afs/server.c | 3 +-
fs/btrfs/volumes.c | 5 +
fs/hugetlbfs/inode.c | 10 +-
fs/proc/task_mmu.c | 3 +
fs/smb/client/smb2inode.c | 2 +-
fs/smb/server/transport_rdma.c | 22 +-
include/crypto/if_alg.h | 2 +-
include/linux/firmware/imx/sm.h | 12 +
include/linux/swap.h | 10 +
include/net/bluetooth/hci_core.h | 21 +
kernel/bpf/core.c | 5 +-
kernel/bpf/verifier.c | 6 +-
kernel/futex/requeue.c | 6 +-
kernel/trace/trace_dynevent.c | 4 +
kernel/vhost_task.c | 3 +-
mm/gup.c | 15 +-
mm/kmsan/core.c | 10 +-
mm/kmsan/kmsan_test.c | 16 +
mm/mlock.c | 6 +-
mm/swap.c | 51 +-
net/bluetooth/hci_event.c | 26 +-
net/bluetooth/hci_sync.c | 7 +
net/core/skbuff.c | 2 +-
net/ipv4/nexthop.c | 7 +
net/smc/smc_loopback.c | 14 +-
net/xfrm/xfrm_state.c | 3 +
sound/pci/hda/patch_realtek.c | 11 +
sound/usb/mixer_quirks.c | 545 +++++++++++++++------
sound/usb/quirks.c | 24 +-
sound/usb/usbaudio.h | 4 +
tools/testing/selftests/net/fib_nexthops.sh | 12 +-
80 files changed, 1037 insertions(+), 387 deletions(-)
Hello,
I want a quote and I would like to know your availability so that
i can send you the necessary documents as well as drawings and
specification.
Best regards
Tony
Hello,
I want a quote and I would like to know your availability so that
i can send you the necessary documents as well as drawings and
specification.
Best regards
Tony
iommu/amd: fix amd iotlb flush range in unmap
This was fixed in mainline in 6b080c4e815ceba3c08ffa980c858595c07e786a,
but do not backport the full refactor.
Targeting branch lts linux-5.15.y.
AMD IOMMU driver supports power of 2 KB page size, it can be 4K, 8K,
16K, etc. So when VFIO driver ask AMD IOMMU driver to unmap a
IOVA with a page_size 4K, it actually can unmap a page_size of
8K, depending on the page used during mapping. However, the iotlb
gather function use the page_size as the range of unmap range,
instead of the real unmapped page size r.
This miscalculation of iotlb flush range will make the unflushed
IOTLB entry stale. It triggered hard-to-debug silent data corruption
issue as DMA engine who used the stale IOTLB entry will DMA into
unmapped memory region.
The upstream commit aims at changing API from map/unmap_page() to
map/unmap_pages() and changed the gather range calculation along
with it. It accidentally fixed this bug in the mainline since 6.1.
For this backport, we don't backport the API change, only port the
gather range calculation to fix the bug.
Cc: Nadav Amit <namit(a)vmware.com>
Cc: Joerg Roedel <joro(a)8bytes.org>
Cc: Will Deacon <will(a)kernel.org>
Cc: Robin Murphy <robin.murphy(a)arm.com>
Cc: Lu Baolu <baolu.lu(a)linux.intel.com>
Cc: iommu(a)lists.linux-foundation.org
Fixes: fc65d0acaf23179b94de399c204328fa259acb90
Signed-off-by: Zhichuang Sun <zhichuang(a)google.com>
---
drivers/iommu/amd/iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index 714c78bf69db..d3a11be8d1dd 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -2121,7 +2121,8 @@ static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova,
r = (ops->unmap) ? ops->unmap(ops, iova, page_size, gather) : 0;
- amd_iommu_iotlb_gather_add_page(dom, gather, iova, page_size);
+ if (r)
+ amd_iommu_iotlb_gather_add_page(dom, gather, iova, r);
return r;
}
--
2.51.0.618.g983fd99d29-goog
This series backports 19 patches to update minmax.h in the 5.15.y branch,
aligning it with v6.17-rc7.
The ultimate goal is to synchronize all longterm branches so that they
include the full set of minmax.h changes (6.12.y and 6.6.y were already
backported by me and are now aligned, 6.1.y is in progress).
The key motivation is to bring in commit d03eba99f5bf ("minmax: allow
min()/max()/clamp() if the arguments have the same signedness"), which
is missing in kernel 5.10.y.
In mainline, this change enables min()/max()/clamp() to accept mixed
argument types, provided both have the same signedness. Without it,
backported patches that use these forms may trigger compiler warnings,
which escalate to build failures when -Werror is enabled.
Andy Shevchenko (1):
minmax: deduplicate __unconst_integer_typeof()
David Laight (8):
minmax: fix indentation of __cmp_once() and __clamp_once()
minmax.h: add whitespace around operators and after commas
minmax.h: update some comments
minmax.h: reduce the #define expansion of min(), max() and clamp()
minmax.h: use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()
minmax.h: move all the clamp() definitions after the min/max() ones
minmax.h: simplify the variants of clamp()
minmax.h: remove some #defines that are only expanded once
Herve Codina (1):
minmax: Introduce {min,max}_array()
Linus Torvalds (8):
minmax: avoid overly complicated constant expressions in VM code
minmax: make generic MIN() and MAX() macros available everywhere
minmax: add a few more MIN_T/MAX_T users
minmax: simplify and clarify min_t()/max_t() implementation
minmax: simplify min()/max()/clamp() implementation
minmax: don't use max() in situations that want a C constant
expression
minmax: improve macro expansion and type checking
minmax: fix up min3() and max3() too
Matthew Wilcox (Oracle) (1):
minmax: add in_range() macro
arch/arm/mm/pageattr.c | 6 +-
arch/um/drivers/mconsole_user.c | 2 +
arch/x86/mm/pgtable.c | 2 +-
drivers/edac/sb_edac.c | 4 +-
drivers/edac/skx_common.h | 1 -
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +
.../drm/amd/display/modules/hdcp/hdcp_ddc.c | 2 +
.../drm/amd/pm/powerplay/hwmgr/ppevvmath.h | 14 +-
.../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +
.../drm/arm/display/include/malidp_utils.h | 2 +-
.../display/komeda/komeda_pipeline_state.c | 24 +-
drivers/gpu/drm/drm_color_mgmt.c | 2 +-
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 -
drivers/gpu/drm/radeon/evergreen_cs.c | 2 +
drivers/hwmon/adt7475.c | 24 +-
drivers/input/touchscreen/cyttsp4_core.c | 2 +-
drivers/irqchip/irq-sun6i-r.c | 2 +-
drivers/md/dm-integrity.c | 4 +-
drivers/media/dvb-frontends/stv0367_priv.h | 3 +
.../net/ethernet/chelsio/cxgb3/cxgb3_main.c | 18 +-
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
drivers/net/fjes/fjes_main.c | 4 +-
drivers/nfc/pn544/i2c.c | 2 -
drivers/platform/x86/sony-laptop.c | 1 -
drivers/scsi/isci/init.c | 6 +-
.../pci/hive_isp_css_include/math_support.h | 5 -
drivers/virt/acrn/ioreq.c | 4 +-
fs/btrfs/misc.h | 2 -
fs/btrfs/tree-checker.c | 2 +-
fs/ext2/balloc.c | 2 -
fs/ext4/ext4.h | 2 -
fs/ufs/util.h | 6 -
include/linux/compiler.h | 9 +
include/linux/minmax.h | 264 +++++++++++++-----
kernel/trace/preemptirq_delay_test.c | 2 -
lib/btree.c | 1 -
lib/decompress_unlzma.c | 2 +
lib/logic_pio.c | 3 -
lib/vsprintf.c | 2 +-
lib/zstd/zstd_internal.h | 2 -
mm/zsmalloc.c | 1 -
net/ipv4/proc.c | 2 +-
net/ipv6/proc.c | 2 +-
net/netfilter/nf_nat_core.c | 6 +-
net/tipc/core.h | 2 +-
net/tipc/link.c | 10 +-
tools/testing/selftests/vm/mremap_test.c | 2 +
47 files changed, 289 insertions(+), 183 deletions(-)
--
2.47.3
Since v6.1.154, mptcp selftests have failed to build with the following
errors:
mptcp_connect.c: In function ‘main_loop_s’:
mptcp_connect.c:1040:59: error: ‘winfo’ undeclared (first use in this function)
1040 | err = copyfd_io(fd, remotesock, 1, true, &winfo);
| ^~~~~
mptcp_connect.c:1040:59: note: each undeclared identifier is reported only once for each function it appears in
mptcp_connect.c:1040:23: error: too many arguments to function ‘copyfd_io’; expected 4, have 5
1040 | err = copyfd_io(fd, remotesock, 1, true, &winfo);
| ^~~~~~~~~ ~~~~~~
mptcp_connect.c:845:12: note: declared here
845 | static int copyfd_io(int infd, int peerfd, int outfd, bool close_peerfd)
| ^~~~~~~~~
This is caused by commit ff160500c499 ("selftests: mptcp: connect: catch
IO errors on listen side"), a backport of upstream 14e22b43df25,
which attempts to use the undeclared variable 'winfo' and passes too many
arguments to copyfd_io(). Both the winfo variable and the updated
copyfd_io() function were introduced in upstream
commit ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener"),
which is not present in v6.1.y.
The goal of the backport is to stop on errors from copyfd_io.
Therefore, the backport does not depend on the changes in upstream
commit ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener").
This commit simply removes ', &winfo' to fix a build failure.
Fixes: ff160500c499 ("selftests: mptcp: connect: catch IO errors on listen side")
Signed-off-by: Kenta Akagi <k(a)mgml.me>
---
commit 14e22b43df25 ("selftests: mptcp: connect: catch IO errors
on listen side") has only been backported to >=v6.1.y, and commit
ca7ae8916043 ("selftests: mptcp: mptfo Initiator/Listener")
exists from v6.2. so, only v6.1.y requires this fix.
---
tools/testing/selftests/net/mptcp/mptcp_connect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
index 0d49b6753011..0b253c133f06 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
@@ -1037,7 +1037,7 @@ int main_loop_s(int listensock)
SOCK_TEST_TCPULP(remotesock, 0);
- err = copyfd_io(fd, remotesock, 1, true, &winfo);
+ err = copyfd_io(fd, remotesock, 1, true);
} else {
perror("accept");
return 1;
--
2.50.1
Similarly to pci_dev_aer_stats_incr(), pci_print_aer() may be called
when dev->aer_info is NULL. Add a NULL check before proceeding to avoid
calling aer_ratelimit() with a NULL aer_info pointer, returning 1, which
does not rate limit, given this is fatal.
This prevents a kernel crash triggered by dereferencing a NULL pointer
in aer_ratelimit(), ensuring safer handling of PCI devices that lack
AER info. This change aligns pci_print_aer() with pci_dev_aer_stats_incr()
which already performs this NULL check.
Cc: stable(a)vger.kernel.org
Fixes: a57f2bfb4a5863 ("PCI/AER: Ratelimit correctable and non-fatal error logging")
Signed-off-by: Breno Leitao <leitao(a)debian.org>
---
- This problem is still happening in upstream, and unfortunately no action
was done in the previous discussion.
- Link to previous post:
https://lore.kernel.org/r/20250804-aer_crash_2-v1-1-fd06562c18a4@debian.org
---
drivers/pci/pcie/aer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index e286c197d7167..55abc5e17b8b1 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -786,6 +786,9 @@ static void pci_rootport_aer_stats_incr(struct pci_dev *pdev,
static int aer_ratelimit(struct pci_dev *dev, unsigned int severity)
{
+ if (!dev->aer_info)
+ return 1;
+
switch (severity) {
case AER_NONFATAL:
return __ratelimit(&dev->aer_info->nonfatal_ratelimit);
---
base-commit: e5f0a698b34ed76002dc5cff3804a61c80233a7a
change-id: 20250801-aer_crash_2-b21cc2ef0d00
Best regards,
--
Breno Leitao <leitao(a)debian.org>
This series backports 13 patches to update minmax.h in the 6.1.y branch,
aligning it with v6.17-rc7.
The ultimate goal is to synchronize all longterm branches so that they
include the full set of minmax.h changes (6.12.y and 6.6.y were already
backported by me and are now ligned).
The key motivation is to bring in commit d03eba99f5bf ("minmax: allow
min()/max()/clamp() if the arguments have the same signedness"), which
is missing in older kernels.
In mainline, this change enables min()/max()/clamp() to accept mixed
argument types, provided both have the same signedness. Without it,
backported patches that use these forms may trigger compiler warnings,
which escalate to build failures when -Werror is enabled.
Changes in v3:
- v2 included 13 patches:
https://lore.kernel.org/stable/20250929183358.18982-1-farbere@amazon.com/
- First 2 were accepted and are part of 6.1.155.
- 3rd caused build in drivers/md/ to fail:
In file included from ./include/linux/container_of.h:5,
from ./include/linux/list.h:5,
from ./include/linux/wait.h:7,
from ./include/linux/mempool.h:8,
from ./include/linux/bio.h:8,
from drivers/md/dm-bio-record.h:10,
from drivers/md/dm-integrity.c:9:
drivers/md/dm-integrity.c: In function ‘integrity_metadata’:
drivers/md/dm-integrity.c:131:105: error: ISO C90 forbids variable length array ‘checksums_onstack’ [-Werror=vla]
131 | #define MAX_TAG_SIZE (JOURNAL_SECTOR_DATA - JOURNAL_MAC_PER_SECTOR - offsetof(struct journal_entry, last_bytes[MAX_SECTORS_PER_BLOCK]))
| ^~~~~~~~~~~~~
./include/linux/build_bug.h:78:56: note: in definition of macro ‘__static_assert’
78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
| ^~~~
./include/linux/minmax.h:56:9: note: in expansion of macro ‘static_assert’
56 | static_assert(__types_ok(x, y, ux, uy), \
| ^~~~~~~~~~~~~
./include/linux/minmax.h:41:31: note: in expansion of macro ‘__is_noneg_int’
41 | __is_noneg_int(x) || __is_noneg_int(y))
| ^~~~~~~~~~~~~~
./include/linux/minmax.h:56:23: note: in expansion of macro ‘__types_ok’
56 | static_assert(__types_ok(x, y, ux, uy), \
| ^~~~~~~~~~
./include/linux/minmax.h:61:9: note: in expansion of macro ‘__careful_cmp_once’
61 | __careful_cmp_once(op, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
| ^~~~~~~~~~~~~~~~~~
./include/linux/minmax.h:92:25: note: in expansion of macro ‘__careful_cmp’
92 | #define max(x, y) __careful_cmp(max, x, y)
| ^~~~~~~~~~~~~
drivers/md/dm-integrity.c:1797:40: note: in expansion of macro ‘max’
1797 | char checksums_onstack[max((size_t)HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
| ^~~
drivers/md/dm-integrity.c:131:89: note: in expansion of macro ‘offsetof’
131 | #define MAX_TAG_SIZE (JOURNAL_SECTOR_DATA - JOURNAL_MAC_PER_SECTOR - offsetof(struct journal_entry, last_bytes[MAX_SECTORS_PER_BLOCK]))
| ^~~~~~~~
drivers/md/dm-integrity.c:1797:73: note: in expansion of macro ‘MAX_TAG_SIZE’
1797 | char checksums_onstack[max((size_t)HASH_MAX_DIGESTSIZE, MAX_TAG_SIZE)];
| ^~~~~~~~~~~~
- The build was fixed in the second patch of this series.
Changes in v2:
- v1 included 19 patches:
https://lore.kernel.org/stable/20250924202320.32333-1-farbere@amazon.com/
- First 6 were pushed to the stable-tree.
- 7th cauded amd driver's build to fail.
- This change fixes it.
- Modified files:
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
David Laight (7):
minmax.h: add whitespace around operators and after commas
minmax.h: update some comments
minmax.h: reduce the #define expansion of min(), max() and clamp()
minmax.h: use BUILD_BUG_ON_MSG() for the lo < hi test in clamp()
minmax.h: move all the clamp() definitions after the min/max() ones
minmax.h: simplify the variants of clamp()
minmax.h: remove some #defines that are only expanded once
Linus Torvalds (4):
minmax: simplify min()/max()/clamp() implementation
minmax: don't use max() in situations that want a C constant
expression
minmax: improve macro expansion and type checking
minmax: fix up min3() and max3() too
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 2 +-
drivers/input/touchscreen/cyttsp4_core.c | 2 +-
drivers/irqchip/irq-sun6i-r.c | 2 +-
drivers/md/dm-integrity.c | 2 +-
fs/btrfs/tree-checker.c | 2 +-
include/linux/compiler.h | 9 +
include/linux/minmax.h | 222 +++++++++++++----------
lib/vsprintf.c | 2 +-
8 files changed, 143 insertions(+), 100 deletions(-)
--
2.47.3
Hi,
CHanges since v2:
- SHA fix for the last commit, tripple checked them
Changes since v1:
- SHAs for Fixes tag corrected (sorry)
The size of the DSP host buffer was incorrectly defined as 2ms while
it is 4ms and the ChainDMA PCMs are using 5ms as host facing buffer.
The constraint will be set against the period time rather than the buffer
time to make sure that application will not face with xruns when the
DMA bursts to refill the host buffer.
The minimal period size will be also used by Pipewire in case of SOF
cards to set the headroom to a length which will avoid the cases when
the hw_ptr jumps over the appl_ptr because of a burst.
Iow, it will make Pipewire to keep a safe distance from the hw_ptr.
https://github.com/thesofproject/linux/issues/5284https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/740https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/2548
Regards,
Peter
---
Peter Ujfalusi (3):
ASoC: SOF: ipc4-topology: Correct the minimum host DMA buffer size
ASoC: SOF: ipc4-topology: Account for different ChainDMA host buffer
size
ASoC: SOF: Intel: hda-pcm: Place the constraint on period time instead
of buffer time
sound/soc/sof/intel/hda-pcm.c | 29 +++++++++++++++++++++--------
sound/soc/sof/ipc4-topology.c | 9 +++++++--
sound/soc/sof/ipc4-topology.h | 7 +++++--
3 files changed, 33 insertions(+), 12 deletions(-)
--
2.51.0
Hi,
The size of the DSP host buffer was incorrectly defined as 2ms while
it is 4ms and the ChainDMA PCMs are using 5ms as host facing buffer.
The constraint will be set against the period time rather than the buffer
time to make sure that application will not face with xruns when the
DMA bursts to refill the host buffer.
The minimal period size will be also used by Pipewire in case of SOF
cards to set the headroom to a length which will avoid the cases when
the hw_ptr jumps over the appl_ptr because of a burst.
Iow, it will make Pipewire to keep a safe distance from the hw_ptr.
https://github.com/thesofproject/linux/issues/5284https://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/740https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/2548
Regards,
Peter
---
Peter Ujfalusi (3):
ASoC: SOF: ipc4-topology: Correct the minimum host DMA buffer size
ASoC: SOF: ipc4-topology: Account for different ChainDMA host buffer
size
ASoC: SOF: Intel: hda-pcm: Place the constraint on period time instead
of buffer time
sound/soc/sof/intel/hda-pcm.c | 29 +++++++++++++++++++++--------
sound/soc/sof/ipc4-topology.c | 9 +++++++--
sound/soc/sof/ipc4-topology.h | 7 +++++--
3 files changed, 33 insertions(+), 12 deletions(-)
--
2.51.0
Loading a large (~2.1G) files with kexec crashes the host with when
running:
# kexec --load kernel --initrd initrd_with_2G_or_more
UBSAN: signed-integer-overflow in ./include/crypto/sha256_base.h:64:19
34152083 * 64 cannot be represented in type 'int'
...
BUG: unable to handle page fault for address: ff9fffff83b624c0
sha256_update (lib/crypto/sha256.c:137)
crypto_sha256_update (crypto/sha256_generic.c:40)
kexec_calculate_store_digests (kernel/kexec_file.c:769)
__se_sys_kexec_file_load (kernel/kexec_file.c:397 kernel/kexec_file.c:332)
...
(Line numbers based on commit da274362a7bd9 ("Linux 6.12.49")
This started happening after commit f4da7afe07523f
("kexec_file: increase maximum file size to 4G") that landed in v6.0,
which increased the file size for kexec.
This is not happening upstream (v6.16+), given that `block` type was
upgraded from "int" to "size_t" in commit 74a43a2cf5e8 ("crypto:
lib/sha256 - Move partial block handling out")
Upgrade the block type similar to the commit above, avoiding hitting the
overflow.
This patch is only suitable for the stable tree, and before 6.16, which
got commit 74a43a2cf5e8 ("crypto: lib/sha256 - Move partial block
handling out"). This is not required before f4da7afe07523f ("kexec_file:
increase maximum file size to 4G"). In other words, this fix is required
between versions v6.0 and v6.16.
Signed-off-by: Breno Leitao <leitao(a)debian.org>
Fixes: f4da7afe07523f ("kexec_file: increase maximum file size to 4G") # Before v6.16
Reported-by: Michael van der Westhuizen <rmikey(a)meta.com>
Reported-by: Tobias Fleig <tfleig(a)meta.com>
---
Changes in v2:
- s/size_t/unsigned int/ as suggested by Eric
- Tag the commit that introduce the problem as Fixes, making backport easier.
- Link to v1: https://lore.kernel.org/r/20251001-stable_crash-v1-1-3071c0bd795e@debian.org
---
include/crypto/sha256_base.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/crypto/sha256_base.h b/include/crypto/sha256_base.h
index e0418818d63c8..e3e610cfe8d30 100644
--- a/include/crypto/sha256_base.h
+++ b/include/crypto/sha256_base.h
@@ -44,7 +44,7 @@ static inline int lib_sha256_base_do_update(struct sha256_state *sctx,
sctx->count += len;
if (unlikely((partial + len) >= SHA256_BLOCK_SIZE)) {
- int blocks;
+ unsigned int blocks;
if (partial) {
int p = SHA256_BLOCK_SIZE - partial;
---
base-commit: da274362a7bd9ab3a6e46d15945029145ebce672
change-id: 20251001-stable_crash-f2151baf043b
Best regards,
--
Breno Leitao <leitao(a)debian.org>
From: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com>
In the case of static pipelines, freeing the widgets in the pipelines
that were not suspended after freeing the scheduler widgets results in
errors because the secondary cores are powered off when the scheduler
widgets are freed. Fix this by tearing down the leftover pipelines before
powering off the secondary cores.
Cc: stable(a)vger.kernel.org
Fixes: d7332c4a4f1a ("ASoC: SOF: ipc3-topology: Fix pipeline tear down logic")
Signed-off-by: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi(a)linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi(a)linux.intel.com>
---
sound/soc/sof/ipc3-topology.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/sof/ipc3-topology.c b/sound/soc/sof/ipc3-topology.c
index 473d416bc910..f449362a2905 100644
--- a/sound/soc/sof/ipc3-topology.c
+++ b/sound/soc/sof/ipc3-topology.c
@@ -2473,11 +2473,6 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif
if (ret < 0)
return ret;
- /* free all the scheduler widgets now */
- ret = sof_ipc3_free_widgets_in_list(sdev, true, &dyn_widgets, verify);
- if (ret < 0)
- return ret;
-
/*
* Tear down all pipelines associated with PCMs that did not get suspended
* and unset the prepare flag so that they can be set up again during resume.
@@ -2493,6 +2488,11 @@ static int sof_ipc3_tear_down_all_pipelines(struct snd_sof_dev *sdev, bool verif
}
}
+ /* free all the scheduler widgets now. This will also power down the secondary cores */
+ ret = sof_ipc3_free_widgets_in_list(sdev, true, &dyn_widgets, verify);
+ if (ret < 0)
+ return ret;
+
list_for_each_entry(sroute, &sdev->route_list, list)
sroute->setup = false;
--
2.51.0
From: Viacheslav Dubeyko <slava(a)dubeyko.com>
[ Upstream commit 2048ec5b98dbdfe0b929d2e42dc7a54c389c53dd ]
The syzbot reported issue in hfs_find_set_zero_bits():
=====================================================
BUG: KMSAN: uninit-value in hfs_find_set_zero_bits+0x74d/0xb60 fs/hfs/bitmap.c:45
hfs_find_set_zero_bits+0x74d/0xb60 fs/hfs/bitmap.c:45
hfs_vbm_search_free+0x13c/0x5b0 fs/hfs/bitmap.c:151
hfs_extend_file+0x6a5/0x1b00 fs/hfs/extent.c:408
hfs_get_block+0x435/0x1150 fs/hfs/extent.c:353
__block_write_begin_int+0xa76/0x3030 fs/buffer.c:2151
block_write_begin fs/buffer.c:2262 [inline]
cont_write_begin+0x10e1/0x1bc0 fs/buffer.c:2601
hfs_write_begin+0x85/0x130 fs/hfs/inode.c:52
cont_expand_zero fs/buffer.c:2528 [inline]
cont_write_begin+0x35a/0x1bc0 fs/buffer.c:2591
hfs_write_begin+0x85/0x130 fs/hfs/inode.c:52
hfs_file_truncate+0x1d6/0xe60 fs/hfs/extent.c:494
hfs_inode_setattr+0x964/0xaa0 fs/hfs/inode.c:654
notify_change+0x1993/0x1aa0 fs/attr.c:552
do_truncate+0x28f/0x310 fs/open.c:68
do_ftruncate+0x698/0x730 fs/open.c:195
do_sys_ftruncate fs/open.c:210 [inline]
__do_sys_ftruncate fs/open.c:215 [inline]
__se_sys_ftruncate fs/open.c:213 [inline]
__x64_sys_ftruncate+0x11b/0x250 fs/open.c:213
x64_sys_call+0xfe3/0x3db0 arch/x86/include/generated/asm/syscalls_64.h:78
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was created at:
slab_post_alloc_hook mm/slub.c:4154 [inline]
slab_alloc_node mm/slub.c:4197 [inline]
__kmalloc_cache_noprof+0x7f7/0xed0 mm/slub.c:4354
kmalloc_noprof include/linux/slab.h:905 [inline]
hfs_mdb_get+0x1cc8/0x2a90 fs/hfs/mdb.c:175
hfs_fill_super+0x3d0/0xb80 fs/hfs/super.c:337
get_tree_bdev_flags+0x6e3/0x920 fs/super.c:1681
get_tree_bdev+0x38/0x50 fs/super.c:1704
hfs_get_tree+0x35/0x40 fs/hfs/super.c:388
vfs_get_tree+0xb0/0x5c0 fs/super.c:1804
do_new_mount+0x738/0x1610 fs/namespace.c:3902
path_mount+0x6db/0x1e90 fs/namespace.c:4226
do_mount fs/namespace.c:4239 [inline]
__do_sys_mount fs/namespace.c:4450 [inline]
__se_sys_mount+0x6eb/0x7d0 fs/namespace.c:4427
__x64_sys_mount+0xe4/0x150 fs/namespace.c:4427
x64_sys_call+0xfa7/0x3db0 arch/x86/include/generated/asm/syscalls_64.h:166
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
CPU: 1 UID: 0 PID: 12609 Comm: syz.1.2692 Not tainted 6.16.0-syzkaller #0 PREEMPT(none)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
=====================================================
The HFS_SB(sb)->bitmap buffer is allocated in hfs_mdb_get():
HFS_SB(sb)->bitmap = kmalloc(8192, GFP_KERNEL);
Finally, it can trigger the reported issue because kmalloc()
doesn't clear the allocated memory. If allocated memory contains
only zeros, then everything will work pretty fine.
But if the allocated memory contains the "garbage", then
it can affect the bitmap operations and it triggers
the reported issue.
This patch simply exchanges the kmalloc() on kzalloc()
with the goal to guarantee the correctness of bitmap operations.
Because, newly created allocation bitmap should have all
available blocks free. Potentially, initialization bitmap's read
operation could not fill the whole allocated memory and
"garbage" in the not initialized memory will be the reason of
volume coruptions and file system driver bugs.
Reported-by: syzbot <syzbot+773fa9d79b29bd8b6831(a)syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=773fa9d79b29bd8b6831
Signed-off-by: Viacheslav Dubeyko <slava(a)dubeyko.com>
cc: John Paul Adrian Glaubitz <glaubitz(a)physik.fu-berlin.de>
cc: Yangtao Li <frank.li(a)vivo.com>
cc: linux-fsdevel(a)vger.kernel.org
Link: https://lore.kernel.org/r/20250820230636.179085-1-slava@dubeyko.com
Signed-off-by: Viacheslav Dubeyko <slava(a)dubeyko.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
LLM Generated explanations, may be completely bogus:
## YES
This commit should be backported to stable kernel trees and **has
already been backported** (commit 71929d4dcb5ed in the current tree is
the backported version).
### Detailed Analysis
#### Bug Severity and Impact
**Critical filesystem corruption bug** present since 2016 (commit
80f8dccf95147f):
1. **Uninitialized Memory Issue**: The HFS bitmap buffer is allocated
with `kmalloc(8192, GFP_KERNEL)` at fs/hfs/mdb.c:175, but `kmalloc()`
does not zero memory. The subsequent bitmap read operation (lines
179-197) only reads `(fs_ablocks + 8) / 8` bytes from disk,
potentially leaving a large portion of the 8192-byte buffer
uninitialized.
2. **Quantified Impact**:
- Small filesystem (10,000 blocks): **84.7%** of bitmap uninitialized
(6,941 bytes)
- Medium filesystem (50,000 blocks): **23.7%** uninitialized (1,941
bytes)
- Only filesystems near 65,528 blocks fully initialize the buffer
3. **Real-World Consequences**:
- When `hfs_find_set_zero_bits()` (fs/hfs/bitmap.c:44) accesses the
bitmap at `val = *curr`, it reads uninitialized garbage
- This causes incorrect block allocation decisions during file
operations (extend, truncate, write)
- Can lead to filesystem corruption, data loss, or allocation
failures
- Detected by KMSAN during syzbot fuzzing, indicating real
exploitability
#### The Fix
**Perfect minimal fix** - single line change at fs/hfs/mdb.c:175:
```c
- HFS_SB(sb)->bitmap = kmalloc(8192, GFP_KERNEL);
+ HFS_SB(sb)->bitmap = kzalloc(8192, GFP_KERNEL);
```
`kzalloc()` guarantees zero-initialized memory, ensuring the bitmap
starts in a correct state where unread regions are treated as free (zero
bits).
#### Stable Backport Criteria Evaluation
✅ **Fixes user-affecting bug**: Prevents filesystem corruption and
incorrect block allocation
✅ **Small and contained**: Single line change, no side effects
✅ **No architectural changes**: Simple allocation function swap
✅ **Minimal regression risk**: Zero risk - only makes behavior more
correct
✅ **Confined to subsystem**: Only affects HFS filesystem code
✅ **Follows stable rules**: Important bugfix, minimal change, well-
tested (syzbot reported)
#### Context and History
- **Bug introduced**: 2016-01-02 by Al Viro (80f8dccf95147f) when
replacing `__get_free_pages()` with `kmalloc()`
- **Mainline fix**: 2025-08-20 (commit
2048ec5b98dbdfe0b929d2e42dc7a54c389c53dd)
- **Backport status**: Already backported to this tree (71929d4dcb5ed)
by Sasha Levin
- **Similar fixes**: Recent HFS bug fixes (slab-out-of-bounds, GPF
issues) typically include `Cc: stable(a)vger.kernel.org` and get
backported
- **Active maintenance**: 155 commits to fs/hfs/ since 2022, showing
continued bugfixing effort
#### Technical Review
The commit message correctly explains the issue and references the
syzkaller report. The fix is architecturally sound - the bitmap should
logically start with all blocks free (zero bits), so zero-initializing
the buffer is the correct approach rather than relying on disk data to
fill all 8192 bytes.
**Performance impact**: Negligible one-time cost of zeroing 8KB during
mount operation.
**Backport recommendation**: **STRONGLY RECOMMENDED** for all stable
trees supporting HFS filesystem.
fs/hfs/mdb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c
index 8082eb01127cd..bf811347bb07d 100644
--- a/fs/hfs/mdb.c
+++ b/fs/hfs/mdb.c
@@ -172,7 +172,7 @@ int hfs_mdb_get(struct super_block *sb)
pr_warn("continuing without an alternate MDB\n");
}
- HFS_SB(sb)->bitmap = kmalloc(8192, GFP_KERNEL);
+ HFS_SB(sb)->bitmap = kzalloc(8192, GFP_KERNEL);
if (!HFS_SB(sb)->bitmap)
goto out;
--
2.51.0
From: Lance Yang <lance.yang(a)linux.dev>
When splitting an mTHP and replacing a zero-filled subpage with the shared
zeropage, try_to_map_unused_to_zeropage() currently drops several important
PTE bits.
For userspace tools like CRIU, which rely on the soft-dirty mechanism for
incremental snapshots, losing the soft-dirty bit means modified pages are
missed, leading to inconsistent memory state after restore.
As pointed out by David, the more critical uffd-wp bit is also dropped.
This breaks the userfaultfd write-protection mechanism, causing writes
to be silently missed by monitoring applications, which can lead to data
corruption.
Preserve both the soft-dirty and uffd-wp bits from the old PTE when
creating the new zeropage mapping to ensure they are correctly tracked.
Cc: <stable(a)vger.kernel.org>
Fixes: b1f202060afe ("mm: remap unused subpages to shared zeropage when splitting isolated thp")
Suggested-by: David Hildenbrand <david(a)redhat.com>
Suggested-by: Dev Jain <dev.jain(a)arm.com>
Acked-by: David Hildenbrand <david(a)redhat.com>
Reviewed-by: Dev Jain <dev.jain(a)arm.com>
Signed-off-by: Lance Yang <lance.yang(a)linux.dev>
---
v4 -> v5:
- Move ptep_get() call after the !pvmw.pte check, which handles PMD-mapped
THP migration entries.
- https://lore.kernel.org/linux-mm/20250930071053.36158-1-lance.yang@linux.de…
v3 -> v4:
- Minor formatting tweak in try_to_map_unused_to_zeropage() function
signature (per David and Dev)
- Collect Reviewed-by from Dev - thanks!
- https://lore.kernel.org/linux-mm/20250930060557.85133-1-lance.yang@linux.de…
v2 -> v3:
- ptep_get() gets called only once per iteration (per Dev)
- https://lore.kernel.org/linux-mm/20250930043351.34927-1-lance.yang@linux.de…
v1 -> v2:
- Avoid calling ptep_get() multiple times (per Dev)
- Double-check the uffd-wp bit (per David)
- Collect Acked-by from David - thanks!
- https://lore.kernel.org/linux-mm/20250928044855.76359-1-lance.yang@linux.de…
mm/migrate.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index ce83c2c3c287..e3065c9edb55 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -296,8 +296,7 @@ bool isolate_folio_to_list(struct folio *folio, struct list_head *list)
}
static bool try_to_map_unused_to_zeropage(struct page_vma_mapped_walk *pvmw,
- struct folio *folio,
- unsigned long idx)
+ struct folio *folio, pte_t old_pte, unsigned long idx)
{
struct page *page = folio_page(folio, idx);
pte_t newpte;
@@ -306,7 +305,7 @@ static bool try_to_map_unused_to_zeropage(struct page_vma_mapped_walk *pvmw,
return false;
VM_BUG_ON_PAGE(!PageAnon(page), page);
VM_BUG_ON_PAGE(!PageLocked(page), page);
- VM_BUG_ON_PAGE(pte_present(ptep_get(pvmw->pte)), page);
+ VM_BUG_ON_PAGE(pte_present(old_pte), page);
if (folio_test_mlocked(folio) || (pvmw->vma->vm_flags & VM_LOCKED) ||
mm_forbids_zeropage(pvmw->vma->vm_mm))
@@ -322,6 +321,12 @@ static bool try_to_map_unused_to_zeropage(struct page_vma_mapped_walk *pvmw,
newpte = pte_mkspecial(pfn_pte(my_zero_pfn(pvmw->address),
pvmw->vma->vm_page_prot));
+
+ if (pte_swp_soft_dirty(old_pte))
+ newpte = pte_mksoft_dirty(newpte);
+ if (pte_swp_uffd_wp(old_pte))
+ newpte = pte_mkuffd_wp(newpte);
+
set_pte_at(pvmw->vma->vm_mm, pvmw->address, pvmw->pte, newpte);
dec_mm_counter(pvmw->vma->vm_mm, mm_counter(folio));
@@ -364,13 +369,13 @@ static bool remove_migration_pte(struct folio *folio,
continue;
}
#endif
+ old_pte = ptep_get(pvmw.pte);
if (rmap_walk_arg->map_unused_to_zeropage &&
- try_to_map_unused_to_zeropage(&pvmw, folio, idx))
+ try_to_map_unused_to_zeropage(&pvmw, folio, old_pte, idx))
continue;
folio_get(folio);
pte = mk_pte(new, READ_ONCE(vma->vm_page_prot));
- old_pte = ptep_get(pvmw.pte);
entry = pte_to_swp_entry(old_pte);
if (!is_migration_entry_young(entry))
--
2.49.0
This is the start of the stable review cycle for the 6.1.154 release.
There are 61 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 24 Sep 2025 19:23:52 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.1.154-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.1.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 6.1.154-rc1
Herbert Xu <herbert(a)gondor.apana.org.au>
crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg
David Howells <dhowells(a)redhat.com>
crypto: af_alg: Convert af_alg_sendpage() to use MSG_SPLICE_PAGES
Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org>
ASoC: qcom: q6apm-lpass-dais: Fix NULL pointer dereference if source graph failed
Srinivas Kandagatla <srinivas.kandagatla(a)linaro.org>
ASoC: q6apm-lpass-dai: close graph on prepare errors
Srinivas Kandagatla <srinivas.kandagatla(a)linaro.org>
ASoC: qcom: q6apm-lpass-dai: close graphs before opening a new one
Hans de Goede <hansg(a)kernel.org>
net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer
Philipp Zabel <p.zabel(a)pengutronix.de>
net: rfkill: gpio: add DT support
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
selftests: mptcp: connect: catch IO errors on listen side
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
mptcp: propagate shutdown to subflows when possible
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: dbc: Fix full DbC transfer ring after several reconnects
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: dbc: decouple endpoint allocation from initialization
Johan Hovold <johan(a)kernel.org>
phy: ti: omap-usb2: fix device leak at unbind
Rob Herring <robh(a)kernel.org>
phy: Use device_get_match_data()
Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org>
phy: broadcom: ns-usb3: fix Wvoid-pointer-to-enum-cast warning
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
selftests: mptcp: userspace pm: validate deny-join-id0 flag
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
mptcp: pm: nl: announce deny-join-id0 flag
Stefan Metzmacher <metze(a)samba.org>
smb: client: fix smbdirect_recv_io leak in smbd_negotiate() error path
Herbert Xu <herbert(a)gondor.apana.org.au>
crypto: af_alg - Set merge to zero early in af_alg_sendmsg
David Howells <dhowells(a)redhat.com>
crypto: af_alg: Indent the loop in af_alg_sendmsg()
Qi Xi <xiqi2(a)huawei.com>
drm: bridge: cdns-mhdp8546: Fix missing mutex unlock on error path
Loic Poulain <loic.poulain(a)oss.qualcomm.com>
drm: bridge: anx7625: Fix NULL pointer dereference with early IRQ
Colin Ian King <colin.i.king(a)gmail.com>
ASoC: SOF: Intel: hda-stream: Fix incorrect variable used in error message
Charles Keepax <ckeepax(a)opensource.cirrus.com>
ASoC: wm8974: Correct PLL rate rounding
Charles Keepax <ckeepax(a)opensource.cirrus.com>
ASoC: wm8940: Correct typo in control name
Jens Axboe <axboe(a)kernel.dk>
io_uring: include dying ring in task_work "should cancel" state
Jens Axboe <axboe(a)kernel.dk>
io_uring: backport io_should_terminate_tw()
Praful Adiga <praful.adiga(a)gmail.com>
ALSA: hda/realtek: Fix mute led for HP Laptop 15-dw4xx
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
selftests: mptcp: avoid spurious errors on TCP disconnect
Håkon Bugge <haakon.bugge(a)oracle.com>
rds: ib: Increment i_fastreg_wrs before bailing out
Maciej S. Szmigiero <maciej.szmigiero(a)oracle.com>
KVM: SVM: Sync TPR from LAPIC into VMCB::V_TPR even if AVIC is active
Thomas Fourier <fourier.thomas(a)gmail.com>
mmc: mvsdio: Fix dma_unmap_sg() nents value
Mohammad Rafi Shaik <mohammad.rafi.shaik(a)oss.qualcomm.com>
ASoC: qcom: q6apm-lpass-dais: Fix missing set_fmt DAI op for I2S
Mohammad Rafi Shaik <mohammad.rafi.shaik(a)oss.qualcomm.com>
ASoC: qcom: audioreach: Fix lpaif_type configuration for the I2S interface
Qu Wenruo <wqu(a)suse.com>
btrfs: tree-checker: fix the incorrect inode ref size check
Eugene Koira <eugkoira(a)amazon.com>
iommu/vt-d: Fix __domain_mapping()'s usage of switch_to_super_page()
Tao Cui <cuitao(a)kylinos.cn>
LoongArch: Check the return value when creating kobj
Huacai Chen <chenhuacai(a)kernel.org>
LoongArch: Align ACPI structures if ARCH_STRICT_ALIGN enabled
H. Nikolaus Schaller <hns(a)goldelico.com>
power: supply: bq27xxx: restrict no-battery detection to bq27000
H. Nikolaus Schaller <hns(a)goldelico.com>
power: supply: bq27xxx: fix error return in case of no bq27000 hdq battery
Nathan Chancellor <nathan(a)kernel.org>
nilfs2: fix CFI failure when accessing /sys/fs/nilfs2/features/*
Stefan Metzmacher <metze(a)samba.org>
ksmbd: smbdirect: verify remaining_data_length respects max_fragmented_recv_size
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: smbdirect: validate data_offset and data_length field of smb_direct_data_transfer
Duoming Zhou <duoming(a)zju.edu.cn>
octeontx2-pf: Fix use-after-free bugs in otx2_sync_tstamp()
Duoming Zhou <duoming(a)zju.edu.cn>
cnic: Fix use-after-free bugs in cnic_delete_task
Alexey Nepomnyashih <sdl(a)nppct.ru>
net: liquidio: fix overflow in octeon_init_instr_queue()
Tariq Toukan <tariqt(a)nvidia.com>
Revert "net/mlx5e: Update and set Xon/Xoff upon port speed set"
Jakub Kicinski <kuba(a)kernel.org>
tls: make sure to abort the stream if headers are bogus
Kuniyuki Iwashima <kuniyu(a)google.com>
tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().
Hangbin Liu <liuhangbin(a)gmail.com>
bonding: don't set oif to bond dev when getting NS target destination
Maciej Fijalkowski <maciej.fijalkowski(a)intel.com>
i40e: remove redundant memory barrier when cleaning Tx descs
Yeounsu Moon <yyyynoom(a)gmail.com>
net: natsemi: fix `rx_dropped` double accounting on `netif_rx()` failure
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
mptcp: set remote_deny_join_id0 on SYN recv
Jamie Bainbridge <jamie.bainbridge(a)gmail.com>
qed: Don't collect too many protection override GRC elements
Ioana Ciornei <ioana.ciornei(a)nxp.com>
dpaa2-switch: fix buffer pool seeding for control traffic
Miaoqian Lin <linmq006(a)gmail.com>
um: virtio_uml: Fix use-after-free after put_device in probe
Filipe Manana <fdmanana(a)suse.com>
btrfs: fix invalid extref key setup when replaying dentry
Chen Ridong <chenridong(a)huawei.com>
cgroup: split cgroup_destroy_wq into 3 workqueues
Geert Uytterhoeven <geert+renesas(a)glider.be>
pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch
Liao Yuanhong <liaoyuanhong(a)vivo.com>
wifi: mac80211: fix incorrect type for ret
Lachlan Hodges <lachlan.hodges(a)morsemicro.com>
wifi: mac80211: increase scan_ies_len for S1G
Takashi Sakamoto <o-takashi(a)sakamocchi.jp>
ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported
-------------
Diffstat:
Makefile | 4 +-
arch/loongarch/include/asm/acenv.h | 7 +-
arch/loongarch/kernel/env.c | 2 +
arch/um/drivers/virtio_uml.c | 6 +-
arch/x86/kvm/svm/svm.c | 3 +-
crypto/af_alg.c | 112 ++++++++-------------
drivers/gpu/drm/bridge/analogix/anx7625.c | 6 +-
.../gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 6 +-
drivers/iommu/intel/iommu.c | 7 +-
drivers/mmc/host/mvsdio.c | 2 +-
drivers/net/bonding/bond_main.c | 1 -
drivers/net/ethernet/broadcom/cnic.c | 3 +-
.../net/ethernet/cavium/liquidio/request_manager.c | 2 +-
.../net/ethernet/freescale/dpaa2/dpaa2-switch.c | 2 +-
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 -
.../net/ethernet/marvell/octeontx2/nic/otx2_ptp.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 -
drivers/net/ethernet/natsemi/ns83820.c | 13 ++-
drivers/net/ethernet/qlogic/qed/qed_debug.c | 7 +-
drivers/pcmcia/omap_cf.c | 8 +-
drivers/phy/broadcom/phy-bcm-ns-usb3.c | 9 +-
drivers/phy/marvell/phy-berlin-usb.c | 7 +-
drivers/phy/ralink/phy-ralink-usb.c | 10 +-
drivers/phy/rockchip/phy-rockchip-pcie.c | 11 +-
drivers/phy/rockchip/phy-rockchip-usb.c | 10 +-
drivers/phy/ti/phy-omap-control.c | 9 +-
drivers/phy/ti/phy-omap-usb2.c | 24 +++--
drivers/phy/ti/phy-ti-pipe3.c | 14 +--
drivers/power/supply/bq27xxx_battery.c | 4 +-
drivers/usb/host/xhci-dbgcap.c | 94 ++++++++++++-----
fs/btrfs/tree-checker.c | 4 +-
fs/btrfs/tree-log.c | 2 +-
fs/nilfs2/sysfs.c | 4 +-
fs/nilfs2/sysfs.h | 8 +-
fs/smb/client/smbdirect.c | 4 +-
fs/smb/server/transport_rdma.c | 26 +++--
include/crypto/if_alg.h | 10 +-
include/uapi/linux/mptcp.h | 6 +-
io_uring/io_uring.c | 13 ++-
io_uring/io_uring.h | 13 +++
io_uring/poll.c | 3 +-
io_uring/timeout.c | 2 +-
kernel/cgroup/cgroup.c | 43 ++++++--
net/ipv4/tcp.c | 5 +
net/mac80211/driver-ops.h | 2 +-
net/mac80211/main.c | 7 +-
net/mptcp/pm_netlink.c | 7 ++
net/mptcp/protocol.c | 15 +++
net/mptcp/subflow.c | 4 +
net/rds/ib_frmr.c | 20 ++--
net/rfkill/rfkill-gpio.c | 22 +++-
net/tls/tls.h | 1 +
net/tls/tls_strp.c | 14 ++-
net/tls/tls_sw.c | 3 +-
sound/firewire/motu/motu-hwdep.c | 2 +-
sound/pci/hda/patch_realtek.c | 1 +
sound/soc/codecs/wm8940.c | 2 +-
sound/soc/codecs/wm8974.c | 8 +-
sound/soc/qcom/qdsp6/audioreach.c | 1 +
sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 36 +++++--
sound/soc/sof/intel/hda-stream.c | 2 +-
tools/testing/selftests/net/mptcp/mptcp_connect.c | 11 +-
tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 7 ++
tools/testing/selftests/net/mptcp/userspace_pm.sh | 14 ++-
64 files changed, 440 insertions(+), 272 deletions(-)
From: Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
Commit 43c51bb573aa ("sc16is7xx: make sure device is in suspend once
probed") permanently enabled access to the enhanced features in
sc16is7xx_probe(), and it is never disabled after that.
Therefore, remove useless re-enable of enhanced features in
sc16is7xx_set_baud().
Fixes: 43c51bb573aa ("sc16is7xx: make sure device is in suspend once probed")
Cc: stable(a)vger.kernel.org
Signed-off-by: Hugo Villeneuve <hvilleneuve(a)dimonoff.com>
---
drivers/tty/serial/sc16is7xx.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 1a2c4c14f6aac..c7435595dce13 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -588,13 +588,6 @@ static int sc16is7xx_set_baud(struct uart_port *port, int baud)
div /= prescaler;
}
- /* Enable enhanced features */
- sc16is7xx_efr_lock(port);
- sc16is7xx_port_update(port, SC16IS7XX_EFR_REG,
- SC16IS7XX_EFR_ENABLE_BIT,
- SC16IS7XX_EFR_ENABLE_BIT);
- sc16is7xx_efr_unlock(port);
-
/* If bit MCR_CLKSEL is set, the divide by 4 prescaler is activated. */
sc16is7xx_port_update(port, SC16IS7XX_MCR_REG,
SC16IS7XX_MCR_CLKSEL_BIT,
--
2.39.5
Hello,
This series is based on commit
320475fbd590 Merge tag 'mtd/fixes-for-6.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
of Mainline Linux.
The first patch in the series has been posted as a Fix in contrast to
its predecessor at:
https://lore.kernel.org/r/20250903124505.365913-10-s-vadapalli@ti.com/
based on the feedback provided by Jiri Slaby <jirislaby(a)kernel.org> at:
https://lore.kernel.org/r/3d3a4b52-e343-42f3-9d69-94c259812143@kernel.org/
Since the Fix is independent of enabling loadable module support for the
pci-keystone.c driver, it is being posted as a new patch.
Checking out at the commit of Mainline Linux which this series is based
on, I noticed an exception triggered by the pci-keystone.c driver during
its probe. Although this is not a fatal exception and Linux continues to
boot, the driver is non-functional. I root-caused the exception to
free_initmem() freeing the memory associated with the ks_pcie_host_init()
function in the driver before the driver's probe was invoked. This
appears to be a race condition but it is easily reproducible with the
Linux .config that I have used. The fix therefore is to remove the
__init macro which is implemented by the second patch in the series.
For reference, the logs for the case where Linux is built by checking
out at the base commit of Mainline Linux are:
https://gist.github.com/Siddharth-Vadapalli-at-TI/f4891b707921c53dfb464ad2f…
and the logs clearly prove that the print associated with free_initmem()
which is:
[ 2.446834] Freeing unused kernel memory: 4864K
is displayed prior to the prints associated with the pci-keystone.c
driver being probed which is:
[ 7.707103] keystone-pcie 5500000.pcie: host bridge /bus@100000/pcie@5500000 ranges:
Building Linux by applying both patches in the series on the base commit of
Mainline Linux, the driver probes successfully without any exceptions or
errors. This was tested on AM654-EVM with an NVMe SSD connected to the
PCIe Connector on the board. The NVMe SSD enumerates successfully.
Additionally, the 'hdparm' utility was used to read from the SSD
confirming that the SSD is functional. The logs corresponding to this are:
https://gist.github.com/Siddharth-Vadapalli-at-TI/1b09a12a53db4233e82c5bcfc…
Regards,
Siddharth.
Siddharth Vadapalli (2):
PCI: keystone: Use devm_request_irq() to free "ks-pcie-error-irq" on
exit
PCI: keystone: Remove the __init macro for the ks_pcie_host_init()
callback
drivers/pci/controller/dwc/pci-keystone.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--
2.43.0