Changelog in Linux kernel 6.6.112

 
ACPI: NFIT: Fix incorrect ndr_desc being reportedin dev_err message [+ + +]
Author: Colin Ian King <colin.i.king@gmail.com>
Date:   Tue Sep 2 12:45:18 2025 +0100

    ACPI: NFIT: Fix incorrect ndr_desc being reportedin dev_err message
    
    [ Upstream commit d1a599a8136b16522b5afebd122395524496d549 ]
    
    There appears to be a cut-n-paste error with the incorrect field
    ndr_desc->numa_node being reported for the target node. Fix this by
    using ndr_desc->target_node instead.
    
    Fixes: f060db99374e ("ACPI: NFIT: Use fallback node id when numa info in NFIT table is incorrect")
    Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
    Reviewed-by: Ira Weiny <ira.weiny@intel.com>
    Signed-off-by: Ira Weiny <ira.weiny@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ACPI: processor: idle: Fix memory leak when register cpuidle device failed [+ + +]
Author: Huisong Li <lihuisong@huawei.com>
Date:   Mon Jul 28 15:06:11 2025 +0800

    ACPI: processor: idle: Fix memory leak when register cpuidle device failed
    
    [ Upstream commit 11b3de1c03fa9f3b5d17e6d48050bc98b3704420 ]
    
    The cpuidle device's memory is leaked when cpuidle device registration
    fails in acpi_processor_power_init().  Free it as appropriate.
    
    Fixes: 3d339dcbb56d ("cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure")
    Signed-off-by: Huisong Li <lihuisong@huawei.com>
    Link: https://patch.msgid.link/20250728070612.1260859-2-lihuisong@huawei.com
    [ rjw: Changed the order of the new statements, added empty line after if () ]
    [ rjw: Changelog edits ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ACPICA: Fix largest possible resource descriptor index [+ + +]
Author: Dmitry Antipov <dmantipov@yandex.ru>
Date:   Fri Sep 12 22:03:16 2025 +0200

    ACPICA: Fix largest possible resource descriptor index
    
    [ Upstream commit 8ca944fea4d6d9019e01f2d6f6e766f315a9d73f ]
    
    ACPI_RESOURCE_NAME_LARGE_MAX should be equal to the last actually
    used resource descriptor index (ACPI_RESOURCE_NAME_CLOCK_INPUT).
    
    Otherwise 'resource_index' in 'acpi_ut_validate_resource()' may be
    clamped incorrectly and resulting value may issue an out-of-bounds
    access for 'acpi_gbl_resource_types' array. Compile tested only.
    
    Fixes: 520d4a0ee5b6 ("ACPICA: add support for ClockInput resource (v6.5)")
    Link: https://github.com/acpica/acpica/commit/cf00116c
    Link: https://marc.info/?l=linux-acpi&m=175449676131260&w=2
    Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ALSA: lx_core: use int type to store negative error codes [+ + +]
Author: Qianfeng Rong <rongqianfeng@vivo.com>
Date:   Thu Aug 28 16:13:10 2025 +0800

    ALSA: lx_core: use int type to store negative error codes
    
    [ Upstream commit 4ef353d546cda466fc39b7daca558d7bcec21c09 ]
    
    Change the 'ret' variable from u16 to int to store negative error codes or
    zero returned by lx_message_send_atomic().
    
    Storing the negative error codes in unsigned type, doesn't cause an issue
    at runtime but it's ugly as pants. Additionally, assigning negative error
    codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
    flag is enabled.
    
    No effect on runtime.
    
    Fixes: 02bec4904508 ("ALSA: lx6464es - driver for the digigram lx6464es interface")
    Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
    Link: https://patch.msgid.link/20250828081312.393148-1-rongqianfeng@vivo.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
arm64: dts: apple: t8103-j457: Fix PCIe ethernet iommu-map [+ + +]
Author: Janne Grunau <j@jannau.net>
Date:   Sat Aug 23 11:49:44 2025 +0200

    arm64: dts: apple: t8103-j457: Fix PCIe ethernet iommu-map
    
    [ Upstream commit 6e08cdd604edcec2c277af17c7d36caf827057ff ]
    
    PCIe `port01` of t8103-j457 (iMac, M1, 2 USB-C ports, 2021) is unused
    and disabled. Linux' PCI subsystem assigns the ethernet nic from
    `port02` to bus 02. This results into assigning `pcie0_dart_1` from the
    disabled port as iommu. The `pcie0_dart_1` instance is disabled and
    probably fused off (it is on the M2 Pro Mac mini which has a disabled
    PCIe port as well).
    Without iommu the ethernet nic is not expected work.
    Adjusts the "bus-range" and the PCIe devices "reg" property to PCI
    subsystem's bus number.
    
    Fixes: 7c77ab91b33d ("arm64: dts: apple: Add missing M1 (t8103) devices")
    Reviewed-by: Neal Gompa <neal@gompa.dev>
    Reviewed-by: Sven Peter <sven@kernel.org>
    Signed-off-by: Janne Grunau <j@jannau.net>
    Link: https://lore.kernel.org/r/20250823-apple-dt-sync-6-17-v2-1-6dc0daeb4786@jannau.net
    Signed-off-by: Sven Peter <sven@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

arm64: dts: mediatek: mt6331: Fix pmic, regulators, rtc, keys node names [+ + +]
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Date:   Thu Jul 24 10:38:52 2025 +0200

    arm64: dts: mediatek: mt6331: Fix pmic, regulators, rtc, keys node names
    
    [ Upstream commit 98967109c9c0e2de4140827628c63f96314099ab ]
    
    The node names for "pmic", "regulators", "rtc", and "keys" are
    dictated by the PMIC MFD binding: change those to adhere to it.
    
    Fixes: aef783f3e0ca ("arm64: dts: mediatek: Add MT6331 PMIC devicetree")
    Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Reviewed-by: Fei Shao <fshao@chromium.org>
    Link: https://lore.kernel.org/r/20250724083914.61351-17-angelogioacchino.delregno@collabora.com
    Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

arm64: dts: mediatek: mt6795-xperia-m5: Fix mmc0 latch-ck value [+ + +]
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Date:   Thu Jul 24 10:38:56 2025 +0200

    arm64: dts: mediatek: mt6795-xperia-m5: Fix mmc0 latch-ck value
    
    [ Upstream commit 236681fb64102f25ed11df55999e6985c1bc2f7d ]
    
    Change the latch-ck value from 0x14 to 4: as only bits [0-3] are
    actually used, the final value that gets written to the register
    field for DAT_LATCH_CK_SEL is just 0x4.
    
    This also fixes dtbs_check warnings.
    
    Fixes: 5a65dcccf483 ("arm64: dts: mediatek: mt6795-xperia-m5: Add eMMC, MicroSD slot, SDIO")
    Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Link: https://lore.kernel.org/r/20250724083914.61351-21-angelogioacchino.delregno@collabora.com
    Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

arm64: dts: mediatek: mt8195: Remove suspend-breaking reset from pcie0 [+ + +]
Author: Guoqing Jiang <guoqing.jiang@canonical.com>
Date:   Mon Jul 21 17:59:59 2025 +0800

    arm64: dts: mediatek: mt8195: Remove suspend-breaking reset from pcie0
    
    [ Upstream commit 3374b5fb26b300809ecd6aed9f414987dd17c313 ]
    
    When test suspend resume with 6.8 based kernel, system can't resume
    and I got below error which can be also reproduced with 6.16 rc6+
    kernel.
    
    mtk-pcie-gen3 112f0000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x0)
    mtk-pcie-gen3 112f0000.pcie: PM: dpm_run_callback(): genpd_resume_noirq returns -110
    mtk-pcie-gen3 112f0000.pcie: PM: failed to resume noirq: error -110
    
    After investigation, looks pcie0 has the same problem as pcie1 as
    decribed in commit 3d7fdd8e38aa ("arm64: dts: mediatek: mt8195:
    Remove suspend-breaking reset from pcie1").
    
    Fixes: ecc0af6a3fe6 ("arm64: dts: mt8195: Add pcie and pcie phy nodes")
    Signed-off-by: Guoqing Jiang <guoqing.jiang@canonical.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
    Link: https://lore.kernel.org/r/20250721095959.57703-1-guoqing.jiang@canonical.com
    Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

arm64: dts: mediatek: mt8516-pumpkin: Fix machine compatible [+ + +]
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Date:   Thu Jul 24 10:39:14 2025 +0200

    arm64: dts: mediatek: mt8516-pumpkin: Fix machine compatible
    
    [ Upstream commit ffe6a5d1dd4d4d8af0779526cf4e40522647b25f ]
    
    This devicetree contained only the SoC compatible but lacked the
    machine specific one: add a "mediatek,mt8516-pumpkin" compatible
    to the list to fix dtbs_check warnings.
    
    Fixes: 9983822c8cf9 ("arm64: dts: mediatek: add pumpkin board dts")
    Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Reviewed-by: Fei Shao <fshao@chromium.org>
    Link: https://lore.kernel.org/r/20250724083914.61351-39-angelogioacchino.delregno@collabora.com
    Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

arm64: dts: qcom: qcm2290: Disable USB SS bus instances in park mode [+ + +]
Author: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Date:   Tue Jul 8 12:28:42 2025 +0200

    arm64: dts: qcom: qcm2290: Disable USB SS bus instances in park mode
    
    commit 27f94b71532203b079537180924023a5f636fca1 upstream.
    
    2290 was found in the field to also require this quirk, as long &
    high-bandwidth workloads (e.g. USB ethernet) are consistently able to
    crash the controller otherwise.
    
    The same change has been made for a number of SoCs in [1], but QCM2290
    somehow escaped the list (even though the very closely related SM6115
    was there).
    
    Upon a controller crash, the log would read:
    
    xhci-hcd.12.auto: xHCI host not responding to stop endpoint command
    xhci-hcd.12.auto: xHCI host controller not responding, assume dead
    xhci-hcd.12.auto: HC died; cleaning up
    
    Add snps,parkmode-disable-ss-quirk to the DWC3 instance in order to
    prevent the aforementioned breakage.
    
    [1] https://lore.kernel.org/all/20240704152848.3380602-1-quic_kriskura@quicinc.com/
    
    Cc: stable@vger.kernel.org
    Reported-by: Rob Clark <robin.clark@oss.qualcomm.com>
    Fixes: a64a0192b70c ("arm64: dts: qcom: Add initial QCM2290 device tree")
    Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Link: https://lore.kernel.org/r/20250708-topic-2290_usb-v1-1-661e70a63339@oss.qualcomm.com
    Signed-off-by: Bjorn Andersson <andersson@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

arm64: dts: renesas: rzg2lc-smarc: Disable CAN-FD channel0 [+ + +]
Author: Biju Das <biju.das.jz@bp.renesas.com>
Date:   Fri Aug 1 13:19:53 2025 +0100

    arm64: dts: renesas: rzg2lc-smarc: Disable CAN-FD channel0
    
    [ Upstream commit ae014fbc99c7f986ee785233e7a5336834e39af4 ]
    
    On RZ/G2LC SMARC EVK, CAN-FD channel0 is not populated, and currently we
    are deleting a wrong and nonexistent node.  Fixing the wrong node would
    invoke a dtb warning message, as channel0 is a required property.
    Disable CAN-FD channel0 instead of deleting the node.
    
    Fixes: 46da632734a5 ("arm64: dts: renesas: rzg2lc-smarc: Enable CANFD channel 1")
    Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
    Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Link: https://lore.kernel.org/20250801121959.267424-1-biju.das.jz@bp.renesas.com
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ARM: at91: pm: fix MCKx restore routine [+ + +]
Author: Nicolas Ferre <nicolas.ferre@microchip.com>
Date:   Wed Aug 27 16:54:26 2025 +0200

    ARM: at91: pm: fix MCKx restore routine
    
    [ Upstream commit 296302d3d81360e09fa956e9be9edc8223b69a12 ]
    
    The at91_mckx_ps_restore() assembly function is responsible for setting
    back MCKx system bus clocks after exiting low power modes.
    
    Fix a typo and use tmp3 variable instead of tmp2 to correctly set MCKx
    to previously saved state.
    Tmp2 was used without the needed changes in CSS and DIV. Moreover the
    required bit 7, telling that MCR register's content is to be changed
    (CMD/write), was not set.
    
    Fix function comment to match tmp variables actually used.
    
    Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
    Fixes: 28eb1d40fe57 ("ARM: at91: pm: add support for MCK1..4 save/restore for ulp modes")
    Link: https://lore.kernel.org/r/20250827145427.46819-3-nicolas.ferre@microchip.com
    Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
    [claudiu.beznea: s/sate/state in commit description]
    Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ARM: dts: omap: am335x-cm-t335: Remove unused mcasp num-serializer property [+ + +]
Author: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
Date:   Sat Aug 30 23:59:57 2025 +0200

    ARM: dts: omap: am335x-cm-t335: Remove unused mcasp num-serializer property
    
    [ Upstream commit 27322753c8b913fba05250e7b5abb1da31e6ed23 ]
    
    The dtbs_check validation for am335x-cm-t335.dtb flags an error
    for an unevaluated 'num-serializer' property in the mcasp0 node.
    
    This property is obsolete; it is not defined in the davinci-mcasp-audio
    schema and is not used by the corresponding (or any) driver.
    
    Remove this unused property to fix the schema validation warning.
    
    Fixes: 48ab364478e77 ("ARM: dts: cm-t335: add audio support")
    Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
    Link: https://lore.kernel.org/r/20250830215957.285694-1-jihed.chaibi.dev@gmail.com
    Signed-off-by: Kevin Hilman <khilman@baylibre.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ARM: dts: renesas: porter: Fix CAN pin group [+ + +]
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Fri Jun 27 15:49:48 2025 +0200

    ARM: dts: renesas: porter: Fix CAN pin group
    
    [ Upstream commit 287066b295051729fb08c3cff12ae17c6fe66133 ]
    
    According to the schematics, the CAN transceiver is connected to pins
    GP7_3 and GP7_4, which correspond to CAN0 data group B.
    
    Fixes: 0768fbad7fba1d27 ("ARM: shmobile: porter: add CAN0 DT support")
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Link: https://lore.kernel.org/70ad9bc44d6cea92197c42eedcad6b3d0641d26a.1751032025.git.geert+renesas@glider.be
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ARM: dts: ti: omap: am335x-baltos: Fix ti,en-ck32k-xtal property in DTS to use correct boolean syntax [+ + +]
Author: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
Date:   Sat Aug 23 00:25:30 2025 +0200

    ARM: dts: ti: omap: am335x-baltos: Fix ti,en-ck32k-xtal property in DTS to use correct boolean syntax
    
    [ Upstream commit 9658a92fad1889ff92fa4bd668cd61052687245a ]
    
    The ti,en-ck32k-xtal property, defined as a boolean in the Device Tree
    schema, was incorrectly assigned a value (<1>) in the DTS file, causing
    a validation error: "size (4) error for type flag". The driver uses
    of_property_read_bool(), expecting a boolean. Remove the value to fix
    the dtbs_check error.
    
    Fixes: 262178b6b8e5 ("ARM: dts: split am335x-baltos-ir5221 into dts and dtsi files")
    Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
    Link: https://lore.kernel.org/all/20250822222530.113520-1-jihed.chaibi.dev@gmail.com/
    Link: https://lore.kernel.org/r/20250822222530.113520-1-jihed.chaibi.dev@gmail.com
    Signed-off-by: Kevin Hilman <khilman@baylibre.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ARM: dts: ti: omap: omap3-devkit8000-lcd: Fix ti,keep-vref-on property to use correct boolean syntax in DTS [+ + +]
Author: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
Date:   Sat Aug 23 00:50:52 2025 +0200

    ARM: dts: ti: omap: omap3-devkit8000-lcd: Fix ti,keep-vref-on property to use correct boolean syntax in DTS
    
    [ Upstream commit 5af5b85505bc859adb338fe5d6e4842e72cdf932 ]
    
    The ti,keep-vref-on property, defined as a boolean flag in the Device
    Tree schema, was incorrectly assigned a value (<1>) in the DTS file,
    causing a validation error: "size (4) error for type flag". Remove
    the value to match the schema and ensure compatibility with the driver
    using device_property_read_bool(). This fixes the dtbs_check error.
    
    Fixes: ed05637c30e6 ("ARM: dts: omap3-devkit8000: Add ADS7846 Touchscreen support")
    Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
    Link: https://lore.kernel.org/r/20250822225052.136919-1-jihed.chaibi.dev@gmail.com
    Signed-off-by: Kevin Hilman <khilman@baylibre.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ASoC: Intel: bytcht_es8316: Fix invalid quirk input mapping [+ + +]
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Sep 2 19:18:19 2025 +0200

    ASoC: Intel: bytcht_es8316: Fix invalid quirk input mapping
    
    [ Upstream commit b20eb0e8de383116f1e1470d74da2a3c83c4e345 ]
    
    When an invalid value is passed via quirk option, currently
    bytcht_es8316 driver just ignores and leaves as is, which may lead to
    unepxected results like OOB access.
    
    This patch adds the sanity check and corrects the input mapping to the
    certain default value if an invalid value is passed.
    
    Fixes: 249d2fc9e55c ("ASoC: Intel: bytcht_es8316: Set card long_name based on quirks")
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Message-ID: <20250902171826.27329-2-tiwai@suse.de>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: Intel: bytcr_rt5640: Fix invalid quirk input mapping [+ + +]
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Sep 2 19:18:20 2025 +0200

    ASoC: Intel: bytcr_rt5640: Fix invalid quirk input mapping
    
    [ Upstream commit fba404e4b4af4f4f747bb0e41e9fff7d03c7bcc0 ]
    
    When an invalid value is passed via quirk option, currently
    bytcr_rt5640 driver only shows an error message but leaves as is.
    This may lead to unepxected results like OOB access.
    
    This patch corrects the input mapping to the certain default value if
    an invalid value is passed.
    
    Fixes: 063422ca2a9d ("ASoC: Intel: bytcr_rt5640: Set card long_name based on quirks")
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Message-ID: <20250902171826.27329-3-tiwai@suse.de>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: Intel: bytcr_rt5651: Fix invalid quirk input mapping [+ + +]
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Sep 2 19:18:21 2025 +0200

    ASoC: Intel: bytcr_rt5651: Fix invalid quirk input mapping
    
    [ Upstream commit 4336efb59ef364e691ef829a73d9dbd4d5ed7c7b ]
    
    When an invalid value is passed via quirk option, currently
    bytcr_rt5640 driver just ignores and leaves as is, which may lead to
    unepxected results like OOB access.
    
    This patch adds the sanity check and corrects the input mapping to the
    certain default value if an invalid value is passed.
    
    Fixes: 64484ccee7af ("ASoC: Intel: bytcr_rt5651: Set card long_name based on quirks")
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Message-ID: <20250902171826.27329-4-tiwai@suse.de>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: SOF: ipc3-topology: Fix multi-core and static pipelines tear down [+ + +]
Author: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Date:   Thu Oct 2 10:31:25 2025 +0300

    ASoC: SOF: ipc3-topology: Fix multi-core and static pipelines tear down
    
    commit 59abe7bc7e7c70e9066b3e46874d1b7e6a13de14 upstream.
    
    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@vger.kernel.org
    Fixes: d7332c4a4f1a ("ASoC: SOF: ipc3-topology: Fix pipeline tear down logic")
    Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
    Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Link: https://patch.msgid.link/20251002073125.32471-1-peter.ujfalusi@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ASoC: wcd934x: fix error handling in wcd934x_codec_parse_data() [+ + +]
Author: Ma Ke <make24@iscas.ac.cn>
Date:   Tue Sep 23 14:52:12 2025 +0800

    ASoC: wcd934x: fix error handling in wcd934x_codec_parse_data()
    
    commit 4e65bda8273c938039403144730923e77916a3d7 upstream.
    
    wcd934x_codec_parse_data() contains a device reference count leak in
    of_slim_get_device() where device_find_child() increases the reference
    count of the device but this reference is not properly decreased in
    the success path. Add put_device() in wcd934x_codec_parse_data() and
    add devm_add_action_or_reset() in the probe function, which ensures
    that the reference count of the device is correctly managed.
    
    Memory leak in regmap_init_slimbus() as the allocated regmap is not
    released when the device is removed. Using devm_regmap_init_slimbus()
    instead of regmap_init_slimbus() to ensure automatic regmap cleanup on
    device removal.
    
    Calling path: of_slim_get_device() -> of_find_slim_device() ->
    device_find_child(). As comment of device_find_child() says, 'NOTE:
    you will need to drop the reference with put_device() after use.'.
    
    Found by code review.
    
    Cc: stable@vger.kernel.org
    Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec")
    Signed-off-by: Ma Ke <make24@iscas.ac.cn>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Link: https://patch.msgid.link/20250923065212.26660-1-make24@iscas.ac.cn
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
blk-mq: check kobject state_in_sysfs before deleting in blk_mq_unregister_hctx [+ + +]
Author: Li Nan <linan122@huawei.com>
Date:   Tue Aug 26 16:48:54 2025 +0800

    blk-mq: check kobject state_in_sysfs before deleting in blk_mq_unregister_hctx
    
    [ Upstream commit 4c7ef92f6d4d08a27d676e4c348f4e2922cab3ed ]
    
    In __blk_mq_update_nr_hw_queues() the return value of
    blk_mq_sysfs_register_hctxs() is not checked. If sysfs creation for hctx
    fails, later changing the number of hw_queues or removing disk will
    trigger the following warning:
    
      kernfs: can not remove 'nr_tags', no directory
      WARNING: CPU: 2 PID: 637 at fs/kernfs/dir.c:1707 kernfs_remove_by_name_ns+0x13f/0x160
      Call Trace:
       remove_files.isra.1+0x38/0xb0
       sysfs_remove_group+0x4d/0x100
       sysfs_remove_groups+0x31/0x60
       __kobject_del+0x23/0xf0
       kobject_del+0x17/0x40
       blk_mq_unregister_hctx+0x5d/0x80
       blk_mq_sysfs_unregister_hctxs+0x94/0xd0
       blk_mq_update_nr_hw_queues+0x124/0x760
       nullb_update_nr_hw_queues+0x71/0xf0 [null_blk]
       nullb_device_submit_queues_store+0x92/0x120 [null_blk]
    
    kobjct_del() was called unconditionally even if sysfs creation failed.
    Fix it by checkig the kobject creation statusbefore deleting it.
    
    Fixes: 477e19dedc9d ("blk-mq: adjust debugfs and sysfs register when updating nr_hw_queues")
    Signed-off-by: Li Nan <linan122@huawei.com>
    Reviewed-by: Yu Kuai <yukuai3@huawei.com>
    Link: https://lore.kernel.org/r/20250826084854.1030545-1-linan666@huaweicloud.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
block: use int to store blk_stack_limits() return value [+ + +]
Author: Qianfeng Rong <rongqianfeng@vivo.com>
Date:   Tue Sep 2 21:09:30 2025 +0800

    block: use int to store blk_stack_limits() return value
    
    [ Upstream commit b0b4518c992eb5f316c6e40ff186cbb7a5009518 ]
    
    Change the 'ret' variable in blk_stack_limits() from unsigned int to int,
    as it needs to store negative value -1.
    
    Storing the negative error codes in unsigned type, or performing equality
    comparisons (e.g., ret == -1), doesn't cause an issue at runtime [1] but
    can be confusing.  Additionally, assigning negative error codes to unsigned
    type may trigger a GCC warning when the -Wsign-conversion flag is enabled.
    
    No effect on runtime.
    
    Link: https://lore.kernel.org/all/x3wogjf6vgpkisdhg3abzrx7v7zktmdnfmqeih5kosszmagqfs@oh3qxrgzkikf/ #1
    Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
    Reviewed-by: John Garry <john.g.garry@oracle.com>
    Fixes: fe0b393f2c0a ("block: Correct handling of bottom device misaligment")
    Reviewed-by: Bart Van Assche <bvanassche@acm.org>
    Link: https://lore.kernel.org/r/20250902130930.68317-1-rongqianfeng@vivo.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Bluetooth: hci_sync: Fix using random address for BIG/PA advertisements [+ + +]
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Fri Sep 19 12:30:05 2025 -0400

    Bluetooth: hci_sync: Fix using random address for BIG/PA advertisements
    
    [ Upstream commit 03ddb4ac251463ec5b7b069395d9ab89163dd56c ]
    
    When creating an advertisement for BIG the address shall not be
    non-resolvable since in case of acting as BASS/Broadcast Assistant the
    address must be the same as the connection in order to use the PAST
    method and even when PAST/BASS are not in the picture a Periodic
    Advertisement can still be synchronized thus the same argument as to
    connectable advertisements still stand.
    
    Fixes: eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Bluetooth: ISO: don't leak skb in ISO_CONT RX [+ + +]
Author: Pauli Virtanen <pav@iki.fi>
Date:   Mon Sep 22 21:11:22 2025 +0300

    Bluetooth: ISO: don't leak skb in ISO_CONT RX
    
    [ Upstream commit 5bf863f4c5da055c1eb08887ae4f26d99dbc4aac ]
    
    For ISO_CONT RX, the data from skb is copied to conn->rx_skb, but the
    skb is leaked.
    
    Free skb after copying its data.
    
    Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type")
    Signed-off-by: Pauli Virtanen <pav@iki.fi>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Bluetooth: ISO: Fix possible UAF on iso_conn_free [+ + +]
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Mon Sep 22 16:27:51 2025 -0400

    Bluetooth: ISO: Fix possible UAF on iso_conn_free
    
    [ Upstream commit 9950f095d6c875dbe0c9ebfcf972ec88fdf26fc8 ]
    
    This attempt to fix similar issue to sco_conn_free where if the
    conn->sk is not set to NULL may lead to UAF on iso_conn_free.
    
    Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO [+ + +]
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Wed Aug 20 08:50:12 2025 -0400

    Bluetooth: MGMT: Fix not exposing debug UUID on MGMT_OP_READ_EXP_FEATURES_INFO
    
    [ Upstream commit 79e562a52adea4afa0601a15964498fae66c823c ]
    
    The debug UUID was only getting set if MGMT_OP_READ_EXP_FEATURES_INFO
    was not called with a specific index which breaks the likes of
    bluetoothd since it only invokes MGMT_OP_READ_EXP_FEATURES_INFO when an
    adapter is plugged, so instead of depending hdev not to be set just
    enable the UUID on any index like it was done with iso_sock_uuid.
    
    Fixes: e625e50ceee1 ("Bluetooth: Introduce debug feature when dynamic debug is disabled")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
bpf/selftests: Fix test_tcpnotify_user [+ + +]
Author: Matt Bobrowski <mattbobrowski@google.com>
Date:   Fri Aug 15 12:12:14 2025 +0000

    bpf/selftests: Fix test_tcpnotify_user
    
    [ Upstream commit c80d79720647ed77ebc0198abd5a0807efdaff0b ]
    
    Based on a bisect, it appears that commit 7ee988770326 ("timers:
    Implement the hierarchical pull model") has somehow inadvertently
    broken BPF selftest test_tcpnotify_user. The error that is being
    generated by this test is as follows:
    
            FAILED: Wrong stats Expected 10 calls, got 8
    
    It looks like the change allows timer functions to be run on CPUs
    different from the one they are armed on. The test had pinned itself
    to CPU 0, and in the past the retransmit attempts also occurred on CPU
    0. The test had set the max_entries attribute for
    BPF_MAP_TYPE_PERF_EVENT_ARRAY to 2 and was calling
    bpf_perf_event_output() with BPF_F_CURRENT_CPU, so the entry was
    likely to be in range. With the change to allow timers to run on other
    CPUs, the current CPU tasked with performing the retransmit might be
    bumped and in turn fall out of range, as the event will be filtered
    out via __bpf_perf_event_output() using:
    
        if (unlikely(index >= array->map.max_entries))
                return -E2BIG;
    
    A possible change would be to explicitly set the max_entries attribute
    for perf_event_map in test_tcpnotify_kern.c to a value that's at least
    as large as the number of CPUs. As it turns out however, if the field
    is left unset, then the libbpf will determine the number of CPUs available
    on the underlying system and update the max_entries attribute accordingly
    in map_set_def_max_entries().
    
    A further problem with the test is that it has a thread that continues
    running up until the program exits. The main thread cleans up some
    LIBBPF data structures, while the other thread continues to use them,
    which inevitably will trigger a SIGSEGV. This can be dealt with by
    telling the thread to run for as long as necessary and doing a
    pthread_join on it before exiting the program.
    
    Finally, I don't think binding the process to CPU 0 is meaningful for
    this test any more, so get rid of that.
    
    Fixes: 435f90a338ae ("selftests/bpf: add a test case for sock_ops perf-event notification")
    Signed-off-by: Matt Bobrowski <mattbobrowski@google.com>
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Acked-by: Stanislav Fomichev <sdf@fomichev.me>
    Link: https://patch.msgid.link/aJ8kHhwgATmA3rLf@google.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
bpf: Enforce expected_attach_type for tailcall compatibility [+ + +]
Author: Daniel Borkmann <daniel@iogearbox.net>
Date:   Fri Sep 26 19:12:00 2025 +0200

    bpf: Enforce expected_attach_type for tailcall compatibility
    
    [ Upstream commit 4540aed51b12bc13364149bf95f6ecef013197c0 ]
    
    Yinhao et al. recently reported:
    
      Our fuzzer tool discovered an uninitialized pointer issue in the
      bpf_prog_test_run_xdp() function within the Linux kernel's BPF subsystem.
      This leads to a NULL pointer dereference when a BPF program attempts to
      deference the txq member of struct xdp_buff object.
    
    The test initializes two programs of BPF_PROG_TYPE_XDP: progA acts as the
    entry point for bpf_prog_test_run_xdp() and its expected_attach_type can
    neither be of be BPF_XDP_DEVMAP nor BPF_XDP_CPUMAP. progA calls into a slot
    of a tailcall map it owns. progB's expected_attach_type must be BPF_XDP_DEVMAP
    to pass xdp_is_valid_access() validation. The program returns struct xdp_md's
    egress_ifindex, and the latter is only allowed to be accessed under mentioned
    expected_attach_type. progB is then inserted into the tailcall which progA
    calls.
    
    The underlying issue goes beyond XDP though. Another example are programs
    of type BPF_PROG_TYPE_CGROUP_SOCK_ADDR. sock_addr_is_valid_access() as well
    as sock_addr_func_proto() have different logic depending on the programs'
    expected_attach_type. Similarly, a program attached to BPF_CGROUP_INET4_GETPEERNAME
    should not be allowed doing a tailcall into a program which calls bpf_bind()
    out of BPF which is only enabled for BPF_CGROUP_INET4_CONNECT.
    
    In short, specifying expected_attach_type allows to open up additional
    functionality or restrictions beyond what the basic bpf_prog_type enables.
    The use of tailcalls must not violate these constraints. Fix it by enforcing
    expected_attach_type in __bpf_prog_map_compatible().
    
    Note that we only enforce this for tailcall maps, but not for BPF devmaps or
    cpumaps: There, the programs are invoked through dev_map_bpf_prog_run*() and
    cpu_map_bpf_prog_run*() which set up a new environment / context and therefore
    these situations are not prone to this issue.
    
    Fixes: 5e43f899b03a ("bpf: Check attach type at prog load time")
    Reported-by: Yinhao Hu <dddddd@hust.edu.cn>
    Reported-by: Kaiyan Mei <M202472210@hust.edu.cn>
    Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/r/20250926171201.188490-1-daniel@iogearbox.net
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

bpf: Explicitly check accesses to bpf_sock_addr [+ + +]
Author: Paul Chaignon <paul.chaignon@gmail.com>
Date:   Wed Sep 17 10:08:00 2025 +0200

    bpf: Explicitly check accesses to bpf_sock_addr
    
    [ Upstream commit 6fabca2fc94d33cdf7ec102058983b086293395f ]
    
    Syzkaller found a kernel warning on the following sock_addr program:
    
        0: r0 = 0
        1: r2 = *(u32 *)(r1 +60)
        2: exit
    
    which triggers:
    
        verifier bug: error during ctx access conversion (0)
    
    This is happening because offset 60 in bpf_sock_addr corresponds to an
    implicit padding of 4 bytes, right after msg_src_ip4. Access to this
    padding isn't rejected in sock_addr_is_valid_access and it thus later
    fails to convert the access.
    
    This patch fixes it by explicitly checking the various fields of
    bpf_sock_addr in sock_addr_is_valid_access.
    
    I checked the other ctx structures and is_valid_access functions and
    didn't find any other similar cases. Other cases of (properly handled)
    padding are covered in new tests in a subsequent patch.
    
    Fixes: 1cedee13d25a ("bpf: Hooks for sys_sendmsg")
    Reported-by: syzbot+136ca59d411f92e821b7@syzkaller.appspotmail.com
    Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Acked-by: Eduard Zingerman <eddyz87@gmail.com>
    Acked-by: Daniel Borkmann <daniel@iogearbox.net>
    Closes: https://syzkaller.appspot.com/bug?extid=136ca59d411f92e821b7
    Link: https://lore.kernel.org/bpf/b58609d9490649e76e584b0361da0abd3c2c1779.1758094761.git.paul.chaignon@gmail.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

bpf: Reject negative offsets for ALU ops [+ + +]
Author: Yazhou Tang <tangyazhou518@outlook.com>
Date:   Tue Sep 30 23:04:33 2025 +0800

    bpf: Reject negative offsets for ALU ops
    
    [ Upstream commit 55c0ced59fe17dee34e9dfd5f7be63cbab207758 ]
    
    When verifying BPF programs, the check_alu_op() function validates
    instructions with ALU operations. The 'offset' field in these
    instructions is a signed 16-bit integer.
    
    The existing check 'insn->off > 1' was intended to ensure the offset is
    either 0, or 1 for BPF_MOD/BPF_DIV. However, because 'insn->off' is
    signed, this check incorrectly accepts all negative values (e.g., -1).
    
    This commit tightens the validation by changing the condition to
    '(insn->off != 0 && insn->off != 1)'. This ensures that any value
    other than the explicitly permitted 0 and 1 is rejected, hardening the
    verifier against malformed BPF programs.
    
    Co-developed-by: Shenghao Yuan <shenghaoyuan0928@163.com>
    Signed-off-by: Shenghao Yuan <shenghaoyuan0928@163.com>
    Co-developed-by: Tianci Cao <ziye@zju.edu.cn>
    Signed-off-by: Tianci Cao <ziye@zju.edu.cn>
    Signed-off-by: Yazhou Tang <tangyazhou518@outlook.com>
    Acked-by: Yonghong Song <yonghong.song@linux.dev>
    Fixes: ec0e2da95f72 ("bpf: Support new signed div/mod instructions.")
    Link: https://lore.kernel.org/r/tencent_70D024BAE70A0A309A4781694C7B764B0608@qq.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

bpf: Remove migrate_disable in kprobe_multi_link_prog_run [+ + +]
Author: Tao Chen <chen.dylane@linux.dev>
Date:   Thu Aug 14 20:14:29 2025 +0800

    bpf: Remove migrate_disable in kprobe_multi_link_prog_run
    
    [ Upstream commit abdaf49be5424db74e19d167c10d7dad79a0efc2 ]
    
    Graph tracer framework ensures we won't migrate, kprobe_multi_link_prog_run
    called all the way from graph tracer, which disables preemption in
    function_graph_enter_regs, as Jiri and Yonghong suggested, there is no
    need to use migrate_disable. As a result, some overhead may will be reduced.
    And add cant_sleep check for __this_cpu_inc_return.
    
    Fixes: 0dcac2725406 ("bpf: Add multi kprobe link")
    Signed-off-by: Tao Chen <chen.dylane@linux.dev>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20250814121430.2347454-1-chen.dylane@linux.dev
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
bus: fsl-mc: Check return value of platform_get_resource() [+ + +]
Author: Salah Triki <salah.triki@gmail.com>
Date:   Mon Aug 25 10:34:35 2025 +0100

    bus: fsl-mc: Check return value of platform_get_resource()
    
    commit 25f526507b8ccc6ac3a43bc094d09b1f9b0b90ae upstream.
    
    platform_get_resource() returns NULL in case of failure, so check its
    return value and propagate the error in order to prevent NULL pointer
    dereference.
    
    Fixes: 6305166c8771 ("bus: fsl-mc: Add ACPI support for fsl-mc")
    Cc: stable@vger.kernel.org
    Signed-off-by: Salah Triki <salah.triki@gmail.com>
    Acked-by: Ioana Ciornei <ioana.ciornei@nxp.com>
    Link: https://lore.kernel.org/r/aKwuK6TRr5XNYQ8u@pc
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
coresight-etm4x: Conditionally access register TRCEXTINSELR [+ + +]
Author: Yuanfang Zhang <yuanfang.zhang@oss.qualcomm.com>
Date:   Tue Aug 12 01:24:45 2025 -0700

    coresight-etm4x: Conditionally access register TRCEXTINSELR
    
    [ Upstream commit dcdc42f5dcf9b9197c51246c62966e2d54a033d8 ]
    
    The TRCEXTINSELR is only implemented if TRCIDR5.NUMEXTINSEL > 0.
    To avoid invalid accesses, introduce a check on numextinsel
    (derived from TRCIDR5[11:9]) before reading or writing to this register.
    
    Fixes: f5bd523690d2 ("coresight: etm4x: Convert all register accesses")
    Signed-off-by: Yuanfang Zhang <yuanfang.zhang@oss.qualcomm.com>
    Reviewed-by: James Clark <james.clark@linaro.org>
    Reviewed-by: Mike Leach <mike.leach@linaro.org>
    Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
    Link: https://lore.kernel.org/r/20250812-trcextinselr_issue-v2-1-e6eb121dfcf4@oss.qualcomm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
coresight: etm4x: Support atclk [+ + +]
Author: Leo Yan <leo.yan@arm.com>
Date:   Thu Jul 31 13:23:39 2025 +0100

    coresight: etm4x: Support atclk
    
    [ Upstream commit 40c0cdc9cbbebae9f43bef1cab9ce152318d0cce ]
    
    The atclk is an optional clock for the CoreSight ETMv4, but the driver
    misses to initialize it.
    
    This change enables atclk in probe of the ETMv4 driver, and dynamically
    control the clock during suspend and resume.
    
    No need to check the driver data and clock pointer in the runtime
    suspend and resume, so remove checks.  And add error handling in the
    resume function.
    
    Add a minor fix to the comment format when adding the atclk field.
    
    Fixes: 2e1cdfe184b5 ("coresight-etm4x: Adding CoreSight ETM4x driver")
    Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
    Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com>
    Tested-by: James Clark <james.clark@linaro.org>
    Signed-off-by: Leo Yan <leo.yan@arm.com>
    Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
    Link: https://lore.kernel.org/r/20250731-arm_cs_fix_clock_v4-v6-3-1dfe10bb3f6f@arm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

coresight: Only register perf symlink for sinks with alloc_buffer [+ + +]
Author: Yuanfang Zhang <quic_yuanfang@quicinc.com>
Date:   Mon Jun 30 18:26:19 2025 +0800

    coresight: Only register perf symlink for sinks with alloc_buffer
    
    [ Upstream commit 12d9a9dd9d8a4f1968073e7f34515896d1e22b78 ]
    
    Ensure that etm_perf_add_symlink_sink() is only called for devices
    that implement the alloc_buffer operation. This prevents invalid
    symlink creation for dummy sinks that do not implement alloc_buffer.
    
    Without this check, perf may attempt to use a dummy sink that lacks
    alloc_buffer operationsu to initialise perf's ring buffer, leading
    to runtime failures.
    
    Fixes: 9d3ba0b6c0569 ("Coresight: Add coresight dummy driver")
    Signed-off-by: Yuanfang Zhang <quic_yuanfang@quicinc.com>
    Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
    Link: https://lore.kernel.org/r/20250630-etm_perf_sink-v1-1-e4a7211f9ad7@quicinc.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

coresight: trbe: Prevent overflow in PERF_IDX2OFF() [+ + +]
Author: Leo Yan <leo.yan@arm.com>
Date:   Wed Sep 17 18:41:38 2025 +0100

    coresight: trbe: Prevent overflow in PERF_IDX2OFF()
    
    [ Upstream commit 105f56877f2d5f82d71e20b45eb7be7c24c3d908 ]
    
    Cast nr_pages to unsigned long to avoid overflow when handling large
    AUX buffer sizes (>= 2 GiB).
    
    Fixes: 3fbf7f011f24 ("coresight: sink: Add TRBE driver")
    Signed-off-by: Leo Yan <leo.yan@arm.com>
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

coresight: trbe: Return NULL pointer for allocation failures [+ + +]
Author: Leo Yan <leo.yan@arm.com>
Date:   Thu Sep 4 15:13:52 2025 +0100

    coresight: trbe: Return NULL pointer for allocation failures
    
    [ Upstream commit 8a55c161f7f9c1aa1c70611b39830d51c83ef36d ]
    
    When the TRBE driver fails to allocate a buffer, it currently returns
    the error code "-ENOMEM". However, the caller etm_setup_aux() only
    checks for a NULL pointer, so it misses the error. As a result, the
    driver continues and eventually causes a kernel panic.
    
    Fix this by returning a NULL pointer from arm_trbe_alloc_buffer() on
    allocation failures. This allows that the callers can properly handle
    the failure.
    
    Fixes: 3fbf7f011f24 ("coresight: sink: Add TRBE driver")
    Reported-by: Tamas Zsoldos <tamas.zsoldos@arm.com>
    Signed-off-by: Leo Yan <leo.yan@arm.com>
    Reviewed-by: James Clark <james.clark@linaro.org>
    Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
    Link: https://lore.kernel.org/r/20250904-cs_etm_auxsetup_fix_error_handling-v2-1-a502d0bafb95@arm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
cpufreq: scmi: Account for malformed DT in scmi_dev_used_by_cpus() [+ + +]
Author: Florian Fainelli <florian.fainelli@broadcom.com>
Date:   Mon Aug 18 08:50:48 2025 -0700

    cpufreq: scmi: Account for malformed DT in scmi_dev_used_by_cpus()
    
    [ Upstream commit cd5d4621ba846dad9b2e6b0c2d1518d083fcfa13 ]
    
    Broadcom STB platforms were early adopters (2017) of the SCMI framework and as
    a result, not all deployed systems have a Device Tree entry where SCMI
    protocol 0x13 (PERFORMANCE) is declared as a clock provider, nor are the
    CPU Device Tree node(s) referencing protocol 0x13 as their clock
    provider. This was clarified in commit e11c480b6df1 ("dt-bindings:
    firmware: arm,scmi: Extend bindings for protocol@13") in 2023.
    
    For those platforms, we allow the checks done by scmi_dev_used_by_cpus()
    to continue, and in the event of not having done an early return, we key
    off the documented compatible string and give them a pass to continue to
    use scmi-cpufreq.
    
    Fixes: 6c9bb8692272 ("cpufreq: scmi: Skip SCMI devices that aren't used by the CPUs")
    Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
    Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
cpuidle: qcom-spm: fix device and OF node leaks at probe [+ + +]
Author: Johan Hovold <johan@kernel.org>
Date:   Mon Sep 8 17:22:12 2025 +0200

    cpuidle: qcom-spm: fix device and OF node leaks at probe
    
    [ Upstream commit cdc06f912670c8c199d5fa9e78b64b7ed8e871d0 ]
    
    Make sure to drop the reference to the saw device taken by
    of_find_device_by_node() after retrieving its driver data during
    probe().
    
    Also drop the reference to the CPU node sooner to avoid leaking it in
    case there is no saw node or device.
    
    Fixes: 60f3692b5f0b ("cpuidle: qcom_spm: Detach state machine from main SPM handling")
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
crypto: hisilicon - re-enable address prefetch after device resuming [+ + +]
Author: Chenghai Huang <huangchenghai2@huawei.com>
Date:   Thu Aug 21 09:38:05 2025 +0800

    crypto: hisilicon - re-enable address prefetch after device resuming
    
    [ Upstream commit 0dcd21443d9308ed88909d35aa0490c3fc680a47 ]
    
    When the device resumes from a suspended state, it will revert to its
    initial state and requires re-enabling. Currently, the address prefetch
    function is not re-enabled after device resuming. Move the address prefetch
    enable to the initialization process. In this way, the address prefetch
    can be enabled when the device resumes by calling the initialization
    process.
    
    Fixes: 607c191b371d ("crypto: hisilicon - support runtime PM for accelerator device")
    Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

crypto: hisilicon/qm - check whether the input function and PF are on the same device [+ + +]
Author: Zhushuai Yin <yinzhushuai@huawei.com>
Date:   Thu Aug 21 09:38:07 2025 +0800

    crypto: hisilicon/qm - check whether the input function and PF are on the same device
    
    [ Upstream commit 6a2c9164b52e6bc134127fd543461fdef95cc8ec ]
    
    Function rate limiting is set through physical function driver.
    Users configure by providing function information and rate limit values.
    Before configuration, it is necessary to check whether the
    provided function and PF belong to the same device.
    
    Fixes: 22d7a6c39cab ("crypto: hisilicon/qm - add pci bdf number check")
    Signed-off-by: Zhushuai Yin <yinzhushuai@huawei.com>
    Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

crypto: hisilicon/qm - set NULL to qm->debug.qm_diff_regs [+ + +]
Author: Chenghai Huang <huangchenghai2@huawei.com>
Date:   Sat Sep 13 18:57:54 2025 +0800

    crypto: hisilicon/qm - set NULL to qm->debug.qm_diff_regs
    
    [ Upstream commit f0cafb02de883b3b413d34eb079c9680782a9cc1 ]
    
    When the initialization of qm->debug.acc_diff_reg fails,
    the probe process does not exit. However, after qm->debug.qm_diff_regs is
    freed, it is not set to NULL. This can lead to a double free when the
    remove process attempts to free it again. Therefore, qm->debug.qm_diff_regs
    should be set to NULL after it is freed.
    
    Fixes: 8be091338971 ("crypto: hisilicon/debugfs - Fix debugfs uninit process issue")
    Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

crypto: hisilicon/zip - remove unnecessary validation for high-performance mode configurations [+ + +]
Author: Chenghai Huang <huangchenghai2@huawei.com>
Date:   Thu Aug 21 09:38:04 2025 +0800

    crypto: hisilicon/zip - remove unnecessary validation for high-performance mode configurations
    
    [ Upstream commit d4e081510471e79171c4e0a11f6cb608e49bc082 ]
    
    When configuring the high-performance mode register, there is no
    need to verify whether the register has been successfully
    enabled, as there is no possibility of a write failure for this
    register.
    
    Fixes: a9864bae1806 ("crypto: hisilicon/zip - add zip comp high perf mode configuration")
    Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

crypto: keembay - Add missing check after sg_nents_for_len() [+ + +]
Author: Thomas Fourier <fourier.thomas@gmail.com>
Date:   Mon Jul 28 14:03:30 2025 +0200

    crypto: keembay - Add missing check after sg_nents_for_len()
    
    [ Upstream commit 4e53be21dd0315c00eaf40cc8f8c0facd4d9a6b2 ]
    
    sg_nents_for_len() returns an int which is negative in case of error.
    
    Fixes: 472b04444cd3 ("crypto: keembay - Add Keem Bay OCS HCU driver")
    Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
dm: fix NULL pointer dereference in __dm_suspend() [+ + +]
Author: Zheng Qixing <zhengqixing@huawei.com>
Date:   Tue Aug 26 15:42:04 2025 +0800

    dm: fix NULL pointer dereference in __dm_suspend()
    
    commit 8d33a030c566e1f105cd5bf27f37940b6367f3be upstream.
    
    There is a race condition between dm device suspend and table load that
    can lead to null pointer dereference. The issue occurs when suspend is
    invoked before table load completes:
    
    BUG: kernel NULL pointer dereference, address: 0000000000000054
    Oops: 0000 [#1] PREEMPT SMP PTI
    CPU: 6 PID: 6798 Comm: dmsetup Not tainted 6.6.0-g7e52f5f0ca9b #62
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014
    RIP: 0010:blk_mq_wait_quiesce_done+0x0/0x50
    Call Trace:
      <TASK>
      blk_mq_quiesce_queue+0x2c/0x50
      dm_stop_queue+0xd/0x20
      __dm_suspend+0x130/0x330
      dm_suspend+0x11a/0x180
      dev_suspend+0x27e/0x560
      ctl_ioctl+0x4cf/0x850
      dm_ctl_ioctl+0xd/0x20
      vfs_ioctl+0x1d/0x50
      __se_sys_ioctl+0x9b/0xc0
      __x64_sys_ioctl+0x19/0x30
      x64_sys_call+0x2c4a/0x4620
      do_syscall_64+0x9e/0x1b0
    
    The issue can be triggered as below:
    
    T1                                              T2
    dm_suspend                                      table_load
    __dm_suspend                                    dm_setup_md_queue
                                                    dm_mq_init_request_queue
                                                    blk_mq_init_allocated_queue
                                                    => q->mq_ops = set->ops; (1)
    dm_stop_queue / dm_wait_for_completion
    => q->tag_set NULL pointer!     (2)
                                                    => q->tag_set = set; (3)
    
    Fix this by checking if a valid table (map) exists before performing
    request-based suspend and waiting for target I/O. When map is NULL,
    skip these table-dependent suspend steps.
    
    Even when map is NULL, no I/O can reach any target because there is
    no table loaded; I/O submitted in this state will fail early in the
    DM layer. Skipping the table-dependent suspend logic in this case
    is safe and avoids NULL pointer dereferences.
    
    Fixes: c4576aed8d85 ("dm: fix request-based dm's use of dm_wait_for_completion")
    Cc: stable@vger.kernel.org
    Signed-off-by: Zheng Qixing <zhengqixing@huawei.com>
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

dm: fix queue start/stop imbalance under suspend/load/resume races [+ + +]
Author: Zheng Qixing <zhengqixing@huawei.com>
Date:   Tue Aug 26 15:42:03 2025 +0800

    dm: fix queue start/stop imbalance under suspend/load/resume races
    
    commit 7f597c2cdb9d3263a6fce07c4fc0a9eaa8e8fc43 upstream.
    
    When suspend and load run concurrently, before q->mq_ops is set in
    blk_mq_init_allocated_queue(), __dm_suspend() skip dm_stop_queue(). As a
    result, the queue's quiesce depth is not incremented.
    
    Later, once table load has finished and __dm_resume() runs, which triggers
    q->quiesce_depth ==0 warning in blk_mq_unquiesce_queue():
    Call Trace:
     <TASK>
     dm_start_queue+0x16/0x20 [dm_mod]
     __dm_resume+0xac/0xb0 [dm_mod]
     dm_resume+0x12d/0x150 [dm_mod]
     do_resume+0x2c2/0x420 [dm_mod]
     dev_suspend+0x30/0x130 [dm_mod]
     ctl_ioctl+0x402/0x570 [dm_mod]
     dm_ctl_ioctl+0x23/0x30 [dm_mod]
    
    Fix this by explicitly tracking whether the request queue was
    stopped in __dm_suspend() via a new DMF_QUEUE_STOPPED flag.
    Only call dm_start_queue() in __dm_resume() if the queue was
    actually stopped.
    
    Fixes: e70feb8b3e68 ("blk-mq: support concurrent queue quiesce/unquiesce")
    Cc: stable@vger.kernel.org
    Signed-off-by: Zheng Qixing <zhengqixing@huawei.com>
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Documentation: trace: historgram-design: Separate sched_waking histogram section heading and the following diagram [+ + +]
Author: Bagas Sanjaya <bagasdotme@gmail.com>
Date:   Tue Sep 16 12:42:01 2025 +0700

    Documentation: trace: historgram-design: Separate sched_waking histogram section heading and the following diagram
    
    [ Upstream commit 8c716e87ea33519920811338100d6d8a7fb32456 ]
    
    Section heading for sched_waking histogram is shown as normal paragraph
    instead due to codeblock marker for the following diagram being in the
    same line as the section underline. Separate them.
    
    Fixes: daceabf1b494 ("tracing/doc: Fix ascii-art in histogram-design.rst")
    Reviewed-by: Tom Zanussi <zanussi@kernel.org>
    Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
    Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
    Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Signed-off-by: Jonathan Corbet <corbet@lwn.net>
    Message-ID: <20250916054202.582074-5-bagasdotme@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drivers/base/node: fix double free in register_one_node() [+ + +]
Author: Donet Tom <donettom@linux.ibm.com>
Date:   Thu Sep 18 11:11:44 2025 +0530

    drivers/base/node: fix double free in register_one_node()
    
    [ Upstream commit 0efdedfa537eb534c251a5b4794caaf72cc55869 ]
    
    When device_register() fails in register_node(), it calls
    put_device(&node->dev).  This triggers node_device_release(), which calls
    kfree(to_node(dev)), thereby freeing the entire node structure.
    
    As a result, when register_node() returns an error, the node memory has
    already been freed.  Calling kfree(node) again in register_one_node()
    leads to a double free.
    
    This patch removes the redundant kfree(node) from register_one_node() to
    prevent the double free.
    
    Link: https://lkml.kernel.org/r/20250918054144.58980-1-donettom@linux.ibm.com
    Fixes: 786eb990cfb7 ("drivers/base/node: handle error properly in register_one_node()")
    Signed-off-by: Donet Tom <donettom@linux.ibm.com>
    Acked-by: David Hildenbrand <david@redhat.com>
    Acked-by: Oscar Salvador <osalvador@suse.de>
    Cc: Alison Schofield <alison.schofield@intel.com>
    Cc: Chris Mason <clm@meta.com>
    Cc: Danilo Krummrich <dakr@kernel.org>
    Cc: Dave Jiang <dave.jiang@intel.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Hiroyouki Kamezawa <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Joanthan Cameron <Jonathan.Cameron@huawei.com>
    Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
    Cc: Yury Norov (NVIDIA) <yury.norov@gmail.com>
    Cc: Zi Yan <ziy@nvidia.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drivers/base/node: handle error properly in register_one_node() [+ + +]
Author: Donet Tom <donettom@linux.ibm.com>
Date:   Fri Aug 22 14:18:45 2025 +0530

    drivers/base/node: handle error properly in register_one_node()
    
    [ Upstream commit 786eb990cfb78aab94eb74fb32a030e14723a620 ]
    
    If register_node() returns an error, it is not handled correctly.
    The function will proceed further and try to register CPUs under the
    node, which is not correct.
    
    So, in this patch, if register_node() returns an error, we return
    immediately from the function.
    
    Link: https://lkml.kernel.org/r/20250822084845.19219-1-donettom@linux.ibm.com
    Fixes: 76b67ed9dce6 ("[PATCH] node hotplug: register cpu: remove node struct")
    Signed-off-by: Donet Tom <donettom@linux.ibm.com>
    Acked-by: David Hildenbrand <david@redhat.com>
    Cc: Alison Schofield <alison.schofield@intel.com>
    Cc: Danilo Krummrich <dakr@kernel.org>
    Cc: Dave Jiang <dave.jiang@intel.com>
    Cc: Donet Tom <donettom@linux.ibm.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Hiroyouki Kamezawa <kamezawa.hiroyu@jp.fujitsu.com>
    Cc: Joanthan Cameron <Jonathan.Cameron@huawei.com>
    Cc: Oscar Salvador <osalvador@suse.de>
    Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
    Cc: Yury Norov (NVIDIA) <yury.norov@gmail.com>
    Cc: Zi Yan <ziy@nvidia.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/amd/display: Remove redundant semicolons [+ + +]
Author: Liao Yuanhong <liaoyuanhong@vivo.com>
Date:   Tue Aug 12 15:50:14 2025 +0800

    drm/amd/display: Remove redundant semicolons
    
    [ Upstream commit 90b810dd859c0df9db2290da1ac5842e5f031267 ]
    
    Remove unnecessary semicolons.
    
    Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321")
    Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/amd/pm: Adjust si_upload_smc_data register programming (v3) [+ + +]
Author: Timur Kristóf <timur.kristof@gmail.com>
Date:   Thu Aug 28 17:11:07 2025 +0200

    drm/amd/pm: Adjust si_upload_smc_data register programming (v3)
    
    [ Upstream commit ce025130127437dc884c84c254170e27b2ce9309 ]
    
    Based on some comments in dm_pp_display_configuration
    above the crtc_index and line_time fields, these values
    are programmed to the SMC to work around an SMC hang
    when it switches MCLK.
    
    According to Alex, the Windows driver programs them to:
    mclk_change_block_cp_min = 200 / line_time
    mclk_change_block_cp_max = 100 / line_time
    Let's use the same for the sake of consistency.
    
    Previously we used the watermark values, but it seemed buggy
    as the code was mixing up low/high and A/B watermarks, and
    was not saving a low watermark value on DCE 6, so
    mclk_change_block_cp_max would be always zero previously.
    
    Split this change off from the previous si_upload_smc_data
    to make it easier to bisect, in case it causes any issues.
    
    Fixes: 841686df9f7d ("drm/amdgpu: add SI DPM support (v4)")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/amd/pm: Disable MCLK switching with non-DC at 120 Hz+ (v2) [+ + +]
Author: Timur Kristóf <timur.kristof@gmail.com>
Date:   Thu Aug 28 17:11:09 2025 +0200

    drm/amd/pm: Disable MCLK switching with non-DC at 120 Hz+ (v2)
    
    [ Upstream commit ed3803533c7bf7df88bc3fc9f70bd317e1228ea8 ]
    
    According to pp_pm_compute_clocks the non-DC display code
    has "issues with mclk switching with refresh rates over 120 hz".
    The workaround is to disable MCLK switching in this case.
    
    Do the same for legacy DPM.
    
    Fixes: 6ddbd37f1074 ("drm/amd/pm: optimize the amdgpu_pm_compute_clocks() implementations")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/amd/pm: Disable SCLK switching on Oland with high pixel clocks (v3) [+ + +]
Author: Timur Kristóf <timur.kristof@gmail.com>
Date:   Thu Aug 28 17:11:10 2025 +0200

    drm/amd/pm: Disable SCLK switching on Oland with high pixel clocks (v3)
    
    [ Upstream commit 7009e3af0474aca5f64262b3c72fb6e23b232f9b ]
    
    Port of commit 227545b9a08c ("drm/radeon/dpm: Disable sclk
    switching on Oland when two 4K 60Hz monitors are connected")
    
    This is an ad-hoc DPM fix, necessary because we don't have
    proper bandwidth calculation for DCE 6.
    
    We define "high pixelclock" for SI as higher than necessary
    for 4K 30Hz. For example, 4K 60Hz and 1080p 144Hz fall into
    this category.
    
    When two high pixel clock displays are connected to Oland,
    additionally disable shader clock switching, which results in
    a higher voltage, thereby addressing some visible flickering.
    
    v2:
    Add more comments.
    v3:
    Split into two commits for easier review.
    
    Fixes: 841686df9f7d ("drm/amdgpu: add SI DPM support (v4)")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/amd/pm: Disable ULV even if unsupported (v3) [+ + +]
Author: Timur Kristóf <timur.kristof@gmail.com>
Date:   Thu Aug 28 17:11:04 2025 +0200

    drm/amd/pm: Disable ULV even if unsupported (v3)
    
    [ Upstream commit 3a0c3a4035f995e1f993dfaf4d63dc19e9b4bc1c ]
    
    Always send PPSMC_MSG_DisableULV to the SMC, even if ULV mode
    is unsupported, to make sure it is properly turned off.
    
    v3:
    Simplify si_disable_ulv further.
    Always check the return value of amdgpu_si_send_msg_to_smc.
    
    Fixes: 841686df9f7d ("drm/amdgpu: add SI DPM support (v4)")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/amd/pm: Fix si_upload_smc_data (v3) [+ + +]
Author: Timur Kristóf <timur.kristof@gmail.com>
Date:   Thu Aug 28 17:11:06 2025 +0200

    drm/amd/pm: Fix si_upload_smc_data (v3)
    
    [ Upstream commit a43b2cec04b02743338aa78f837ee0bdf066a6d5 ]
    
    The si_upload_smc_data function uses si_write_smc_soft_register
    to set some register values in the SMC, and expects the result
    to be PPSMC_Result_OK which is 1.
    
    The PPSMC_Result_OK / PPSMC_Result_Failed values are used for
    checking the result of a command sent to the SMC.
    However, the si_write_smc_soft_register actually doesn't send
    any commands to the SMC and returns zero on success,
    so this check was incorrect.
    
    Fix that by not checking the return value, just like other
    calls to si_write_smc_soft_register.
    
    v3:
    Additionally, when no display is plugged in, there is no need
    to restrict MCLK switching, so program the registers to zero.
    
    Fixes: 841686df9f7d ("drm/amdgpu: add SI DPM support (v4)")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/amd/pm: Treat zero vblank time as too short in si_dpm (v3) [+ + +]
Author: Timur Kristóf <timur.kristof@gmail.com>
Date:   Thu Aug 28 17:11:08 2025 +0200

    drm/amd/pm: Treat zero vblank time as too short in si_dpm (v3)
    
    [ Upstream commit 9003a0746864f39a0ef72bd45f8e1ad85d930d67 ]
    
    Some parts of the code base expect that MCLK switching is turned
    off when the vblank time is set to zero.
    
    According to pp_pm_compute_clocks the non-DC code has issues
    with MCLK switching with refresh rates over 120 Hz.
    
    v3:
    Add code comment to explain this better.
    Add an if statement instead of changing the switch_limit.
    
    Fixes: 841686df9f7d ("drm/amdgpu: add SI DPM support (v4)")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/amdgpu: Power up UVD 3 for FW validation (v2) [+ + +]
Author: Timur Kristóf <timur.kristof@gmail.com>
Date:   Thu Aug 28 17:11:03 2025 +0200

    drm/amdgpu: Power up UVD 3 for FW validation (v2)
    
    [ Upstream commit c661219cd7be75bb5599b525f16a455a058eb516 ]
    
    Unlike later versions, UVD 3 has firmware validation.
    For this to work, the UVD should be powered up correctly.
    
    When DPM is enabled and the display clock is off,
    the SMU may choose a power state which doesn't power
    the UVD, which can result in failure to initialize UVD.
    
    v2:
    Add code comments to explain about the UVD power state
    and how UVD clock is turned on/off.
    
    Fixes: b38f3e80ecec ("drm amdgpu: SI UVD v3_1 (v2)")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/amdkfd: Fix error code sign for EINVAL in svm_ioctl() [+ + +]
Author: Qianfeng Rong <rongqianfeng@vivo.com>
Date:   Thu Sep 4 20:36:46 2025 +0800

    drm/amdkfd: Fix error code sign for EINVAL in svm_ioctl()
    
    [ Upstream commit cbda64f3f58027f68211dda8ea94d52d7e493995 ]
    
    Use negative error code -EINVAL instead of positive EINVAL in the default
    case of svm_ioctl() to conform to Linux kernel error code conventions.
    
    Fixes: 42de677f7999 ("drm/amdkfd: register svm range")
    Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/bridge: it6505: select REGMAP_I2C [+ + +]
Author: Chia-I Wu <olvaffe@gmail.com>
Date:   Tue Jun 10 16:58:25 2025 -0700

    drm/bridge: it6505: select REGMAP_I2C
    
    [ Upstream commit 21b137f651cf9d981e22d2c60a2a8105f50a6361 ]
    
    Fix
    
      aarch64-linux-gnu-ld: drivers/gpu/drm/bridge/ite-it6505.o: in function `it6505_i2c_probe':
      ite-it6505.c:(.text+0x754): undefined reference to `__devm_regmap_init_i2c'
    
    Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
    Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver")
    Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
    Link: https://patch.msgid.link/20250610235825.3113075-1-olvaffe@gmail.com
    Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/msm/dpu: fix incorrect type for ret [+ + +]
Author: Qianfeng Rong <rongqianfeng@vivo.com>
Date:   Tue Aug 26 17:20:45 2025 +0800

    drm/msm/dpu: fix incorrect type for ret
    
    [ Upstream commit 88ec0e01a880e3326794e149efae39e3aa4dbbec ]
    
    Change 'ret' from unsigned long to int, as storing negative error codes
    in an unsigned long makes it never equal to -ETIMEDOUT, causing logical
    errors.
    
    Fixes: d7d0e73f7de3 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback")
    Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Patchwork: https://patchwork.freedesktop.org/patch/671100/
    Link: https://lore.kernel.org/r/20250826092047.224341-1-rongqianfeng@vivo.com
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/panel: novatek-nt35560: Fix invalid return value [+ + +]
Author: Brigham Campbell <me@brighamcampbell.com>
Date:   Wed Jul 30 21:23:41 2025 -0600

    drm/panel: novatek-nt35560: Fix invalid return value
    
    [ Upstream commit 125459e19ec654924e472f3ff5aeea40358dbebf ]
    
    Fix bug in nt35560_set_brightness() which causes the function to
    erroneously report an error. mipi_dsi_dcs_write() returns either a
    negative value when an error occurred or a positive number of bytes
    written when no error occurred. The buggy code reports an error under
    either condition.
    
    Fixes: 8152c2bfd780 ("drm/panel: Add driver for Sony ACX424AKP panel")
    Reviewed-by: Douglas Anderson <dianders@chromium.org>
    Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
    Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
    Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
    Link: https://lore.kernel.org/r/20250731032343.1258366-2-me@brighamcampbell.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/radeon/r600_cs: clean up of dead code in r600_cs [+ + +]
Author: Brahmajit Das <listout@listout.xyz>
Date:   Mon Aug 11 14:51:25 2025 +0530

    drm/radeon/r600_cs: clean up of dead code in r600_cs
    
    [ Upstream commit 260dcf5b06d519bcf27a5dfdb5c626821a55c170 ]
    
    GCC 16 enables -Werror=unused-but-set-variable= which results in build
    error with the following message.
    
    drivers/gpu/drm/radeon/r600_cs.c: In function ‘r600_texture_size’:
    drivers/gpu/drm/radeon/r600_cs.c:1411:29: error: variable ‘level’ set but not used [-Werror=unused-but-set-variable=]
     1411 |         unsigned offset, i, level;
          |                             ^~~~~
    cc1: all warnings being treated as errors
    make[6]: *** [scripts/Makefile.build:287: drivers/gpu/drm/radeon/r600_cs.o] Error 1
    
    level although is set, but in never used in the function
    r600_texture_size. Thus resulting in dead code and this error getting
    triggered.
    
    Fixes: 60b212f8ddcd ("drm/radeon: overhaul texture checking. (v3)")
    Acked-by: Christian König <christian.koenig@amd.com>
    Signed-off-by: Brahmajit Das <listout@listout.xyz>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
EDAC/i10nm: Skip DIMM enumeration on a disabled memory controller [+ + +]
Author: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Date:   Wed Aug 6 14:57:07 2025 +0800

    EDAC/i10nm: Skip DIMM enumeration on a disabled memory controller
    
    [ Upstream commit 2e6fe1bbefd9c059c3787d1c620fe67343a94dff ]
    
    When loading the i10nm_edac driver on some Intel Granite Rapids servers,
    a call trace may appear as follows:
    
      UBSAN: shift-out-of-bounds in drivers/edac/skx_common.c:453:16
      shift exponent -66 is negative
      ...
      __ubsan_handle_shift_out_of_bounds+0x1e3/0x390
      skx_get_dimm_info.cold+0x47/0xd40 [skx_edac_common]
      i10nm_get_dimm_config+0x23e/0x390 [i10nm_edac]
      skx_register_mci+0x159/0x220 [skx_edac_common]
      i10nm_init+0xcb0/0x1ff0 [i10nm_edac]
      ...
    
    This occurs because some BIOS may disable a memory controller if there
    aren't any memory DIMMs populated on this memory controller. The DIMMMTR
    register of this disabled memory controller contains the invalid value
    ~0, resulting in the call trace above.
    
    Fix this call trace by skipping DIMM enumeration on a disabled memory
    controller.
    
    Fixes: ba987eaaabf9 ("EDAC/i10nm: Add Intel Granite Rapids server support")
    Reported-by: Jose Jesus Ambriz Meza <jose.jesus.ambriz.meza@intel.com>
    Reported-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
    Closes: https://lore.kernel.org/all/20250730063155.2612379-1-acelan.kao@canonical.com/
    Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
    Signed-off-by: Tony Luck <tony.luck@intel.com>
    Tested-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
    Link: https://lore.kernel.org/r/20250806065707.3533345-1-qiuxu.zhuo@intel.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ext4: fix checks for orphan inodes [+ + +]
Author: Jan Kara <jack@suse.cz>
Date:   Thu Sep 25 14:30:39 2025 +0200

    ext4: fix checks for orphan inodes
    
    commit acf943e9768ec9d9be80982ca0ebc4bfd6b7631e upstream.
    
    When orphan file feature is enabled, inode can be tracked as orphan
    either in the standard orphan list or in the orphan file. The first can
    be tested by checking ei->i_orphan list head, the second is recorded by
    EXT4_STATE_ORPHAN_FILE inode state flag. There are several places where
    we want to check whether inode is tracked as orphan and only some of
    them properly check for both possibilities. Luckily the consequences are
    mostly minor, the worst that can happen is that we track an inode as
    orphan although we don't need to and e2fsck then complains (resulting in
    occasional ext4/307 xfstest failures). Fix the problem by introducing a
    helper for checking whether an inode is tracked as orphan and use it in
    appropriate places.
    
    Fixes: 4a79a98c7b19 ("ext4: Improve scalability of ext4 orphan file handling")
    Cc: stable@kernel.org
    Signed-off-by: Jan Kara <jack@suse.cz>
    Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
    Message-ID: <20250925123038.20264-2-jack@suse.cz>
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
f2fs: fix condition in __allow_reserved_blocks() [+ + +]
Author: Chao Yu <chao@kernel.org>
Date:   Thu Jul 31 14:03:38 2025 +0800

    f2fs: fix condition in __allow_reserved_blocks()
    
    [ Upstream commit e75ce117905d2830976a289e718470f3230fa30a ]
    
    If reserve_root mount option is not assigned, __allow_reserved_blocks()
    will return false, it's not correct, fix it.
    
    Fixes: 7e65be49ed94 ("f2fs: add reserved blocks for root user")
    Signed-off-by: Chao Yu <chao@kernel.org>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

f2fs: fix to mitigate overhead of f2fs_zero_post_eof_page() [+ + +]
Author: Chao Yu <chao@kernel.org>
Date:   Tue Sep 16 10:47:09 2025 +0800

    f2fs: fix to mitigate overhead of f2fs_zero_post_eof_page()
    
    [ Upstream commit c2f7c32b254006ad48f8e4efb2e7e7bf71739f17 ]
    
    f2fs_zero_post_eof_page() may cuase more overhead due to invalidate_lock
    and page lookup, change as below to mitigate its overhead:
    - check new_size before grabbing invalidate_lock
    - lookup and invalidate pages only in range of [old_size, new_size]
    
    Fixes: ba8dac350faf ("f2fs: fix to zero post-eof page")
    Signed-off-by: Chao Yu <chao@kernel.org>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

f2fs: fix to truncate first page in error path of f2fs_truncate() [+ + +]
Author: Chao Yu <chao@kernel.org>
Date:   Wed Sep 10 16:40:24 2025 +0800

    f2fs: fix to truncate first page in error path of f2fs_truncate()
    
    [ Upstream commit 9251a9e6e871cb03c4714a18efa8f5d4a8818450 ]
    
    syzbot reports a bug as below:
    
    loop0: detected capacity change from 0 to 40427
    F2FS-fs (loop0): Wrong SSA boundary, start(3584) end(4096) blocks(3072)
    F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th superblock
    F2FS-fs (loop0): invalid crc value
    F2FS-fs (loop0): f2fs_convert_inline_folio: corrupted inline inode ino=3, i_addr[0]:0x1601, run fsck to fix.
    ------------[ cut here ]------------
    kernel BUG at fs/inode.c:753!
    RIP: 0010:clear_inode+0x169/0x190 fs/inode.c:753
    Call Trace:
     <TASK>
     evict+0x504/0x9c0 fs/inode.c:810
     f2fs_fill_super+0x5612/0x6fa0 fs/f2fs/super.c:5047
     get_tree_bdev_flags+0x40e/0x4d0 fs/super.c:1692
     vfs_get_tree+0x8f/0x2b0 fs/super.c:1815
     do_new_mount+0x2a2/0x9e0 fs/namespace.c:3808
     do_mount fs/namespace.c:4136 [inline]
     __do_sys_mount fs/namespace.c:4347 [inline]
     __se_sys_mount+0x317/0x410 fs/namespace.c:4324
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    During f2fs_evict_inode(), clear_inode() detects that we missed to truncate
    all page cache before destorying inode, that is because in below path, we
    will create page #0 in cache, but missed to drop it in error path, let's fix
    it.
    
    - evict
     - f2fs_evict_inode
      - f2fs_truncate
       - f2fs_convert_inline_inode
        - f2fs_grab_cache_folio
        : create page #0 in cache
        - f2fs_convert_inline_folio
        : sanity check failed, return -EFSCORRUPTED
      - clear_inode detects that inode->i_data.nrpages is not zero
    
    Fixes: 92dffd01790a ("f2fs: convert inline_data when i_size becomes large")
    Reported-by: syzbot+90266696fe5daacebd35@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/linux-f2fs-devel/68c09802.050a0220.3c6139.000e.GAE@google.com
    Signed-off-by: Chao Yu <chao@kernel.org>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

f2fs: fix to update map->m_next_extent correctly in f2fs_map_blocks() [+ + +]
Author: Chao Yu <chao@kernel.org>
Date:   Fri Sep 12 16:12:50 2025 +0800

    f2fs: fix to update map->m_next_extent correctly in f2fs_map_blocks()
    
    [ Upstream commit 869833f54e8306326b85ca3ed08979b7ad412a4a ]
    
    Script to reproduce:
    mkfs.f2fs -O extra_attr,compression /dev/vdb -f
    mount /dev/vdb /mnt/f2fs -o mode=lfs,noextent_cache
    cd /mnt/f2fs
    f2fs_io write 1 0 1024 rand dsync testfile
    xfs_io testfile -c "fsync"
    f2fs_io write 1 0 512 rand dsync testfile
    xfs_io testfile -c "fsync"
    cd /
    umount /mnt/f2fs
    mount /dev/vdb /mnt/f2fs
    f2fs_io precache_extents /mnt/f2fs/testfile
    umount /mnt/f2fs
    
    Tracepoint output:
    f2fs_update_read_extent_tree_range: dev = (253,16), ino = 4, pgofs = 0, len = 512, blkaddr = 1055744, c_len = 0
    f2fs_update_read_extent_tree_range: dev = (253,16), ino = 4, pgofs = 513, len = 351, blkaddr = 17921, c_len = 0
    f2fs_update_read_extent_tree_range: dev = (253,16), ino = 4, pgofs = 864, len = 160, blkaddr = 18272, c_len = 0
    
    During precache_extents, there is off-by-one issue, we should update
    map->m_next_extent to pgofs rather than pgofs + 1, if last blkaddr is
    valid and not contiguous to previous extent.
    
    Fixes: c4020b2da4c9 ("f2fs: support F2FS_IOC_PRECACHE_EXTENTS")
    Signed-off-by: Chao Yu <chao@kernel.org>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

f2fs: fix zero-sized extent for precache extents [+ + +]
Author: wangzijie <wangzijie1@honor.com>
Date:   Wed Sep 17 10:36:21 2025 +0800

    f2fs: fix zero-sized extent for precache extents
    
    [ Upstream commit 8175c864391753b210f3dcfae1aeed686a226ebb ]
    
    Script to reproduce:
    f2fs_io write 1 0 1881 rand dsync testfile
    f2fs_io fallocate 0 7708672 4096 testfile
    f2fs_io write 1 1881 1 rand buffered testfile
    fsync testfile
    umount
    mount
    f2fs_io precache_extents testfile
    
    When the data layout is something like this:
    dnode1:                     dnode2:
    [0]      A                  [0]    NEW_ADDR
    [1]      A+1                [1]    0x0
    ...
    [1016]   A+1016
    [1017]   B (B!=A+1017)      [1017] 0x0
    
    During precache_extents, we map the last block(valid blkaddr) in dnode1:
    map->m_flags |= F2FS_MAP_MAPPED;
    map->m_pblk = blkaddr(valid blkaddr);
    map->m_len = 1;
    then we goto next_dnode, meet the first block in dnode2(hole), goto sync_out:
    map->m_flags & F2FS_MAP_MAPPED == true, and we make zero-sized extent:
    
    map->m_len = 1
    ofs = start_pgofs - map->m_lblk = 1882 - 1881 = 1
    ei.fofs = start_pgofs = 1882
    ei.len = map->m_len - ofs = 1 - 1 = 0
    
    Rebased on patch[1], this patch can cover these cases to avoid zero-sized extent:
    A,B,C is valid blkaddr
    case1:
    dnode1:                     dnode2:
    [0]      A                  [0]    NEW_ADDR
    [1]      A+1                [1]    0x0
    ...                         ....
    [1016]   A+1016
    [1017]   B (B!=A+1017)      [1017] 0x0
    
    case2:
    dnode1:                     dnode2:
    [0]      A                  [0]    C (C!=B+1)
    [1]      A+1                [1]    C+1
    ...                         ....
    [1016]   A+1016
    [1017]   B (B!=A+1017)      [1017] 0x0
    
    case3:
    dnode1:                     dnode2:
    [0]      A                  [0]    C (C!=B+2)
    [1]      A+1                [1]    C+1
    ...                         ....
    [1015]   A+1015
    [1016]   B (B!=A+1016)
    [1017]   B+1                [1017] 0x0
    
    [1] https://lore.kernel.org/linux-f2fs-devel/20250912081250.44383-1-chao@kernel.org/
    
    Fixes: c4020b2da4c9 ("f2fs: support F2FS_IOC_PRECACHE_EXTENTS")
    Signed-off-by: wangzijie <wangzijie1@honor.com>
    Reviewed-by: Chao Yu <chao@kernel.org>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
filelock: add FL_RECLAIM to show_fl_flags() macro [+ + +]
Author: Jeff Layton <jlayton@kernel.org>
Date:   Wed Sep 3 11:23:33 2025 -0400

    filelock: add FL_RECLAIM to show_fl_flags() macro
    
    [ Upstream commit c593b9d6c446510684da400833f9d632651942f0 ]
    
    Show the FL_RECLAIM flag symbolically in tracepoints.
    
    Fixes: bb0a55bb7148 ("nfs: don't allow reexport reclaims")
    Signed-off-by: Jeff Layton <jlayton@kernel.org>
    Link: https://lore.kernel.org/20250903-filelock-v1-1-f2926902962d@kernel.org
    Signed-off-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
 
firmware: firmware: meson-sm: fix compile-test default [+ + +]
Author: Johan Hovold <johan@kernel.org>
Date:   Fri Jul 25 09:54:29 2025 +0200

    firmware: firmware: meson-sm: fix compile-test default
    
    [ Upstream commit 0454346d1c5f7fccb3ef6e3103985de8ab3469f3 ]
    
    Enabling compile testing should not enable every individual driver (we
    have "allyesconfig" for that).
    
    Fixes: 4a434abc40d2 ("firmware: meson-sm: enable build as module")
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
    Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
    Link: https://lore.kernel.org/r/20250725075429.10056-1-johan@kernel.org
    Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
fs/ntfs3: reject index allocation if $BITMAP is empty but blocks exist [+ + +]
Author: Moon Hee Lee <moonhee.lee.ca@gmail.com>
Date:   Tue Jul 22 10:40:16 2025 -0700

    fs/ntfs3: reject index allocation if $BITMAP is empty but blocks exist
    
    [ Upstream commit 0dc7117da8f92dd5fe077d712a756eccbe377d40 ]
    
    Index allocation requires at least one bit in the $BITMAP attribute to
    track usage of index entries. If the bitmap is empty while index blocks
    are already present, this reflects on-disk corruption.
    
    syzbot triggered this condition using a malformed NTFS image. During a
    rename() operation involving a long filename (which spans multiple
    index entries), the empty bitmap allowed the name to be added without
    valid tracking. Subsequent deletion of the original entry failed with
    -ENOENT, due to unexpected index state.
    
    Reject such cases by verifying that the bitmap is not empty when index
    blocks exist.
    
    Reported-by: syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=b0373017f711c06ada64
    Fixes: d99208b91933 ("fs/ntfs3: cancle set bad inode after removing name fails")
    Tested-by: syzbot+b0373017f711c06ada64@syzkaller.appspotmail.com
    Signed-off-by: Moon Hee Lee <moonhee.lee.ca@gmail.com>
    Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
fs: ntfs3: Fix integer overflow in run_unpack() [+ + +]
Author: Vitaly Grigoryev <Vitaly.Grigoryev@kaspersky.com>
Date:   Mon Aug 25 13:08:55 2025 +0300

    fs: ntfs3: Fix integer overflow in run_unpack()
    
    [ Upstream commit 736fc7bf5f68f6b74a0925b7e072c571838657d2 ]
    
    The MFT record relative to the file being opened contains its runlist,
    an array containing information about the file's location on the physical
    disk. Analysis of all Call Stack paths showed that the values of the
    runlist array, from which LCNs are calculated, are not validated before
    run_unpack function.
    
    The run_unpack function decodes the compressed runlist data format
    from MFT attributes (for example, $DATA), converting them into a runs_tree
    structure, which describes the mapping of virtual clusters (VCN) to
    logical clusters (LCN). The NTFS3 subsystem also has a shortcut for
    deleting files from MFT records - in this case, the RUN_DEALLOCATE
    command is sent to the run_unpack input, and the function logic
    provides that all data transferred to the runlist about file or
    directory is deleted without creating a runs_tree structure.
    
    Substituting the runlist in the $DATA attribute of the MFT record for an
    arbitrary file can lead either to access to arbitrary data on the disk
    bypassing access checks to them (since the inode access check
    occurs above) or to destruction of arbitrary data on the disk.
    
    Add overflow check for addition operation.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation")
    Signed-off-by: Vitaly Grigoryev <Vitaly.Grigoryev@kaspersky.com>
    Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

fs: udf: fix OOB read in lengthAllocDescs handling [+ + +]
Author: Larshin Sergey <Sergey.Larshin@kaspersky.com>
Date:   Mon Sep 22 16:13:58 2025 +0300

    fs: udf: fix OOB read in lengthAllocDescs handling
    
    commit 3bd5e45c2ce30e239d596becd5db720f7eb83c99 upstream.
    
    When parsing Allocation Extent Descriptor, lengthAllocDescs comes from
    on-disk data and must be validated against the block size. Crafted or
    corrupted images may set lengthAllocDescs so that the total descriptor
    length (sizeof(allocExtDesc) + lengthAllocDescs) exceeds the buffer,
    leading udf_update_tag() to call crc_itu_t() on out-of-bounds memory and
    trigger a KASAN use-after-free read.
    
    BUG: KASAN: use-after-free in crc_itu_t+0x1d5/0x2b0 lib/crc-itu-t.c:60
    Read of size 1 at addr ffff888041e7d000 by task syz-executor317/5309
    
    CPU: 0 UID: 0 PID: 5309 Comm: syz-executor317 Not tainted 6.12.0-rc4-syzkaller-00261-g850925a8133c #0
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
    Call Trace:
     <TASK>
     __dump_stack lib/dump_stack.c:94 [inline]
     dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
     print_address_description mm/kasan/report.c:377 [inline]
     print_report+0x169/0x550 mm/kasan/report.c:488
     kasan_report+0x143/0x180 mm/kasan/report.c:601
     crc_itu_t+0x1d5/0x2b0 lib/crc-itu-t.c:60
     udf_update_tag+0x70/0x6a0 fs/udf/misc.c:261
     udf_write_aext+0x4d8/0x7b0 fs/udf/inode.c:2179
     extent_trunc+0x2f7/0x4a0 fs/udf/truncate.c:46
     udf_truncate_tail_extent+0x527/0x7e0 fs/udf/truncate.c:106
     udf_release_file+0xc1/0x120 fs/udf/file.c:185
     __fput+0x23f/0x880 fs/file_table.c:431
     task_work_run+0x24f/0x310 kernel/task_work.c:239
     exit_task_work include/linux/task_work.h:43 [inline]
     do_exit+0xa2f/0x28e0 kernel/exit.c:939
     do_group_exit+0x207/0x2c0 kernel/exit.c:1088
     __do_sys_exit_group kernel/exit.c:1099 [inline]
     __se_sys_exit_group kernel/exit.c:1097 [inline]
     __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1097
     x64_sys_call+0x2634/0x2640 arch/x86/include/generated/asm/syscalls_64.h:232
     do_syscall_x64 arch/x86/entry/common.c:52 [inline]
     do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
     </TASK>
    
    Validate the computed total length against epos->bh->b_size.
    
    Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
    
    Reported-by: syzbot+8743fca924afed42f93e@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=8743fca924afed42f93e
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Cc: stable@vger.kernel.org
    Signed-off-by: Larshin Sergey <Sergey.Larshin@kaspersky.com>
    Link: https://patch.msgid.link/20250922131358.745579-1-Sergey.Larshin@kaspersky.com
    Signed-off-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
gfs2: Fix GLF_INVALIDATE_IN_PROGRESS flag clearing in do_xmote [+ + +]
Author: Andreas Gruenbacher <agruenba@redhat.com>
Date:   Sat Aug 2 23:57:24 2025 +0200

    gfs2: Fix GLF_INVALIDATE_IN_PROGRESS flag clearing in do_xmote
    
    [ Upstream commit 061df28b82af6b22fb5fa529a8f2ef00474ee004 ]
    
    Commit 865cc3e9cc0b ("gfs2: fix a deadlock on withdraw-during-mount")
    added a statement to do_xmote() to clear the GLF_INVALIDATE_IN_PROGRESS
    flag a second time after it has already been cleared.  Fix that.
    
    Fixes: 865cc3e9cc0b ("gfs2: fix a deadlock on withdraw-during-mount")
    Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
    Reviewed-by: Andrew Price <anprice@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
hwmon: (mlxreg-fan) Separate methods of fan setting coming from different subsystems [+ + +]
Author: Vadim Pasternak <vadimp@nvidia.com>
Date:   Mon Jan 13 10:48:58 2025 +0200

    hwmon: (mlxreg-fan) Separate methods of fan setting coming from different subsystems
    
    [ Upstream commit c02e4644f8ac9c501077ef5ac53ae7fc51472d49 ]
    
    Distinct between fan speed setting request coming for hwmon and
    thermal subsystems.
    
    There are fields 'last_hwmon_state' and 'last_thermal_state' in the
    structure 'mlxreg_fan_pwm', which respectively store the cooling state
    set by the 'hwmon' and 'thermal' subsystem.
    The purpose is to make arbitration of fan speed setting. For example, if
    fan speed required to be not lower than some limit, such setting is to
    be performed through 'hwmon' subsystem, thus 'thermal' subsystem will
    not set fan below this limit.
    
    Currently, the 'last_thermal_state' is also be updated by 'hwmon' causing
    cooling state to never be set to a lower value.
    
    Eliminate update of 'last_thermal_state', when request is coming from
    'hwmon' subsystem.
    
    Fixes: da74944d3a46 ("hwmon: (mlxreg-fan) Use pwm attribute for setting fan speed low limit")
    Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
    Link: https://lore.kernel.org/r/20250113084859.27064-2-vadimp@nvidia.com
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
hwrng: ks-sa - fix division by zero in ks_sa_rng_init [+ + +]
Author: Nishanth Menon <nm@ti.com>
Date:   Fri Sep 19 08:20:02 2025 -0500

    hwrng: ks-sa - fix division by zero in ks_sa_rng_init
    
    [ Upstream commit 612b1dfeb414dfa780a6316014ceddf9a74ff5c0 ]
    
    Fix division by zero in ks_sa_rng_init caused by missing clock
    pointer initialization. The clk_get_rate() call is performed on
    an uninitialized clk pointer, resulting in division by zero when
    calculating delay values.
    
    Add clock initialization code before using the clock.
    
    Fixes: 6d01d8511dce ("hwrng: ks-sa - Add minimum sleep time before ready-polling")
    Signed-off-by: Nishanth Menon <nm@ti.com>
    
     drivers/char/hw_random/ks-sa-rng.c | 7 +++++++
     1 file changed, 7 insertions(+)
    Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
    
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

hwrng: nomadik - add ARM_AMBA dependency [+ + +]
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Tue Jul 29 17:28:00 2025 +0200

    hwrng: nomadik - add ARM_AMBA dependency
    
    [ Upstream commit efaa2d815a0e4d1c06750e587100f6f7f4ee5497 ]
    
    Compile-testing this driver is only possible when the AMBA bus driver is
    available in the kernel:
    
    x86_64-linux-ld: drivers/char/hw_random/nomadik-rng.o: in function `nmk_rng_remove':
    nomadik-rng.c:(.text+0x67): undefined reference to `amba_release_regions'
    x86_64-linux-ld: drivers/char/hw_random/nomadik-rng.o: in function `nmk_rng_probe':
    nomadik-rng.c:(.text+0xee): undefined reference to `amba_request_regions'
    x86_64-linux-ld: nomadik-rng.c:(.text+0x18d): undefined reference to `amba_release_regions'
    
    The was previously implied by the 'depends on ARCH_NOMADIK', but needs to be
    specified for the COMPILE_TEST case.
    
    Fixes: d5e93b3374e4 ("hwrng: Kconfig - Add helper dependency on COMPILE_TEST")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
i2c: designware: Add disabling clocks when probe fails [+ + +]
Author: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Date:   Thu Jul 24 13:22:11 2025 +0900

    i2c: designware: Add disabling clocks when probe fails
    
    [ Upstream commit c149841b069ccc6e480b00e11f35a57b5d88c7bb ]
    
    After an error occurs during probing state, dw_i2c_plat_pm_cleanup() is
    called. However, this function doesn't disable clocks and the clock-enable
    count keeps increasing. Should disable these clocks explicitly.
    
    Fixes: 7272194ed391f ("i2c-designware: add minimal support for runtime PM")
    Co-developed-by: Kohei Ito <ito.kohei@socionext.com>
    Signed-off-by: Kohei Ito <ito.kohei@socionext.com>
    Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
    Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

i2c: designware: Fix clock issue when PM is disabled [+ + +]
Author: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Date:   Thu Jul 24 13:22:10 2025 +0900

    i2c: designware: Fix clock issue when PM is disabled
    
    [ Upstream commit 70e633bedeeb4a7290d3b1dd9d49cc2bae25a46f ]
    
    When the driver is removed, the clocks are first enabled by
    calling pm_runtime_get_sync(), and then disabled with
    pm_runtime_put_sync().
    
    If CONFIG_PM=y, clocks for this controller are disabled when it's in
    the idle state. So the clocks are properly disabled when the driver
    exits.
    
    Othewise, the clocks are always enabled and the PM functions have
    no effect. Therefore, the driver exits without disabling the clocks.
    
        # cat /sys/kernel/debug/clk/clk-pclk/clk_enable_count
        18
        # echo 1214a000.i2c > /sys/bus/platform/drivers/i2c_designware/bind
        # cat /sys/kernel/debug/clk/clk-pclk/clk_enable_count
        20
        # echo 1214a000.i2c > /sys/bus/platform/drivers/i2c_designware/unbind
        # cat /sys/kernel/debug/clk/clk-pclk/clk_enable_count
        20
    
    To ensure that the clocks can be disabled correctly even without
    CONFIG_PM=y, should add the following fixes:
    
    - Replace with pm_runtime_put_noidle(), which only decrements the runtime
      PM usage count.
    - Call i2c_dw_prepare_clk(false) to explicitly disable the clocks.
    
    Fixes: 7272194ed391f ("i2c-designware: add minimal support for runtime PM")
    Co-developed-by: Kohei Ito <ito.kohei@socionext.com>
    Signed-off-by: Kohei Ito <ito.kohei@socionext.com>
    Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
    Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
    Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

i2c: mediatek: fix potential incorrect use of I2C_MASTER_WRRD [+ + +]
Author: Leilk.Liu <leilk.liu@mediatek.com>
Date:   Sat Sep 6 16:24:06 2025 +0800

    i2c: mediatek: fix potential incorrect use of I2C_MASTER_WRRD
    
    [ Upstream commit b492183652808e0f389272bf63dc836241b287ff ]
    
    The old IC does not support the I2C_MASTER_WRRD (write-then-read)
    function, but the current code’s handling of i2c->auto_restart may
    potentially lead to entering the I2C_MASTER_WRRD software flow,
    resulting in unexpected bugs.
    
    Instead of repurposing the auto_restart flag, add a separate flag
    to signal I2C_MASTER_WRRD operations.
    
    Also fix handling of msgs. If the operation (i2c->op) is
    I2C_MASTER_WRRD, then the msgs pointer is incremented by 2.
    For all other operations, msgs is simply incremented by 1.
    
    Fixes: b2ed11e224a2 ("I2C: mediatek: Add driver for MediaTek MT8173 I2C controller")
    Signed-off-by: Leilk.Liu <leilk.liu@mediatek.com>
    Suggested-by: Chen-Yu Tsai <wenst@chromium.org>
    Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
i3c: master: svc: Recycle unused IBI slot [+ + +]
Author: Stanley Chu <stanley.chuys@gmail.com>
Date:   Fri Aug 29 09:23:09 2025 +0800

    i3c: master: svc: Recycle unused IBI slot
    
    [ Upstream commit 3448a934ba6f803911ac084d05a2ffce507ea6c6 ]
    
    In svc_i3c_master_handle_ibi(), an IBI slot is fetched from the pool
    to store the IBI payload. However, when an error condition is encountered,
    the function returns without recycling the IBI slot, resulting in an IBI
    slot leak.
    
    Fixes: c85e209b799f ("i3c: master: svc: fix ibi may not return mandatory data byte")
    Signed-off-by: Stanley Chu <yschu@nuvoton.com>
    Reviewed-by: Frank Li <Frank.Li@nxp.com>
    Link: https://lore.kernel.org/r/20250829012309.3562585-3-yschu@nuvoton.com
    Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

i3c: master: svc: Use manual response for IBI events [+ + +]
Author: Stanley Chu <yschu@nuvoton.com>
Date:   Fri Aug 29 09:23:08 2025 +0800

    i3c: master: svc: Use manual response for IBI events
    
    [ Upstream commit a7869b0a2540fd122eccec00ae7d4243166b0a60 ]
    
    Driver wants to nack the IBI request when the target is not in the
    known address list. In below code, svc_i3c_master_nack_ibi() will
    cause undefined behavior when using AUTOIBI with auto response rule,
    because hw always auto ack the IBI request.
    
        switch (ibitype) {
        case SVC_I3C_MSTATUS_IBITYPE_IBI:
                dev = svc_i3c_master_dev_from_addr(master, ibiaddr);
                if (!dev || !is_events_enabled(master, SVC_I3C_EVENT_IBI))
                        svc_i3c_master_nack_ibi(master);
                ...
                break;
    
    AutoIBI has another issue that the controller doesn't quit AutoIBI state
    after IBIWON polling timeout when there is a SDA glitch(high->low->high).
    1. SDA high->low: raising an interrupt to execute IBI ISR
    2. SDA low->high
    3. Driver writes an AutoIBI request
    4. AutoIBI process does not start because SDA is not low
    5. IBIWON polling times out
    6. Controller reamins in AutoIBI state and doesn't accept EmitStop request
    
    Emitting broadcast address with IBIRESP_MANUAL avoids both issues.
    
    Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver")
    Signed-off-by: Stanley Chu <yschu@nuvoton.com>
    Reviewed-by: Frank Li <Frank.Li@nxp.com>
    Link: https://lore.kernel.org/r/20250829012309.3562585-2-yschu@nuvoton.com
    Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
IB/sa: Fix sa_local_svc_timeout_ms read race [+ + +]
Author: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Date:   Tue Sep 16 19:31:12 2025 +0300

    IB/sa: Fix sa_local_svc_timeout_ms read race
    
    [ Upstream commit 1428cd764cd708d53a072a2f208d87014bfe05bc ]
    
    When computing the delta, the sa_local_svc_timeout_ms is read without
    ib_nl_request_lock held. Though unlikely in practice, this can cause
    a race condition if multiple local service threads are managing the
    timeout.
    
    Fixes: 2ca546b92a02 ("IB/sa: Route SA pathrecord query through netlink")
    Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
    Reviewed-by: Mark Zhang <markzhang@nvidia.com>
    Signed-off-by: Edward Srouji <edwards@nvidia.com>
    Link: https://patch.msgid.link/20250916163112.98414-1-edwards@nvidia.com
    Signed-off-by: Leon Romanovsky <leon@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
iio: consumers: Fix handling of negative channel scale in iio_convert_raw_to_processed() [+ + +]
Author: Hans de Goede <hansg@kernel.org>
Date:   Sun Aug 31 12:48:20 2025 +0200

    iio: consumers: Fix handling of negative channel scale in iio_convert_raw_to_processed()
    
    [ Upstream commit 0f85406bf830eb8747dd555ab53c9d97ee4af293 ]
    
    There is an issue with the handling of negative channel scales
    in iio_convert_raw_to_processed_unlocked() when the channel-scale
    is of the IIO_VAL_INT_PLUS_[MICRO|NANO] type:
    
    Things work for channel-scale values > -1.0 and < 0.0 because of
    the use of signed values in:
    
            *processed += div_s64(raw64 * (s64)scale_val2 * scale, 1000000LL);
    
    Things will break however for scale values < -1.0. Lets for example say
    that raw = 2, (caller-provided)scale = 10 and (channel)scale_val = -1.5.
    
    The result should then be 2 * 10 * -1.5 = -30.
    
    channel-scale = -1.5 means scale_val = -1 and scale_val2 = 500000,
    now lets see what gets stored in processed:
    
    1. *processed = raw64 * scale_val * scale;
    2. *processed += raw64 * scale_val2 * scale / 1000000LL;
    
    1. Sets processed to 2 * -1 * 10 = -20
    2. Adds 2 * 500000 * 10 / 1000000 = 10 to processed
    
    And the end result is processed = -20 + 10 = -10, which is not correct.
    
    Fix this by always using the abs value of both scale_val and scale_val2
    and if either is negative multiply the end-result by -1.
    
    Note there seems to be an unwritten rule about negative
    IIO_VAL_INT_PLUS_[MICRO|NANO] values that:
    
    i.   values > -1.0 and < 0.0 are written as val=0 val2=-xxx
    ii.  values <= -1.0 are written as val=-xxx val2=xxx
    
    But iio_format_value() will also correctly display a third option:
    
    iii. values <= -1.0 written as val=-xxx val2=-xxx
    
    Since iio_format_value() uses abs(val) when val2 < 0.
    
    This fix also makes iio_convert_raw_to_processed() properly handle
    channel-scales using this third option.
    
    Fixes: 48e44ce0f881 ("iio:inkern: Add function to read the processed value")
    Cc: Matteo Martelli <matteomartelli3@gmail.com>
    Reviewed-by: Andy Shevchenko <andy@kernel.org>
    Signed-off-by: Hans de Goede <hansg@kernel.org>
    Link: https://patch.msgid.link/20250831104825.15097-2-hansg@kernel.org
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

iio: consumers: Fix offset handling in iio_convert_raw_to_processed() [+ + +]
Author: Hans de Goede <hansg@kernel.org>
Date:   Sun Aug 31 12:48:21 2025 +0200

    iio: consumers: Fix offset handling in iio_convert_raw_to_processed()
    
    [ Upstream commit 33f5c69c4daff39c010b3ea6da8ebab285f4277b ]
    
    Fix iio_convert_raw_to_processed() offset handling for channels without
    a scale attribute.
    
    The offset has been applied to the raw64 value not to the original raw
    value. Use the raw64 value so that the offset is taken into account.
    
    Fixes: 14b457fdde38 ("iio: inkern: apply consumer scale when no channel scale is available")
    Cc: Liam Beguin <liambeguin@gmail.com>
    Reviewed-by: Andy Shevchenko <andy@kernel.org>
    Signed-off-by: Hans de Goede <hansg@kernel.org>
    Link: https://patch.msgid.link/20250831104825.15097-3-hansg@kernel.org
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
inet: ping: check sock_net() in ping_get_port() and ping_lookup() [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Fri Aug 29 15:30:51 2025 +0000

    inet: ping: check sock_net() in ping_get_port() and ping_lookup()
    
    [ Upstream commit 59f26d86b2a16f1406f3b42025062b6d1fba5dd5 ]
    
    We need to check socket netns before considering them in ping_get_port().
    Otherwise, one malicious netns could 'consume' all ports.
    
    Add corresponding check in ping_lookup().
    
    Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Reviewed-by: Yue Haibing <yuehaibing@huawei.com>
    Link: https://patch.msgid.link/20250829153054.474201-2-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
init: INITRAMFS_PRESERVE_MTIME should depend on BLK_DEV_INITRD [+ + +]
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Mon Sep 15 09:11:05 2025 +0200

    init: INITRAMFS_PRESERVE_MTIME should depend on BLK_DEV_INITRD
    
    [ Upstream commit 74792608606a525a0e0df7e8d48acd8000561389 ]
    
    INITRAMFS_PRESERVE_MTIME is only used in init/initramfs.c and
    init/initramfs_test.c.  Hence add a dependency on BLK_DEV_INITRD, to
    prevent asking the user about this feature when configuring a kernel
    without initramfs support.
    
    Fixes: 1274aea127b2e8c9 ("initramfs: add INITRAMFS_PRESERVE_MTIME Kconfig option")
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Reviewed-by: Martin Wilck <mwilck@suse.com>
    Reviewed-by: David Disseldorp <ddiss@suse.de>
    Signed-off-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Input: atmel_mxt_ts - allow reset GPIO to sleep [+ + +]
Author: Marek Vasut <marek.vasut@mailbox.org>
Date:   Sun Oct 5 04:33:10 2025 +0200

    Input: atmel_mxt_ts - allow reset GPIO to sleep
    
    commit c7866ee0a9ddd9789faadf58cdac6abd7aabf045 upstream.
    
    The reset GPIO is not toggled in any critical section where it couldn't
    sleep, allow the reset GPIO to sleep. This allows the driver to operate
    reset GPIOs connected to I2C GPIO expanders.
    
    Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
    Link: https://lore.kernel.org/r/20251005023335.166483-1-marek.vasut@mailbox.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: uinput - zero-initialize uinput_ff_upload_compat to avoid info leak [+ + +]
Author: Zhen Ni <zhen.ni@easystack.cn>
Date:   Sun Sep 28 14:37:37 2025 +0800

    Input: uinput - zero-initialize uinput_ff_upload_compat to avoid info leak
    
    commit d3366a04770eea807f2826cbdb96934dd8c9bf79 upstream.
    
    Struct ff_effect_compat is embedded twice inside
    uinput_ff_upload_compat, contains internal padding. In particular, there
    is a hole after struct ff_replay to satisfy alignment requirements for
    the following union member. Without clearing the structure,
    copy_to_user() may leak stack data to userspace.
    
    Initialize ff_up_compat to zero before filling valid fields.
    
    Fixes: 2d56f3a32c0e ("Input: refactor evdev 32bit compat to be shareable with uinput")
    Cc: stable@vger.kernel.org
    Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
    Link: https://lore.kernel.org/r/20250928063737.74590-1-zhen.ni@easystack.cn
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
ipvs: Defer ip_vs_ftp unregister during netns cleanup [+ + +]
Author: Slavin Liu <slavin452@gmail.com>
Date:   Fri Sep 12 01:57:59 2025 +0800

    ipvs: Defer ip_vs_ftp unregister during netns cleanup
    
    [ Upstream commit 134121bfd99a06d44ef5ba15a9beb075297c0821 ]
    
    On the netns cleanup path, __ip_vs_ftp_exit() may unregister ip_vs_ftp
    before connections with valid cp->app pointers are flushed, leading to a
    use-after-free.
    
    Fix this by introducing a global `exiting_module` flag, set to true in
    ip_vs_ftp_exit() before unregistering the pernet subsystem. In
    __ip_vs_ftp_exit(), skip ip_vs_ftp unregister if called during netns
    cleanup (when exiting_module is false) and defer it to
    __ip_vs_cleanup_batch(), which unregisters all apps after all connections
    are flushed. If called during module exit, unregister ip_vs_ftp
    immediately.
    
    Fixes: 61b1ab4583e2 ("IPVS: netns, add basic init per netns.")
    Suggested-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: Slavin Liu <slavin452@gmail.com>
    Signed-off-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ipvs: Use READ_ONCE/WRITE_ONCE for ipvs->enable [+ + +]
Author: Zhang Tengfei <zhtfdev@gmail.com>
Date:   Mon Sep 1 21:46:54 2025 +0800

    ipvs: Use READ_ONCE/WRITE_ONCE for ipvs->enable
    
    [ Upstream commit 944b6b216c0387ac3050cd8b773819ae360bfb1c ]
    
    KCSAN reported a data-race on the `ipvs->enable` flag, which is
    written in the control path and read concurrently from many other
    contexts.
    
    Following a suggestion by Julian, this patch fixes the race by
    converting all accesses to use `WRITE_ONCE()/READ_ONCE()`.
    This lightweight approach ensures atomic access and acts as a
    compiler barrier, preventing unsafe optimizations where the flag
    is checked in loops (e.g., in ip_vs_est.c).
    
    Additionally, the `enable` checks in the fast-path hooks
    (`ip_vs_in_hook`, `ip_vs_out_hook`, `ip_vs_forward_icmp`) are
    removed. These are unnecessary since commit 857ca89711de
    ("ipvs: register hooks only with services"). The `enable=0`
    condition they check for can only occur in two rare and non-fatal
    scenarios: 1) after hooks are registered but before the flag is set,
    and 2) after hooks are unregistered on cleanup_net. In the worst
    case, a single packet might be mishandled (e.g., dropped), which
    does not lead to a system crash or data corruption. Adding a check
    in the performance-critical fast-path to handle this harmless
    condition is not a worthwhile trade-off.
    
    Fixes: 857ca89711de ("ipvs: register hooks only with services")
    Reported-by: syzbot+1651b5234028c294c339@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=1651b5234028c294c339
    Suggested-by: Julian Anastasov <ja@ssi.bg>
    Link: https://lore.kernel.org/lvs-devel/2189fc62-e51e-78c9-d1de-d35b8e3657e3@ssi.bg/
    Signed-off-by: Zhang Tengfei <zhtfdev@gmail.com>
    Acked-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
KEYS: X.509: Fix Basic Constraints CA flag parsing [+ + +]
Author: Fan Wu <wufan@kernel.org>
Date:   Mon Sep 15 21:15:50 2025 +0000

    KEYS: X.509: Fix Basic Constraints CA flag parsing
    
    [ Upstream commit 5851afffe2ab323a53e184ba5a35fddf268f096b ]
    
    Fix the X.509 Basic Constraints CA flag parsing to correctly handle
    the ASN.1 DER encoded structure. The parser was incorrectly treating
    the length field as the boolean value.
    
    Per RFC 5280 section 4.1, X.509 certificates must use ASN.1 DER encoding.
    According to ITU-T X.690, a DER-encoded BOOLEAN is represented as:
    
    Tag (0x01), Length (0x01), Value (0x00 for FALSE, 0xFF for TRUE)
    
    The basicConstraints extension with CA:TRUE is encoded as:
    
      SEQUENCE (0x30) | Length | BOOLEAN (0x01) | Length (0x01) | Value (0xFF)
                                 ^-- v[2]         ^-- v[3]        ^-- v[4]
    
    The parser was checking v[3] (the length field, always 0x01) instead
    of v[4] (the actual boolean value, 0xFF for TRUE in DER encoding).
    
    Also handle the case where the extension is an empty SEQUENCE (30 00),
    which is valid for CA:FALSE when the default value is omitted as
    required by DER encoding rules (X.690 section 11.5).
    
    Per ITU-T X.690-0207:
    - Section 11.5: Default values must be omitted in DER
    - Section 11.1: DER requires TRUE to be encoded as 0xFF
    
    Link: https://datatracker.ietf.org/doc/html/rfc5280
    Link: https://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
    Fixes: 30eae2b037af ("KEYS: X.509: Parse Basic Constraints for CA")
    Signed-off-by: Fan Wu <wufan@kernel.org>
    Reviewed-by: Lukas Wunner <lukas@wunner.de>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ksmbd: fix error code overwriting in smb2_get_info_filesystem() [+ + +]
Author: Matvey Kovalev <matvey.kovalev@ispras.ru>
Date:   Thu Sep 25 15:12:34 2025 +0300

    ksmbd: fix error code overwriting in smb2_get_info_filesystem()
    
    commit 88daf2f448aad05a2e6df738d66fe8b0cf85cee0 upstream.
    
    If client doesn't negotiate with SMB3.1.1 POSIX Extensions,
    then proper error code won't be returned due to overwriting.
    
    Return error immediately.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: e2f34481b24db ("cifsd: add server-side procedures for SMB3")
    Cc: stable@vger.kernel.org
    Signed-off-by: Matvey Kovalev <matvey.kovalev@ispras.ru>
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
leds: flash: leds-qcom-flash: Update torch current clamp setting [+ + +]
Author: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
Date:   Tue Jul 29 12:51:22 2025 +0800

    leds: flash: leds-qcom-flash: Update torch current clamp setting
    
    [ Upstream commit 5974e8f6c3e47ab097c3dd8ece7324d1f88fe739 ]
    
    There is a register to clamp the flash current per LED channel when
    safety timer is disabled. It needs to be updated according to the
    maximum torch LED current setting to ensure the torch current won't
    be clamped unexpectedly.
    
    Fixes: 96a2e242a5dc ("leds: flash: Add driver to support flash LED module in QCOM PMICs")
    Signed-off-by: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
    Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Link: https://lore.kernel.org/r/20250729-fix-torch-clamp-issue-v2-1-9b83816437a3@oss.qualcomm.com
    Signed-off-by: Lee Jones <lee@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
libbpf: Fix reuse of DEVMAP [+ + +]
Author: Yureka Lilian <yuka@yuka.dev>
Date:   Thu Aug 14 20:01:12 2025 +0200

    libbpf: Fix reuse of DEVMAP
    
    [ Upstream commit 6c6b4146deb12d20f42490d5013f2043df942161 ]
    
    Previously, re-using pinned DEVMAP maps would always fail, because
    get_map_info on a DEVMAP always returns flags with BPF_F_RDONLY_PROG set,
    but BPF_F_RDONLY_PROG being set on a map during creation is invalid.
    
    Thus, ignore the BPF_F_RDONLY_PROG flag in the flags returned from
    get_map_info when checking for compatibility with an existing DEVMAP.
    
    The same problem is handled in a third-party ebpf library:
    - https://github.com/cilium/ebpf/issues/925
    - https://github.com/cilium/ebpf/pull/930
    
    Fixes: 0cdbb4b09a06 ("devmap: Allow map lookups from eBPF")
    Signed-off-by: Yureka Lilian <yuka@yuka.dev>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20250814180113.1245565-3-yuka@yuka.dev
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Linux: Linux 6.6.112 [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Wed Oct 15 11:58:10 2025 +0200

    Linux 6.6.112
    
    Link: https://lore.kernel.org/r/20251013144315.184275491@linuxfoundation.org
    Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Tested-by: Brett A C Sheffield <bacs@librecast.net>
    Tested-by: Peter Schneider <pschneider1968@googlemail.com>
    Tested-by: Pavel Machek (CIP) <pavel@denx.de>
    Tested-by: Jon Hunter <jonathanh@nvidia.com>
    Tested-by: Ron Economos <re@w6rz.net>
    Tested-by: Shuah Khan <skhan@linuxfoundation.org>
    Tested-by: Miguel Ojeda <ojeda@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
LoongArch: Automatically disable kaslr if boot from kexec_file [+ + +]
Author: Youling Tang <tangyouling@kylinos.cn>
Date:   Thu Oct 2 22:39:08 2025 +0800

    LoongArch: Automatically disable kaslr if boot from kexec_file
    
    commit c8168b4faf1d62cbb320a3e518ad31cdd567cb05 upstream.
    
    Automatically disable kaslr when the kernel loads from kexec_file.
    
    kexec_file loads the secondary kernel image to a non-linked address,
    inherently providing KASLR-like randomization.
    
    However, on LoongArch where System RAM may be non-contiguous, enabling
    KASLR for the second kernel may relocate it to an invalid memory region
    and cause a boot failure. Thus, we disable KASLR when "kexec_file" is
    detected in the command line.
    
    To ensure compatibility with older kernels loaded via kexec_file, this
    patch should be backported to stable branches.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
    Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
media: rj54n1cb0c: Fix memleak in rj54n1_probe() [+ + +]
Author: Zhang Shurong <zhang_shurong@foxmail.com>
Date:   Tue Jun 24 16:27:24 2025 +0800

    media: rj54n1cb0c: Fix memleak in rj54n1_probe()
    
    [ Upstream commit fda55673ecdabf25f5ecc61b5ab17239257ac252 ]
    
    rj54n1_probe() won't clean all the allocated resources in fail
    path, which may causes the memleaks. Add v4l2_ctrl_handler_free() to
    prevent memleak.
    
    Fixes: f187352dcd45 ("media: i2c: Copy rj54n1cb0c soc_camera sensor driver")
    Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
    Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

media: st-delta: avoid excessive stack usage [+ + +]
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Tue Jun 10 11:31:56 2025 +0200

    media: st-delta: avoid excessive stack usage
    
    [ Upstream commit 5954ad7d1af92cb6244c5f31216e43af55febbb7 ]
    
    Building with a reduced stack warning limit shows that delta_mjpeg_decode()
    copies a giant structure to the stack each time but only uses three of
    its members:
    
    drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c: In function 'delta_mjpeg_decode':
    drivers/media/platform/st/sti/delta/delta-mjpeg-dec.c:427:1: error: the frame size of 1296 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]
    
    Open-code the passing of the structure members that are actually used here.
    
    Fixes: 433ff5b4a29b ("[media] st-delta: add mjpeg support")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

media: zoran: Remove zoran_fh structure [+ + +]
Author: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Date:   Sun Aug 10 04:30:15 2025 +0300

    media: zoran: Remove zoran_fh structure
    
    [ Upstream commit dc322d13cf417552b59e313e809a6da40b8b36ef ]
    
    The zoran_fh structure is a wrapper around v4l2_fh. Its usage has been
    mostly removed by commit 83f89a8bcbc3 ("media: zoran: convert to vb2"),
    but the structure stayed by mistake. It is now used in a single
    location, assigned from a void pointer and then recast to a void
    pointer, without being every accessed. Drop it.
    
    Fixes: 83f89a8bcbc3 ("media: zoran: convert to vb2")
    Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
    Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
mfd: rz-mtu3: Fix MTU5 NFCR register offset [+ + +]
Author: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Date:   Wed Sep 10 20:59:06 2025 +0300

    mfd: rz-mtu3: Fix MTU5 NFCR register offset
    
    commit da32b0e82c523b76265ba1ad25d7ea74f0ece402 upstream.
    
    The NFCR register for MTU5 is at 0x1a95 offset according to Datasheet
    Page 725, Table 16.4. The address of all registers is offset by 0x1200,
    making the proper address of MTU5 NFCR register be 0x895.
    
    Cc: stable@vger.kernel.org
    Fixes: 654c293e1687 ("mfd: Add Renesas RZ/G2L MTU3a core driver")
    Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
    Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
    Link: https://lore.kernel.org/r/20250910175914.12956-1-cosmin-gabriel.tanislav.xa@renesas.com
    Signed-off-by: Lee Jones <lee@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

mfd: vexpress-sysreg: Check the return value of devm_gpiochip_add_data() [+ + +]
Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Date:   Mon Aug 11 15:36:16 2025 +0200

    mfd: vexpress-sysreg: Check the return value of devm_gpiochip_add_data()
    
    commit 1efbee6852f1ff698a9981bd731308dd027189fb upstream.
    
    Commit 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells")
    removed the return value check from the call to gpiochip_add_data() (or
    rather gpiochip_add() back then and later converted to devres) with no
    explanation. This function however can still fail, so check the return
    value and bail-out if it does.
    
    Cc: stable@vger.kernel.org
    Fixes: 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells")
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
    Link: https://lore.kernel.org/r/20250811-gpio-mmio-mfd-conv-v1-1-68c5c958cf80@linaro.org
    Signed-off-by: Lee Jones <lee@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
misc: fastrpc: Fix fastrpc_map_lookup operation [+ + +]
Author: Ling Xu <quic_lxu5@quicinc.com>
Date:   Fri Sep 12 14:12:34 2025 +0100

    misc: fastrpc: Fix fastrpc_map_lookup operation
    
    commit 9031626ade38b092b72638dfe0c6ffce8d8acd43 upstream.
    
    Fastrpc driver creates maps for user allocated fd buffers. Before
    creating a new map, the map list is checked for any already existing
    maps using map fd. Checking with just map fd is not sufficient as the
    user can pass offsetted buffer with less size when the map is created
    and then a larger size the next time which could result in memory
    issues. Check for dma_buf object also when looking up for the map.
    
    Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method")
    Cc: stable@kernel.org
    Co-developed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
    Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
    Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
    Link: https://lore.kernel.org/r/20250912131236.303102-3-srini@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

misc: fastrpc: fix possible map leak in fastrpc_put_args [+ + +]
Author: Ling Xu <quic_lxu5@quicinc.com>
Date:   Fri Sep 12 14:12:35 2025 +0100

    misc: fastrpc: fix possible map leak in fastrpc_put_args
    
    commit da1ba64176e0138f2bfa96f9e43e8c3640d01e1e upstream.
    
    copy_to_user() failure would cause an early return without cleaning up
    the fdlist, which has been updated by the DSP. This could lead to map
    leak. Fix this by redirecting to a cleanup path on failure, ensuring
    that all mapped buffers are properly released before returning.
    
    Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method")
    Cc: stable@kernel.org
    Co-developed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
    Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
    Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
    Link: https://lore.kernel.org/r/20250912131236.303102-4-srini@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

misc: fastrpc: Skip reference for DMA handles [+ + +]
Author: Ling Xu <quic_lxu5@quicinc.com>
Date:   Fri Sep 12 14:12:36 2025 +0100

    misc: fastrpc: Skip reference for DMA handles
    
    commit 10df039834f84a297c72ec962c0f9b7c8c5ca31a upstream.
    
    If multiple dma handles are passed with same fd over a remote call
    the kernel driver takes a reference and expects that put for the
    map will be called as many times to free the map. But DSP only
    updates the fd one time in the fd list when the DSP refcount
    goes to zero and hence kernel make put call only once for the
    fd. This can cause SMMU fault issue as the same fd can be used
    in future for some other call.
    
    Fixes: 35a82b87135d ("misc: fastrpc: Add dma handle implementation")
    Cc: stable@kernel.org
    Co-developed-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
    Signed-off-by: Ekansh Gupta <ekansh.gupta@oss.qualcomm.com>
    Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
    Link: https://lore.kernel.org/r/20250912131236.303102-5-srini@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

misc: genwqe: Fix incorrect cmd field being reported in error [+ + +]
Author: Colin Ian King <colin.i.king@gmail.com>
Date:   Tue Sep 2 12:37:12 2025 +0100

    misc: genwqe: Fix incorrect cmd field being reported in error
    
    [ Upstream commit 6b26053819dccc664120e07c56f107fb6f72f3fa ]
    
    There is a dev_err message that is reporting the value of
    cmd->asiv_length when it should be reporting cmd->asv_length
    instead. Fix this.
    
    Fixes: eaf4722d4645 ("GenWQE Character device and DDCB queue")
    Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
    Link: https://lore.kernel.org/r/20250902113712.2624743-1-colin.i.king@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
mm: hugetlb: avoid soft lockup when mprotect to large memory area [+ + +]
Author: Yang Shi <yang@os.amperecomputing.com>
Date:   Mon Sep 29 13:24:02 2025 -0700

    mm: hugetlb: avoid soft lockup when mprotect to large memory area
    
    commit f52ce0ea90c83a28904c7cc203a70e6434adfecb upstream.
    
    When calling mprotect() to a large hugetlb memory area in our customer's
    workload (~300GB hugetlb memory), soft lockup was observed:
    
    watchdog: BUG: soft lockup - CPU#98 stuck for 23s! [t2_new_sysv:126916]
    
    CPU: 98 PID: 126916 Comm: t2_new_sysv Kdump: loaded Not tainted 6.17-rc7
    Hardware name: GIGACOMPUTING R2A3-T40-AAV1/Jefferson CIO, BIOS 5.4.4.1 07/15/2025
    pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    pc : mte_clear_page_tags+0x14/0x24
    lr : mte_sync_tags+0x1c0/0x240
    sp : ffff80003150bb80
    x29: ffff80003150bb80 x28: ffff00739e9705a8 x27: 0000ffd2d6a00000
    x26: 0000ff8e4bc00000 x25: 00e80046cde00f45 x24: 0000000000022458
    x23: 0000000000000000 x22: 0000000000000004 x21: 000000011b380000
    x20: ffff000000000000 x19: 000000011b379f40 x18: 0000000000000000
    x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
    x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
    x11: 0000000000000000 x10: 0000000000000000 x9 : ffffc875e0aa5e2c
    x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
    x5 : fffffc01ce7a5c00 x4 : 00000000046cde00 x3 : fffffc0000000000
    x2 : 0000000000000004 x1 : 0000000000000040 x0 : ffff0046cde7c000
    
    Call trace:
      mte_clear_page_tags+0x14/0x24
      set_huge_pte_at+0x25c/0x280
      hugetlb_change_protection+0x220/0x430
      change_protection+0x5c/0x8c
      mprotect_fixup+0x10c/0x294
      do_mprotect_pkey.constprop.0+0x2e0/0x3d4
      __arm64_sys_mprotect+0x24/0x44
      invoke_syscall+0x50/0x160
      el0_svc_common+0x48/0x144
      do_el0_svc+0x30/0xe0
      el0_svc+0x30/0xf0
      el0t_64_sync_handler+0xc4/0x148
      el0t_64_sync+0x1a4/0x1a8
    
    Soft lockup is not triggered with THP or base page because there is
    cond_resched() called for each PMD size.
    
    Although the soft lockup was triggered by MTE, it should be not MTE
    specific.  The other processing which takes long time in the loop may
    trigger soft lockup too.
    
    So add cond_resched() for hugetlb to avoid soft lockup.
    
    Link: https://lkml.kernel.org/r/20250929202402.1663290-1-yang@os.amperecomputing.com
    Fixes: 8f860591ffb2 ("[PATCH] Enable mprotect on huge pages")
    Signed-off-by: Yang Shi <yang@os.amperecomputing.com>
    Tested-by: Carl Worth <carl@os.amperecomputing.com>
    Reviewed-by: Christoph Lameter (Ampere) <cl@gentwo.org>
    Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
    Acked-by: David Hildenbrand <david@redhat.com>
    Acked-by: Oscar Salvador <osalvador@suse.de>
    Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
    Reviewed-by: Dev Jain <dev.jain@arm.com>
    Cc: Muchun Song <muchun.song@linux.dev>
    Cc: Will Deacon <will@kernel.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
mtd: rawnand: atmel: Fix error handling path in atmel_nand_controller_add_nands [+ + +]
Author: Erick Karanja <karanja99erick@gmail.com>
Date:   Mon Sep 22 14:07:27 2025 +0300

    mtd: rawnand: atmel: Fix error handling path in atmel_nand_controller_add_nands
    
    [ Upstream commit 8ed4728eb9f10b57c3eb02e0f6933a89ffcb8a91 ]
    
    In case of a jump to the  err label due to atmel_nand_create() or
    atmel_nand_controller_add_nand() failure, the reference to nand_np
    need to be released
    
    Use for_each_child_of_node_scoped() to fix the issue.
    
    Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver")
    
    Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
    Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
nbd: restrict sockets to TCP and UDP [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Tue Sep 9 13:22:43 2025 +0000

    nbd: restrict sockets to TCP and UDP
    
    [ Upstream commit 9f7c02e031570e8291a63162c6c046dc15ff85b0 ]
    
    Recently, syzbot started to abuse NBD with all kinds of sockets.
    
    Commit cf1b2326b734 ("nbd: verify socket is supported during setup")
    made sure the socket supported a shutdown() method.
    
    Explicitely accept TCP and UNIX stream sockets.
    
    Fixes: cf1b2326b734 ("nbd: verify socket is supported during setup")
    Reported-by: syzbot+e1cd6bd8493060bd701d@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/netdev/CANn89iJ+76eE3A_8S_zTpSyW5hvPRn6V57458hCZGY5hbH_bFA@mail.gmail.com/T/#m081036e8747cd7e2626c1da5d78c8b9d1e55b154
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Mike Christie <mchristi@redhat.com>
    Cc: Richard W.M. Jones <rjones@redhat.com>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Yu Kuai <yukuai1@huaweicloud.com>
    Cc: linux-block@vger.kernel.org
    Cc: nbd@other.debian.org
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net/mlx5: fw reset, add reset timeout work [+ + +]
Author: Moshe Shemesh <moshe@nvidia.com>
Date:   Mon Sep 29 00:02:09 2025 +0300

    net/mlx5: fw reset, add reset timeout work
    
    [ Upstream commit 5cfbe7ebfa42fd3c517a701dab5bd73524da9088 ]
    
    Add sync reset timeout to stop poll_sync_reset in case there was no
    reset done or abort event within timeout. Otherwise poll sync reset will
    just continue and in case of fw fatal error no health reporting will be
    done.
    
    Fixes: 38b9f903f22b ("net/mlx5: Handle sync reset request event")
    Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
    Reviewed-by: Shay Drori <shayd@nvidia.com>
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: pagealloc: Fix reclaim race during command interface teardown [+ + +]
Author: Shay Drory <shayd@nvidia.com>
Date:   Mon Sep 29 00:02:08 2025 +0300

    net/mlx5: pagealloc: Fix reclaim race during command interface teardown
    
    [ Upstream commit 79a0e32b32ac4e4f9e4bb22be97f371c8c116c88 ]
    
    The reclaim_pages_cmd() function sends a command to the firmware to
    reclaim pages if the command interface is active.
    
    A race condition can occur if the command interface goes down (e.g., due
    to a PCI error) while the mlx5_cmd_do() call is in flight. In this
    case, mlx5_cmd_do() will return an error. The original code would
    propagate this error immediately, bypassing the software-based page
    reclamation logic that is supposed to run when the command interface is
    down.
    
    Fix this by checking whether mlx5_cmd_do() returns -ENXIO, which mark
    that command interface is down. If this is the case, fall through to
    the software reclamation path. If the command failed for any another
    reason, or finished successfully, return as before.
    
    Fixes: b898ce7bccf1 ("net/mlx5: cmdif, Avoid skipping reclaim pages if FW is not accessible")
    Signed-off-by: Shay Drory <shayd@nvidia.com>
    Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: Stop polling for command response if interface goes down [+ + +]
Author: Moshe Shemesh <moshe@nvidia.com>
Date:   Mon Sep 29 00:02:07 2025 +0300

    net/mlx5: Stop polling for command response if interface goes down
    
    [ Upstream commit b1f0349bd6d320c382df2e7f6fc2ac95c85f2b18 ]
    
    Stop polling on firmware response to command in polling mode if the
    command interface got down. This situation can occur, for example, if a
    firmware fatal error is detected during polling.
    
    This change halts the polling process when the command interface goes
    down, preventing unnecessary waits.
    
    Fixes: b898ce7bccf1 ("net/mlx5: cmdif, Avoid skipping reclaim pages if FW is not accessible")
    Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
    Reviewed-by: Shay Drori <shayd@nvidia.com>
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net: dlink: handle copy_thresh allocation failure [+ + +]
Author: Yeounsu Moon <yyyynoom@gmail.com>
Date:   Mon Sep 29 04:01:24 2025 +0900

    net: dlink: handle copy_thresh allocation failure
    
    [ Upstream commit 8169a6011c5fecc6cb1c3654c541c567d3318de8 ]
    
    The driver did not handle failure of `netdev_alloc_skb_ip_align()`.
    If the allocation failed, dereferencing `skb->protocol` could lead to
    a NULL pointer dereference.
    
    This patch tries to allocate `skb`. If the allocation fails, it falls
    back to the normal path.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Suggested-by: Jakub Kicinski <kuba@kernel.org>
    Tested-on: D-Link DGE-550T Rev-A3
    Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Link: https://patch.msgid.link/20250928190124.1156-1-yyyynoom@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: ena: return 0 in ena_get_rxfh_key_size() when RSS hash key is not configurable [+ + +]
Author: Kohei Enju <enjuk@amazon.com>
Date:   Mon Sep 29 14:02:22 2025 +0900

    net: ena: return 0 in ena_get_rxfh_key_size() when RSS hash key is not configurable
    
    [ Upstream commit f017156aea60db8720e47591ed1e041993381ad2 ]
    
    In EC2 instances where the RSS hash key is not configurable, ethtool
    shows bogus RSS hash key since ena_get_rxfh_key_size() unconditionally
    returns ENA_HASH_KEY_SIZE.
    
    Commit 6a4f7dc82d1e ("net: ena: rss: do not allocate key when not
    supported") added proper handling for devices that don't support RSS
    hash key configuration, but ena_get_rxfh_key_size() has been unchanged.
    
    When the RSS hash key is not configurable, return 0 instead of
    ENA_HASH_KEY_SIZE to clarify getting the value is not supported.
    
    Tested on m5 instance families.
    
    Without patch:
     # ethtool -x ens5 | grep -A 1 "RSS hash key"
     RSS hash key:
     00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
    
    With patch:
     # ethtool -x ens5 | grep -A 1 "RSS hash key"
     RSS hash key:
     Operation not supported
    
    Fixes: 6a4f7dc82d1e ("net: ena: rss: do not allocate key when not supported")
    Signed-off-by: Kohei Enju <enjuk@amazon.com>
    Link: https://patch.msgid.link/20250929050247.51680-1-enjuk@amazon.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: nfc: nci: Add parameter validation for packet data [+ + +]
Author: Deepak Sharma <deepak.sharma.472935@gmail.com>
Date:   Thu Sep 25 18:58:46 2025 +0530

    net: nfc: nci: Add parameter validation for packet data
    
    commit 9c328f54741bd5465ca1dc717c84c04242fac2e1 upstream.
    
    Syzbot reported an uninitialized value bug in nci_init_req, which was
    introduced by commit 5aca7966d2a7 ("Merge tag
    'perf-tools-fixes-for-v6.17-2025-09-16' of
    git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools").
    
    This bug arises due to very limited and poor input validation
    that was done at nic_valid_size(). This validation only
    validates the skb->len (directly reflects size provided at the
    userspace interface) with the length provided in the buffer
    itself (interpreted as NCI_HEADER). This leads to the processing
    of memory content at the address assuming the correct layout
    per what opcode requires there. This leads to the accesses to
    buffer of `skb_buff->data` which is not assigned anything yet.
    
    Following the same silent drop of packets of invalid sizes at
    `nic_valid_size()`, add validation of the data in the respective
    handlers and return error values in case of failure. Release
    the skb if error values are returned from handlers in
    `nci_nft_packet` and effectively do a silent drop
    
    Possible TODO: because we silently drop the packets, the
    call to `nci_request` will be waiting for completion of request
    and will face timeouts. These timeouts can get excessively logged
    in the dmesg. A proper handling of them may require to export
    `nci_request_cancel` (or propagate error handling from the
    nft packets handlers).
    
    Reported-by: syzbot+740e04c2a93467a0f8c8@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=740e04c2a93467a0f8c8
    Fixes: 6a2968aaf50c ("NFC: basic NCI protocol implementation")
    Tested-by: syzbot+740e04c2a93467a0f8c8@syzkaller.appspotmail.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Deepak Sharma <deepak.sharma.472935@gmail.com>
    Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
    Link: https://patch.msgid.link/20250925132846.213425-1-deepak.sharma.472935@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

net: usb: asix: hold PM usage ref to avoid PM/MDIO + RTNL deadlock [+ + +]
Author: Oleksij Rempel <o.rempel@pengutronix.de>
Date:   Sun Oct 5 10:12:03 2025 +0200

    net: usb: asix: hold PM usage ref to avoid PM/MDIO + RTNL deadlock
    
    commit 3d3c4cd5c62f24bb3cb4511b7a95df707635e00a upstream.
    
    Prevent USB runtime PM (autosuspend) for AX88772* in bind.
    
    usbnet enables runtime PM (autosuspend) by default, so disabling it via
    the usb_driver flag is ineffective. On AX88772B, autosuspend shows no
    measurable power saving with current driver (no link partner, admin
    up/down). The ~0.453 W -> ~0.248 W drop on v6.1 comes from phylib powering
    the PHY off on admin-down, not from USB autosuspend.
    
    The real hazard is that with runtime PM enabled, ndo_open() (under RTNL)
    may synchronously trigger autoresume (usb_autopm_get_interface()) into
    asix_resume() while the USB PM lock is held. Resume paths then invoke
    phylink/phylib and MDIO, which also expect RTNL, leading to possible
    deadlocks or PM lock vs MDIO wake issues.
    
    To avoid this, keep the device runtime-PM active by taking a usage
    reference in ax88772_bind() and dropping it in unbind(). A non-zero PM
    usage count blocks runtime suspend regardless of userspace policy
    (.../power/control - pm_runtime_allow/forbid), making this approach
    robust against sysfs overrides.
    
    Holding a runtime-PM usage ref does not affect system-wide suspend;
    system sleep/resume callbacks continue to run as before.
    
    Fixes: 4a2c7217cd5a ("net: usb: asix: ax88772: manage PHY PM from MAC")
    Reported-by: Hubert Wiśniewski <hubert.wisniewski.25632@gmail.com>
    Closes: https://lore.kernel.org/all/DCGHG5UJT9G3.2K1GHFZ3H87T0@gmail.com
    Tested-by: Hubert Wiśniewski <hubert.wisniewski.25632@gmail.com>
    Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
    Closes: https://lore.kernel.org/all/b5ea8296-f981-445d-a09a-2f389d7f6fdd@samsung.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
    Link: https://patch.msgid.link/20251005081203.3067982-1-o.rempel@pengutronix.de
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast [+ + +]
Author: I Viswanath <viswanathiyyappan@gmail.com>
Date:   Wed Sep 24 19:13:50 2025 +0530

    net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast
    
    [ Upstream commit 958baf5eaee394e5fd976979b0791a875f14a179 ]
    
    syzbot reported WARNING in rtl8150_start_xmit/usb_submit_urb.
    This is the sequence of events that leads to the warning:
    
    rtl8150_start_xmit() {
            netif_stop_queue();
            usb_submit_urb(dev->tx_urb);
    }
    
    rtl8150_set_multicast() {
            netif_stop_queue();
            netif_wake_queue();             <-- wakes up TX queue before URB is done
    }
    
    rtl8150_start_xmit() {
            netif_stop_queue();
            usb_submit_urb(dev->tx_urb);    <-- double submission
    }
    
    rtl8150_set_multicast being the ndo_set_rx_mode callback should not be
    calling netif_stop_queue and notif_start_queue as these handle
    TX queue synchronization.
    
    The net core function dev_set_rx_mode handles the synchronization
    for rtl8150_set_multicast making it safe to remove these locks.
    
    Reported-and-tested-by: syzbot+78cae3f37c62ad092caa@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=78cae3f37c62ad092caa
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Tested-by: Michal Pecio <michal.pecio@gmail.com>
    Signed-off-by: I Viswanath <viswanathiyyappan@gmail.com>
    Link: https://patch.msgid.link/20250924134350.264597-1-viswanathiyyappan@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
netfilter: ipset: Remove unused htable_bits in macro ahash_region [+ + +]
Author: Zhen Ni <zhen.ni@easystack.cn>
Date:   Fri Aug 29 16:36:21 2025 +0800

    netfilter: ipset: Remove unused htable_bits in macro ahash_region
    
    [ Upstream commit ba941796d7cd1e81f51eed145dad1b47240ff420 ]
    
    Since the ahash_region() macro was redefined to calculate the region
    index solely from HTABLE_REGION_BITS, the htable_bits parameter became
    unused.
    
    Remove the unused htable_bits argument and its call sites, simplifying
    the code without changing semantics.
    
    Fixes: 8478a729c046 ("netfilter: ipset: fix region locking in hash types")
    Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
    Reviewed-by: Phil Sutter <phil@nwl.cc>
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
nfp: fix RSS hash key size when RSS is not supported [+ + +]
Author: Kohei Enju <enjuk@amazon.com>
Date:   Mon Sep 29 14:42:15 2025 +0900

    nfp: fix RSS hash key size when RSS is not supported
    
    [ Upstream commit 8425161ac1204d2185e0a10f5ae652bae75d2451 ]
    
    The nfp_net_get_rxfh_key_size() function returns -EOPNOTSUPP when
    devices don't support RSS, and callers treat the negative value as a
    large positive value since the return type is u32.
    
    Return 0 when devices don't support RSS, aligning with the ethtool
    interface .get_rxfh_key_size() that requires returning 0 in such cases.
    
    Fixes: 9ff304bfaf58 ("nfp: add support for reporting CRC32 hash function")
    Signed-off-by: Kohei Enju <enjuk@amazon.com>
    Link: https://patch.msgid.link/20250929054230.68120-1-enjuk@amazon.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
NFSv4.1: fix backchannel max_resp_sz verification check [+ + +]
Author: Anthony Iliopoulos <ailiop@suse.com>
Date:   Wed Aug 13 11:00:46 2025 +0200

    NFSv4.1: fix backchannel max_resp_sz verification check
    
    [ Upstream commit 191512355e520dfc45c8bc3b56d4de59c3ade33e ]
    
    When the client max_resp_sz is larger than what the server encodes in
    its reply, the nfs4_verify_back_channel_attrs() check fails and this
    causes nfs4_proc_create_session() to fail, in cases where the client
    page size is larger than that of the server and the server does not want
    to negotiate upwards.
    
    While this is not a problem with the linux nfs server that will reflect
    the proposed value in its reply irrespective of the local page size,
    other nfs server implementations may insist on their own max_resp_sz
    value, which could be smaller.
    
    Fix this by accepting smaller max_resp_sz values from the server, as
    this does not violate the protocol. The server is allowed to decrease
    but not increase proposed the size, and as such values smaller than the
    client-proposed ones are valid.
    
    Fixes: 43c2e885be25 ("nfs4: fix channel attribute sanity-checks")
    Signed-off-by: Anthony Iliopoulos <ailiop@suse.com>
    Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
    Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
null_blk: Fix the description of the cache_size module argument [+ + +]
Author: Genjian Zhang <zhanggenjian@kylinos.cn>
Date:   Fri Aug 15 17:07:32 2025 +0800

    null_blk: Fix the description of the cache_size module argument
    
    [ Upstream commit 7942b226e6b84df13b46b76c01d3b6e07a1b349e ]
    
    When executing modinfo null_blk, there is an error in the description
    of module parameter mbps, and the output information of cache_size is
    incomplete.The output of modinfo before and after applying this patch
    is as follows:
    
    Before:
    [...]
    parm:           cache_size:ulong
    [...]
    parm:           mbps:Cache size in MiB for memory-backed device.
                    Default: 0 (none) (uint)
    [...]
    
    After:
    [...]
    parm:           cache_size:Cache size in MiB for memory-backed device.
                    Default: 0 (none) (ulong)
    [...]
    parm:           mbps:Limit maximum bandwidth (in MiB/s).
                    Default: 0 (no limit) (uint)
    [...]
    
    Fixes: 058efe000b31 ("null_blk: add module parameters for 4 options")
    Signed-off-by: Genjian Zhang <zhanggenjian@kylinos.cn>
    Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
nvdimm: ndtest: Return -ENOMEM if devm_kcalloc() fails in ndtest_probe() [+ + +]
Author: Guangshuo Li <lgs201920130244@gmail.com>
Date:   Thu Sep 25 14:44:48 2025 +0800

    nvdimm: ndtest: Return -ENOMEM if devm_kcalloc() fails in ndtest_probe()
    
    commit a9e6aa994917ee602798bbb03180a194b37865bb upstream.
    
    devm_kcalloc() may fail. ndtest_probe() allocates three DMA address
    arrays (dcr_dma, label_dma, dimm_dma) and later unconditionally uses
    them in ndtest_nvdimm_init(), which can lead to a NULL pointer
    dereference under low-memory conditions.
    
    Check all three allocations and return -ENOMEM if any allocation fails,
    jumping to the common error path. Do not emit an extra error message
    since the allocator already warns on allocation failure.
    
    Fixes: 9399ab61ad82 ("ndtest: Add dimms to the two buses")
    Cc: stable@vger.kernel.org
    Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
    Reviewed-by: Alison Schofield <alison.schofield@intel.com>
    Reviewed-by: Ira Weiny <ira.weiny@intel.com>
    Reviewed-by: Dave Jiang <dave.jiang@intel.com>
    Signed-off-by: Ira Weiny <ira.weiny@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
nvmet-fc: move lsop put work to nvmet_fc_ls_req_op [+ + +]
Author: Daniel Wagner <wagi@kernel.org>
Date:   Tue Sep 2 12:22:00 2025 +0200

    nvmet-fc: move lsop put work to nvmet_fc_ls_req_op
    
    [ Upstream commit db5a5406fb7e5337a074385c7a3e53c77f2c1bd3 ]
    
    It’s possible for more than one async command to be in flight from
    __nvmet_fc_send_ls_req. For each command, a tgtport reference is taken.
    
    In the current code, only one put work item is queued at a time, which
    results in a leaked reference.
    
    To fix this, move the work item to the nvmet_fc_ls_req_op struct, which
    already tracks all resources related to the command.
    
    Fixes: 710c69dbaccd ("nvmet-fc: avoid deadlock on delete association path")
    Reviewed-by: Hannes Reinecke <hare@suse.de>
    Signed-off-by: Daniel Wagner <wagi@kernel.org>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ocfs2: fix double free in user_cluster_connect() [+ + +]
Author: Dan Carpenter <dan.carpenter@linaro.org>
Date:   Tue Sep 23 14:26:07 2025 +0300

    ocfs2: fix double free in user_cluster_connect()
    
    [ Upstream commit 8f45f089337d924db24397f55697cda0e6960516 ]
    
    user_cluster_disconnect() frees "conn->cc_private" which is "lc" but then
    the error handling frees "lc" a second time.  Set "lc" to NULL on this
    path to avoid a double free.
    
    Link: https://lkml.kernel.org/r/aNKDz_7JF7aycZ0k@stanley.mountain
    Fixes: c994c2ebdbbc ("ocfs2: use the new DLM operation callbacks while requesting new lockspace")
    Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
    Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.de>
    Cc: Mark Fasheh <mark@fasheh.com>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Junxiao Bi <junxiao.bi@oracle.com>
    Cc: Changwei Ge <gechangwei@live.cn>
    Cc: Jun Piao <piaojun@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
once: fix race by moving DO_ONCE to separate section [+ + +]
Author: Qi Xi <xiqi2@huawei.com>
Date:   Tue Sep 9 19:29:10 2025 +0800

    once: fix race by moving DO_ONCE to separate section
    
    [ Upstream commit edcc8a38b5ac1a3dbd05e113a38a25b937ebefe5 ]
    
    The commit c2c60ea37e5b ("once: use __section(".data.once")") moved
    DO_ONCE's ___done variable to .data.once section, which conflicts with
    DO_ONCE_LITE() that also uses the same section.
    
    This creates a race condition when clear_warn_once is used:
    
    Thread 1 (DO_ONCE)             Thread 2 (DO_ONCE)
    __do_once_start
        read ___done (false)
        acquire once_lock
    execute func
    __do_once_done
        write ___done (true)      __do_once_start
        release once_lock             // Thread 3 clear_warn_once reset ___done
                                      read ___done (false)
                                      acquire once_lock
                                  execute func
    schedule once_work            __do_once_done
    once_deferred: OK             write ___done (true)
    static_branch_disable         release once_lock
                                  schedule once_work
                                  once_deferred:
                                      BUG_ON(!static_key_enabled)
    
    DO_ONCE_LITE() in once_lite.h is used by WARN_ON_ONCE() and other warning
    macros. Keep its ___done flag in the .data..once section and allow resetting
    by clear_warn_once, as originally intended.
    
    In contrast, DO_ONCE() is used for functions like get_random_once() and
    relies on its ___done flag for internal synchronization. We should not reset
    DO_ONCE() by clear_warn_once.
    
    Fix it by isolating DO_ONCE's ___done into a separate .data..do_once section,
    shielding it from clear_warn_once.
    
    Fixes: c2c60ea37e5b ("once: use __section(".data.once")")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Qi Xi <xiqi2@huawei.com>
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
PCI: tegra194: Fix duplicate PLL disable in pex_ep_event_pex_rst_assert() [+ + +]
Author: Nagarjuna Kristam <nkristam@nvidia.com>
Date:   Thu Sep 11 11:30:22 2025 +0200

    PCI: tegra194: Fix duplicate PLL disable in pex_ep_event_pex_rst_assert()
    
    [ Upstream commit 4f152338e384a3a47dd61909e1457539fa93f5a4 ]
    
    During PERST# assertion tegra_pcie_bpmp_set_pll_state() is currently
    called twice.
    
    pex_ep_event_pex_rst_assert() should do the opposite of
    pex_ep_event_pex_rst_deassert(), so it is obvious that the duplicate
    tegra_pcie_bpmp_set_pll_state() is a mistake, and that the duplicate
    tegra_pcie_bpmp_set_pll_state() call should instead be a call to
    tegra_pcie_bpmp_set_ctrl_state().
    
    With this, the uninitialization sequence also matches that of
    tegra_pcie_unconfig_controller().
    
    Fixes: a54e19073718 ("PCI: tegra194: Add Tegra234 PCIe support")
    Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
    [cassel: improve commit log]
    Signed-off-by: Niklas Cassel <cassel@kernel.org>
    Link: https://patch.msgid.link/20250911093021.1454385-2-cassel@kernel.org
    [mani: added Fixes tag]
    Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

PCI: tegra: Fix devm_kcalloc() argument order for port->phys allocation [+ + +]
Author: Alok Tiwari <alok.a.tiwari@oracle.com>
Date:   Tue Aug 19 08:04:08 2025 -0700

    PCI: tegra: Fix devm_kcalloc() argument order for port->phys allocation
    
    [ Upstream commit e1a8805e5d263453ad76a4f50ab3b1c18ea07560 ]
    
    Fix incorrect argument order in devm_kcalloc() when allocating port->phys.
    The original call used sizeof(phy) as the number of elements and
    port->lanes as the element size, which is reversed.  While this happens to
    produce the correct total allocation size with current pointer size and
    lane counts, the argument order is wrong.
    
    Fixes: 6fe7c187e026 ("PCI: tegra: Support per-lane PHYs")
    Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
    [mani: added Fixes tag]
    Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Link: https://patch.msgid.link/20250819150436.3105973-1-alok.a.tiwari@oracle.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
perf: arm_spe: Prevent overflow in PERF_IDX2OFF() [+ + +]
Author: Leo Yan <leo.yan@arm.com>
Date:   Wed Sep 17 18:41:39 2025 +0100

    perf: arm_spe: Prevent overflow in PERF_IDX2OFF()
    
    [ Upstream commit a29fea30dd93da16652930162b177941abd8c75e ]
    
    Cast nr_pages to unsigned long to avoid overflow when handling large
    AUX buffer sizes (>= 2 GiB).
    
    Fixes: d5d9696b0380 ("drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension")
    Signed-off-by: Leo Yan <leo.yan@arm.com>
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
phy: rockchip: naneng-combphy: Enable U3 OTG port for RK3568 [+ + +]
Author: Jonas Karlman <jonas@kwiboo.se>
Date:   Wed Jul 23 07:23:22 2025 +0000

    phy: rockchip: naneng-combphy: Enable U3 OTG port for RK3568
    
    [ Upstream commit 7bb14b61b7d03db770b7e8871493f5b9b2be2b79 ]
    
    The boot firmware may disable the U3 port early during boot and leave it
    up to the controller or PHY driver to re-enable U3 when needed.
    
    The Rockchip USBDP PHY driver currently does this for RK3576 and RK3588,
    something the Rockchip Naneng Combo PHY driver never does for RK3568.
    This may result in USB 3.0 ports being limited to only using USB 2.0 or
    in special cases not working at all on RK3568.
    
    Write to PIPE_GRF USB3OTGx_CON1 reg to ensure the U3 port is enabled
    when a PHY with PHY_TYPE_USB3 mode is used.
    
    Fixes: 7160820d742a ("phy: rockchip: add naneng combo phy for RK3568")
    Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
    Link: https://lore.kernel.org/r/20250723072324.2246498-1-jonas@kwiboo.se
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
pinctrl: check the return value of pinmux_ops::get_function_name() [+ + +]
Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Date:   Tue Sep 2 13:59:10 2025 +0200

    pinctrl: check the return value of pinmux_ops::get_function_name()
    
    commit 4002ee98c022d671ecc1e4a84029e9ae7d8a5603 upstream.
    
    While the API contract in docs doesn't specify it explicitly, the
    generic implementation of the get_function_name() callback from struct
    pinmux_ops - pinmux_generic_get_function_name() - can fail and return
    NULL. This is already checked in pinmux_check_ops() so add a similar
    check in pinmux_func_name_to_selector() instead of passing the returned
    pointer right down to strcmp() where the NULL can get dereferenced. This
    is normal operation when adding new pinfunctions.
    
    Cc: stable@vger.kernel.org
    Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

pinctrl: meson-gxl: add missing i2c_d pinmux [+ + +]
Author: Da Xue <da@libre.computer>
Date:   Thu Aug 21 19:33:34 2025 -0400

    pinctrl: meson-gxl: add missing i2c_d pinmux
    
    [ Upstream commit d8c2a9edd181f0cc4a66eec954b3d8f6a1d954a7 ]
    
    Amlogic GXL has 4 I2C attached to gpio-periphs. I2C_D is on GPIOX_10/11.
    
    Add the relevant func 3 pinmux per the datasheet for S805X/S905X/S905D.
    
    Fixes: 0f15f500ff2c ("pinctrl: meson: Add GXL pinctrl definitions")
    Signed-off-by: Da Xue <da@libre.computer>
    Link: https://lore.kernel.org/20250821233335.1707559-1-da@libre.computer
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

pinctrl: renesas: Use int type to store negative error codes [+ + +]
Author: Qianfeng Rong <rongqianfeng@vivo.com>
Date:   Sun Aug 31 16:49:58 2025 +0800

    pinctrl: renesas: Use int type to store negative error codes
    
    [ Upstream commit 9f062fc5b0ff44550088912ab89f9da40226a826 ]
    
    Change the 'ret' variable in sh_pfc_pinconf_group_set() from unsigned
    int to int, as it needs to store either negative error codes or zero
    returned by sh_pfc_pinconf_set().
    
    No effect on runtime.
    
    Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
    Fixes: d0593c363f04ccc4 ("pinctrl: sh-pfc: Propagate errors on group config")
    Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Link: https://lore.kernel.org/20250831084958.431913-4-rongqianfeng@vivo.com
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
PM / devfreq: mtk-cci: Fix potential error pointer dereference in probe() [+ + +]
Author: Dan Carpenter <dan.carpenter@linaro.org>
Date:   Thu Aug 7 18:58:23 2025 +0300

    PM / devfreq: mtk-cci: Fix potential error pointer dereference in probe()
    
    [ Upstream commit fc33bf0e097c6834646b98a7b3da0ae5b617f0f9 ]
    
    The drv->sram_reg pointer could be set to ERR_PTR(-EPROBE_DEFER) which
    would lead to a error pointer dereference.  Use IS_ERR_OR_NULL() to check
    that the pointer is valid.
    
    Fixes: e09bd5757b52 ("PM / devfreq: mtk-cci: Handle sram regulator probe deferral")
    Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
    Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
    Link: https://patchwork.kernel.org/project/linux-pm/patch/aJTNHz8kk8s6Q2os@stanley.mountain/
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
PM: sleep: core: Clear power.must_resume in noirq suspend error path [+ + +]
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Tue Sep 2 15:55:45 2025 +0200

    PM: sleep: core: Clear power.must_resume in noirq suspend error path
    
    [ Upstream commit be82483d1b60baf6747884bd74cb7de484deaf76 ]
    
    If system suspend is aborted in the "noirq" phase (for instance, due to
    an error returned by one of the device callbacks), power.is_noirq_suspended
    will not be set for some devices and device_resume_noirq() will return
    early for them.  Consequently, noirq resume callbacks will not run for
    them at all because the noirq suspend callbacks have not run for them
    yet.
    
    If any of them has power.must_resume set and late suspend has been
    skipped for it (due to power.smart_suspend), early resume should be
    skipped for it either, or its state may become inconsistent (for
    instance, if the early resume assumes that it will always follow
    noirq resume).
    
    Make that happen by clearing power.must_resume in device_resume_noirq()
    for devices with power.is_noirq_suspended clear that have been left in
    suspend by device_suspend_late(), which will subsequently cause
    device_resume_early() to leave the device in suspend and avoid
    changing its state.
    
    Fixes: 0d4b54c6fee8 ("PM / core: Add LEAVE_SUSPENDED driver flag")
    Link: https://lore.kernel.org/linux-pm/5d692b81-6f58-4e86-9cb0-ede69a09d799@rowland.harvard.edu/
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
    Link: https://patch.msgid.link/3381776.aeNJFYEL58@rafael.j.wysocki
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
power: supply: cw2015: Fix a alignment coding style issue [+ + +]
Author: Andy Yan <andyshrk@163.com>
Date:   Mon Aug 18 20:32:59 2025 +0800

    power: supply: cw2015: Fix a alignment coding style issue
    
    [ Upstream commit def5612170a8c6c4c6a3ea5bd6c3cfc8de6ba4b1 ]
    
    Fix the checkpatch warning:
    CHECK: Alignment should match open parenthesis
    
    Fixes: 0cb172a4918e ("power: supply: cw2015: Use device managed API to simplify the code")
    Signed-off-by: Andy Yan <andyshrk@163.com>
    Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
pps: fix warning in pps_register_cdev when register device fail [+ + +]
Author: Wang Liang <wangliang74@huawei.com>
Date:   Sat Aug 30 15:50:23 2025 +0800

    pps: fix warning in pps_register_cdev when register device fail
    
    [ Upstream commit b0531cdba5029f897da5156815e3bdafe1e9b88d ]
    
    Similar to previous commit 2a934fdb01db ("media: v4l2-dev: fix error
    handling in __video_register_device()"), the release hook should be set
    before device_register(). Otherwise, when device_register() return error
    and put_device() try to callback the release function, the below warning
    may happen.
    
      ------------[ cut here ]------------
      WARNING: CPU: 1 PID: 4760 at drivers/base/core.c:2567 device_release+0x1bd/0x240 drivers/base/core.c:2567
      Modules linked in:
      CPU: 1 UID: 0 PID: 4760 Comm: syz.4.914 Not tainted 6.17.0-rc3+ #1 NONE
      RIP: 0010:device_release+0x1bd/0x240 drivers/base/core.c:2567
      Call Trace:
       <TASK>
       kobject_cleanup+0x136/0x410 lib/kobject.c:689
       kobject_release lib/kobject.c:720 [inline]
       kref_put include/linux/kref.h:65 [inline]
       kobject_put+0xe9/0x130 lib/kobject.c:737
       put_device+0x24/0x30 drivers/base/core.c:3797
       pps_register_cdev+0x2da/0x370 drivers/pps/pps.c:402
       pps_register_source+0x2f6/0x480 drivers/pps/kapi.c:108
       pps_tty_open+0x190/0x310 drivers/pps/clients/pps-ldisc.c:57
       tty_ldisc_open+0xa7/0x120 drivers/tty/tty_ldisc.c:432
       tty_set_ldisc+0x333/0x780 drivers/tty/tty_ldisc.c:563
       tiocsetd drivers/tty/tty_io.c:2429 [inline]
       tty_ioctl+0x5d1/0x1700 drivers/tty/tty_io.c:2728
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:598 [inline]
       __se_sys_ioctl fs/ioctl.c:584 [inline]
       __x64_sys_ioctl+0x194/0x210 fs/ioctl.c:584
       do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
       do_syscall_64+0x5f/0x2a0 arch/x86/entry/syscall_64.c:94
       entry_SYSCALL_64_after_hwframe+0x76/0x7e
       </TASK>
    
    Before commit c79a39dc8d06 ("pps: Fix a use-after-free"),
    pps_register_cdev() call device_create() to create pps->dev, which will
    init dev->release to device_create_release(). Now the comment is outdated,
    just remove it.
    
    Thanks for the reminder from Calvin Owens, 'kfree_pps' should be removed
    in pps_register_source() to avoid a double free in the failure case.
    
    Link: https://lore.kernel.org/all/20250827065010.3208525-1-wangliang74@huawei.com/
    Fixes: c79a39dc8d06 ("pps: Fix a use-after-free")
    Signed-off-by: Wang Liang <wangliang74@huawei.com>
    Reviewed-By: Calvin Owens <calvin@wbinvd.org>
    Link: https://lore.kernel.org/r/20250830075023.3498174-1-wangliang74@huawei.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
pwm: tiehrpwm: Fix corner case in clock divisor calculation [+ + +]
Author: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Date:   Mon Aug 11 18:01:02 2025 +0200

    pwm: tiehrpwm: Fix corner case in clock divisor calculation
    
    [ Upstream commit 00f83f0e07e44e2f1fb94b223e77ab7b18ee2d7d ]
    
    The function set_prescale_div() is responsible for calculating the clock
    divisor settings such that the input clock rate is divided down such that
    the required period length is at most 0x10000 clock ticks. If period_cycles
    is an integer multiple of 0x10000, the divisor period_cycles / 0x10000 is
    good enough. So round up in the calculation of the required divisor and
    compare it using >= instead of >.
    
    Fixes: 19891b20e7c2 ("pwm: pwm-tiehrpwm: PWM driver support for EHRPWM")
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
    Link: https://lore.kernel.org/r/85488616d7bfcd9c32717651d0be7e330e761b9c.1754927682.git.u.kleine-koenig@baylibre.com
    Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
RDMA/cm: Rate limit destroy CM ID timeout error message [+ + +]
Author: Håkon Bugge <haakon.bugge@oracle.com>
Date:   Fri Sep 12 12:05:20 2025 +0200

    RDMA/cm: Rate limit destroy CM ID timeout error message
    
    [ Upstream commit 2bbe1255fcf19c5eb300efb6cb5ad98d66fdae2e ]
    
    When the destroy CM ID timeout kicks in, you typically get a storm of
    them which creates a log flooding. Hence, change pr_err() to
    pr_err_ratelimited() in cm_destroy_id_wait_timeout().
    
    Fixes: 96d9cbe2f2ff ("RDMA/cm: add timeout to cm_destroy_id wait")
    Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
    Link: https://patch.msgid.link/20250912100525.531102-1-haakon.bugge@oracle.com
    Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
    Signed-off-by: Leon Romanovsky <leon@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
RDMA/core: Resolve MAC of next-hop device without ARP support [+ + +]
Author: Parav Pandit <parav@nvidia.com>
Date:   Tue Sep 16 14:11:01 2025 +0300

    RDMA/core: Resolve MAC of next-hop device without ARP support
    
    [ Upstream commit 200651b9b8aadfbbec852f0e5d042d9abe75e2ab ]
    
    Currently, if the next-hop netdevice does not support ARP resolution,
    the destination MAC address is silently set to zero without reporting
    an error. This leads to incorrect behavior and may result in packet
    transmission failures.
    
    Fix this by deferring MAC resolution to the IP stack via neighbour
    lookup, allowing proper resolution or error reporting as appropriate.
    
    Fixes: 7025fcd36bd6 ("IB: address translation to map IP toIB addresses (GIDs)")
    Signed-off-by: Parav Pandit <parav@nvidia.com>
    Reviewed-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
    Signed-off-by: Edward Srouji <edwards@nvidia.com>
    Link: https://patch.msgid.link/20250916111103.84069-3-edwards@nvidia.com
    Signed-off-by: Leon Romanovsky <leon@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
RDMA/mlx5: Fix vport loopback forcing for MPV device [+ + +]
Author: Patrisious Haddad <phaddad@nvidia.com>
Date:   Wed Aug 13 15:41:19 2025 +0300

    RDMA/mlx5: Fix vport loopback forcing for MPV device
    
    [ Upstream commit 08aae7860450c89eebbc6fd4d38416e53c7a33d2 ]
    
    Previously loopback for MPV was supposed to be permanently enabled,
    however other driver flows were able to over-ride that configuration and
    disable it.
    
    Add force_lb parameter that indicates that loopback should always be
    enabled which prevents all other driver flows from disabling it.
    
    Fixes: a9a9e68954f2 ("RDMA/mlx5: Fix vport loopback for MPV device")
    Link: https://patch.msgid.link/r/cfc6b1f0f99f8100b087483cc14da6025317f901.1755088808.git.leon@kernel.org
    Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
    Reviewed-by: Mark Bloch <mbloch@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
RDMA/rxe: Fix race in do_task() when draining [+ + +]
Author: Gui-Dong Han <hanguidong02@gmail.com>
Date:   Fri Sep 19 02:52:12 2025 +0000

    RDMA/rxe: Fix race in do_task() when draining
    
    [ Upstream commit 8ca7eada62fcfabf6ec1dc7468941e791c1d8729 ]
    
    When do_task() exhausts its iteration budget (!ret), it sets the state
    to TASK_STATE_IDLE to reschedule, without a secondary check on the
    current task->state. This can overwrite the TASK_STATE_DRAINING state
    set by a concurrent call to rxe_cleanup_task() or rxe_disable_task().
    
    While state changes are protected by a spinlock, both rxe_cleanup_task()
    and rxe_disable_task() release the lock while waiting for the task to
    finish draining in the while(!is_done(task)) loop. The race occurs if
    do_task() hits its iteration limit and acquires the lock in this window.
    The cleanup logic may then proceed while the task incorrectly
    reschedules itself, leading to a potential use-after-free.
    
    This bug was introduced during the migration from tasklets to workqueues,
    where the special handling for the draining case was lost.
    
    Fix this by restoring the original pre-migration behavior. If the state is
    TASK_STATE_DRAINING when iterations are exhausted, set cont to 1 to
    force a new loop iteration. This allows the task to finish its work, so
    that a subsequent iteration can reach the switch statement and correctly
    transition the state to TASK_STATE_DRAINED, stopping the task as intended.
    
    Fixes: 9b4b7c1f9f54 ("RDMA/rxe: Add workqueue support for rxe tasks")
    Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
    Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com>
    Link: https://patch.msgid.link/20250919025212.1682087-1-hanguidong02@gmail.com
    Signed-off-by: Leon Romanovsky <leon@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
RDMA/siw: Always report immediate post SQ errors [+ + +]
Author: Bernard Metzler <bernard.metzler@linux.dev>
Date:   Tue Sep 23 16:45:36 2025 +0200

    RDMA/siw: Always report immediate post SQ errors
    
    [ Upstream commit fdd0fe94d68649322e391c5c27dd9f436b4e955e ]
    
    In siw_post_send(), any immediate error encountered during processing of
    the work request list must be reported to the caller, even if previous
    work requests in that list were just accepted and added to the send queue.
    
    Not reporting those errors confuses the caller, which would wait
    indefinitely for the failing and potentially subsequently aborted work
    requests completion.
    
    This fixes a case where immediate errors were overwritten by subsequent
    code in siw_post_send().
    
    Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
    Link: https://patch.msgid.link/r/20250923144536.103825-1-bernard.metzler@linux.dev
    Suggested-by: Stefan Metzmacher <metze@samba.org>
    Signed-off-by: Bernard Metzler <bernard.metzler@linux.dev>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
regmap: Remove superfluous check for !config in __regmap_init() [+ + +]
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Wed Aug 13 15:07:18 2025 +0200

    regmap: Remove superfluous check for !config in __regmap_init()
    
    [ Upstream commit 5c36b86d2bf68fbcad16169983ef7ee8c537db59 ]
    
    The first thing __regmap_init() do is check if config is non-NULL,
    so there is no need to check for this again later.
    
    Fixes: d77e745613680c54 ("regmap: Add bulk read/write callbacks into regmap_config")
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Link: https://patch.msgid.link/a154d9db0f290dda96b48bd817eb743773e846e1.1755090330.git.geert+renesas@glider.be
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
regulator: scmi: Use int type to store negative error codes [+ + +]
Author: Qianfeng Rong <rongqianfeng@vivo.com>
Date:   Fri Aug 29 18:14:11 2025 +0800

    regulator: scmi: Use int type to store negative error codes
    
    [ Upstream commit 9d35d068fb138160709e04e3ee97fe29a6f8615b ]
    
    Change the 'ret' variable from u32 to int to store negative error codes or
    zero returned by of_property_read_u32().
    
    Storing the negative error codes in unsigned type, doesn't cause an issue
    at runtime but it's ugly as pants. Additionally, assigning negative error
    codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
    flag is enabled.
    
    No effect on runtime.
    
    Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
    Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
    Fixes: 0fbeae70ee7c ("regulator: add SCMI driver")
    Link: https://patch.msgid.link/20250829101411.625214-1-rongqianfeng@vivo.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
remoteproc: pru: Fix potential NULL pointer dereference in pru_rproc_set_ctable() [+ + +]
Author: Zhen Ni <zhen.ni@easystack.cn>
Date:   Tue Sep 23 19:21:09 2025 +0800

    remoteproc: pru: Fix potential NULL pointer dereference in pru_rproc_set_ctable()
    
    commit d41e075b077142bb9ae5df40b9ddf9fd7821a811 upstream.
    
    pru_rproc_set_ctable() accessed rproc->priv before the IS_ERR_OR_NULL
    check, which could lead to a null pointer dereference. Move the pru
    assignment, ensuring we never dereference a NULL rproc pointer.
    
    Fixes: 102853400321 ("remoteproc: pru: Add pru_rproc_set_ctable() function")
    Cc: stable@vger.kernel.org
    Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
    Link: https://lore.kernel.org/r/20250923112109.1165126-1-zhen.ni@easystack.cn
    Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

remoteproc: qcom: q6v5: Avoid disabling handover IRQ twice [+ + +]
Author: Stephan Gerhold <stephan.gerhold@linaro.org>
Date:   Wed Aug 20 18:02:33 2025 +0200

    remoteproc: qcom: q6v5: Avoid disabling handover IRQ twice
    
    [ Upstream commit 110be46f5afe27b66caa2d12473a84cd397b1925 ]
    
    enable_irq() and disable_irq() are reference counted, so we must make sure
    that each enable_irq() is always paired with a single disable_irq(). If we
    call disable_irq() twice followed by just a single enable_irq(), the IRQ
    will remain disabled forever.
    
    For the error handling path in qcom_q6v5_wait_for_start(), disable_irq()
    will end up being called twice, because disable_irq() also happens in
    qcom_q6v5_unprepare() when rolling back the call to qcom_q6v5_prepare().
    
    Fix this by dropping disable_irq() in qcom_q6v5_wait_for_start(). Since
    qcom_q6v5_prepare() is the function that calls enable_irq(), it makes more
    sense to have the rollback handled always by qcom_q6v5_unprepare().
    
    Fixes: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource handling")
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
    Link: https://lore.kernel.org/r/20250820-rproc-qcom-q6v5-fixes-v2-1-910b1a3aff71@linaro.org
    Signed-off-by: Bjorn Andersson <andersson@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Revert "net/mlx5e: Update and set Xon/Xoff upon MTU set" [+ + +]
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Mon Sep 29 11:15:29 2025 -0700

    Revert "net/mlx5e: Update and set Xon/Xoff upon MTU set"
    
    [ Upstream commit 6f5dacf88a32b3fd8b52c8ea781bf188c42aaa95 ]
    
    This reverts commit ceddedc969f0532b7c62ca971ee50d519d2bc0cb.
    
    Commit in question breaks the mapping of PGs to pools for some SKUs.
    Specifically multi-host NICs seem to be shipped with a custom buffer
    configuration which maps the lossy PG to pool 4. But the bad commit
    overrides this with pool 0 which does not have sufficient buffer space
    reserved. Resulting in ~40% packet loss. The commit also breaks BMC /
    OOB connection completely (100% packet loss).
    
    Revert, similarly to commit 3fbfe251cc9f ("Revert "net/mlx5e: Update and
    set Xon/Xoff upon port speed set""). The breakage is exactly the same,
    the only difference is that quoted commit would break the NIC immediately
    on boot, and the currently reverted commit only when MTU is changed.
    
    Note: "good" kernels do not restore the configuration, so downgrade isn't
    enough to recover machines. A NIC power cycle seems to be necessary to
    return to a healthy state (or overriding the relevant registers using
    a custom patch).
    
    Fixes: ceddedc969f0 ("net/mlx5e: Update and set Xon/Xoff upon MTU set")
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Link: https://patch.msgid.link/20250929181529.1848157-1-kuba@kernel.org
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Revert "usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running" [+ + +]
Author: Michal Pecio <michal.pecio@gmail.com>
Date:   Thu Sep 18 00:07:20 2025 +0300

    Revert "usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running"
    
    [ Upstream commit 08fa726e66039dfa80226dfa112931f60ad4c898 ]
    
    This reverts commit 28a76fcc4c85dd39633fb96edb643c91820133e3.
    
    No actual HW bugs are known where Endpoint Context shows Running state
    but Stop Endpoint fails repeatedly with Context State Error and leaves
    the endpoint state unchanged. Stop Endpoint retries on Running EPs have
    been performed since early 2021 with no such issues reported so far.
    
    Trying to handle this hypothetical case brings a more realistic danger:
    if Stop Endpoint fails on an endpoint which hasn't yet started after a
    doorbell ring and enough latency occurs before this completion event is
    handled, the driver may time out and begin removing cancelled TDs from
    a running endpoint, even though one more retry would stop it reliably.
    
    Such high latency is rare but not impossible, and removing TDs from a
    running endpoint can cause more damage than not giving back a cancelled
    URB (which wasn't happening anyway). So err on the side of caution and
    revert to the old policy of always retrying if the EP appears running.
    
    [Remove stable tag as we are dealing with theoretical cases -Mathias]
    
    Fixes: 28a76fcc4c85d ("usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running")
    Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Link: https://lore.kernel.org/r/20250917210726.97100-2-mathias.nyman@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
scsi: mpt3sas: Fix crash in transport port remove by using ioc_info() [+ + +]
Author: Ranjan Kumar <ranjan.kumar@broadcom.com>
Date:   Mon Sep 22 15:21:10 2025 +0530

    scsi: mpt3sas: Fix crash in transport port remove by using ioc_info()
    
    [ Upstream commit 1703fe4f8ae50d1fb6449854e1fcaed1053e3a14 ]
    
    During mpt3sas_transport_port_remove(), messages were logged with
    dev_printk() against &mpt3sas_port->port->dev. At this point the SAS
    transport device may already be partially unregistered or freed, leading
    to a crash when accessing its struct device.
    
    Using ioc_info(), which logs via the PCI device (ioc->pdev->dev),
    guaranteed to remain valid until driver removal.
    
    [83428.295776] Oops: general protection fault, probably for non-canonical address 0x6f702f323a33312d: 0000 [#1] SMP NOPTI
    [83428.295785] CPU: 145 UID: 0 PID: 113296 Comm: rmmod Kdump: loaded Tainted: G           OE       6.16.0-rc1+ #1 PREEMPT(voluntary)
    [83428.295792] Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
    [83428.295795] Hardware name: Dell Inc. Precision 7875 Tower/, BIOS 89.1.67 02/23/2024
    [83428.295799] RIP: 0010:__dev_printk+0x1f/0x70
    [83428.295805] Code: 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 49 89 d1 48 85 f6 74 52 4c 8b 46 50 4d 85 c0 74 1f 48 8b 46 68 48 85 c0 74 22 <48> 8b 08 0f b6 7f 01 48 c7 c2 db e8 42 ad 83 ef 30 e9 7b f8 ff ff
    [83428.295813] RSP: 0018:ff85aeafc3137bb0 EFLAGS: 00010206
    [83428.295817] RAX: 6f702f323a33312d RBX: ff4290ee81292860 RCX: 5000cca25103be32
    [83428.295820] RDX: ff85aeafc3137bb8 RSI: ff4290eeb1966c00 RDI: ffffffffc1560845
    [83428.295823] RBP: ff85aeafc3137c18 R08: 74726f702f303a33 R09: ff85aeafc3137bb8
    [83428.295826] R10: ff85aeafc3137b18 R11: ff4290f5bd60fe68 R12: ff4290ee81290000
    [83428.295830] R13: ff4290ee6e345de0 R14: ff4290ee81290000 R15: ff4290ee6e345e30
    [83428.295833] FS:  00007fd9472a6740(0000) GS:ff4290f5ce96b000(0000) knlGS:0000000000000000
    [83428.295837] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [83428.295840] CR2: 00007f242b4db238 CR3: 00000002372b8006 CR4: 0000000000771ef0
    [83428.295844] PKRU: 55555554
    [83428.295846] Call Trace:
    [83428.295848]  <TASK>
    [83428.295850]  _dev_printk+0x5c/0x80
    [83428.295857]  ? srso_alias_return_thunk+0x5/0xfbef5
    [83428.295863]  mpt3sas_transport_port_remove+0x1c7/0x420 [mpt3sas]
    [83428.295882]  _scsih_remove_device+0x21b/0x280 [mpt3sas]
    [83428.295894]  ? _scsih_expander_node_remove+0x108/0x140 [mpt3sas]
    [83428.295906]  ? srso_alias_return_thunk+0x5/0xfbef5
    [83428.295910]  mpt3sas_device_remove_by_sas_address.part.0+0x8f/0x110 [mpt3sas]
    [83428.295921]  _scsih_expander_node_remove+0x129/0x140 [mpt3sas]
    [83428.295933]  _scsih_expander_node_remove+0x6a/0x140 [mpt3sas]
    [83428.295944]  scsih_remove+0x3f0/0x4a0 [mpt3sas]
    [83428.295957]  pci_device_remove+0x3b/0xb0
    [83428.295962]  device_release_driver_internal+0x193/0x200
    [83428.295968]  driver_detach+0x44/0x90
    [83428.295971]  bus_remove_driver+0x69/0xf0
    [83428.295975]  pci_unregister_driver+0x2a/0xb0
    [83428.295979]  _mpt3sas_exit+0x1f/0x300 [mpt3sas]
    [83428.295991]  __do_sys_delete_module.constprop.0+0x174/0x310
    [83428.295997]  ? srso_alias_return_thunk+0x5/0xfbef5
    [83428.296000]  ? __x64_sys_getdents64+0x9a/0x110
    [83428.296005]  ? srso_alias_return_thunk+0x5/0xfbef5
    [83428.296009]  ? syscall_trace_enter+0xf6/0x1b0
    [83428.296014]  do_syscall_64+0x7b/0x2c0
    [83428.296019]  ? srso_alias_return_thunk+0x5/0xfbef5
    [83428.296023]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
    
    Fixes: f92363d12359 ("[SCSI] mpt3sas: add new driver supporting 12GB SAS")
    Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

scsi: myrs: Fix dma_alloc_coherent() error check [+ + +]
Author: Thomas Fourier <fourier.thomas@gmail.com>
Date:   Fri Jul 25 10:31:06 2025 +0200

    scsi: myrs: Fix dma_alloc_coherent() error check
    
    [ Upstream commit edb35b1ffc686fd9b5a91902f034eb9f4d2c9f6b ]
    
    Check for NULL return value with dma_alloc_coherent(), because DMA
    address is not always set by dma_alloc_coherent() on failure.
    
    Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)")
    Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
    Link: https://lore.kernel.org/r/20250725083112.43975-2-fourier.thomas@gmail.com
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

scsi: pm80xx: Fix array-index-out-of-of-bounds on rmmod [+ + +]
Author: Niklas Cassel <cassel@kernel.org>
Date:   Thu Aug 14 19:32:17 2025 +0200

    scsi: pm80xx: Fix array-index-out-of-of-bounds on rmmod
    
    [ Upstream commit 251be2f6037fb7ab399f68cd7428ff274133d693 ]
    
    Since commit f7b705c238d1 ("scsi: pm80xx: Set phy_attached to zero when
    device is gone") UBSAN reports:
    
      UBSAN: array-index-out-of-bounds in drivers/scsi/pm8001/pm8001_sas.c:786:17
      index 28 is out of range for type 'pm8001_phy [16]'
    
    on rmmod when using an expander.
    
    For a direct attached device, attached_phy contains the local phy id.
    For a device behind an expander, attached_phy contains the remote phy
    id, not the local phy id.
    
    I.e. while pm8001_ha will have pm8001_ha->chip->n_phy local phys, for a
    device behind an expander, attached_phy can be much larger than
    pm8001_ha->chip->n_phy (depending on the amount of phys of the
    expander).
    
    E.g. on my system pm8001_ha has 8 phys with phy ids 0-7.  One of the
    ports has an expander connected.  The expander has 31 phys with phy ids
    0-30.
    
    The pm8001_ha->phy array only contains the phys of the HBA.  It does not
    contain the phys of the expander.  Thus, it is wrong to use attached_phy
    to index the pm8001_ha->phy array for a device behind an expander.
    
    Thus, we can only clear phy_attached for devices that are directly
    attached.
    
    Fixes: f7b705c238d1 ("scsi: pm80xx: Set phy_attached to zero when device is gone")
    Reviewed-by: Igor Pylypiv <ipylypiv@google.com>
    Signed-off-by: Niklas Cassel <cassel@kernel.org>
    Link: https://lore.kernel.org/r/20250814173215.1765055-14-cassel@kernel.org
    Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
    Tested-by: Damien Le Moal <dlemoal@kernel.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

scsi: qla2xxx: edif: Fix incorrect sign of error code [+ + +]
Author: Qianfeng Rong <rongqianfeng@vivo.com>
Date:   Fri Sep 5 15:54:43 2025 +0800

    scsi: qla2xxx: edif: Fix incorrect sign of error code
    
    [ Upstream commit 066b8f3fa85c1be7fb7dbae202231e131d38f7bc ]
    
    Change the error code EAGAIN to -EAGAIN in qla24xx_sadb_update() and
    qla_edif_process_els() to align with qla2x00_start_sp() returning
    negative error codes or QLA_SUCCESS, preventing logical errors.
    
    Fixes: 0b3f3143d473 ("scsi: qla2xxx: edif: Add retry for ELS passthrough")
    Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
    Message-ID: <20250905075446.381139-2-rongqianfeng@vivo.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

scsi: qla2xxx: Fix incorrect sign of error code in qla_nvme_xmt_ls_rsp() [+ + +]
Author: Qianfeng Rong <rongqianfeng@vivo.com>
Date:   Fri Sep 5 15:54:45 2025 +0800

    scsi: qla2xxx: Fix incorrect sign of error code in qla_nvme_xmt_ls_rsp()
    
    [ Upstream commit 9877c004e9f4d10e7786ac80a50321705d76e036 ]
    
    Change the error code EAGAIN to -EAGAIN in qla_nvme_xmt_ls_rsp() to
    align with qla2x00_start_sp() returning negative error codes or
    QLA_SUCCESS, preventing logical errors.
    
    Fixes: 875386b98857 ("scsi: qla2xxx: Add Unsolicited LS Request and Response Support for NVMe")
    Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
    Message-ID: <20250905075446.381139-4-rongqianfeng@vivo.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

scsi: qla2xxx: Fix incorrect sign of error code in START_SP_W_RETRIES() [+ + +]
Author: Qianfeng Rong <rongqianfeng@vivo.com>
Date:   Fri Sep 5 15:54:44 2025 +0800

    scsi: qla2xxx: Fix incorrect sign of error code in START_SP_W_RETRIES()
    
    [ Upstream commit 1f037e3acda79639a78f096355f2c308a3d45492 ]
    
    Change the error code EAGAIN to -EAGAIN in START_SP_W_RETRIES() to align
    with qla2x00_start_sp() returning negative error codes or QLA_SUCCESS,
    preventing logical errors.  Additionally, the '_rval' variable should
    store negative error codes to conform to Linux kernel error code
    conventions.
    
    Fixes: 9803fb5d2759 ("scsi: qla2xxx: Fix task management cmd failure")
    Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
    Message-ID: <20250905075446.381139-3-rongqianfeng@vivo.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
seccomp: Fix a race with WAIT_KILLABLE_RECV if the tracer replies too fast [+ + +]
Author: Johannes Nixdorf <johannes@nixdorf.dev>
Date:   Fri Jul 25 18:31:18 2025 +0200

    seccomp: Fix a race with WAIT_KILLABLE_RECV if the tracer replies too fast
    
    [ Upstream commit cce436aafc2abad691fdd37de63ec8a4490b42ce ]
    
    Normally the tracee starts in SECCOMP_NOTIFY_INIT, sends an
    event to the tracer, and starts to wait interruptibly. With
    SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV, if the tracer receives the
    message (SECCOMP_NOTIFY_SENT is reached) while the tracee was waiting
    and is subsequently interrupted, the tracee begins to wait again
    uninterruptibly (but killable).
    
    This fails if SECCOMP_NOTIFY_REPLIED is reached before the tracee
    is interrupted, as the check only considered SECCOMP_NOTIFY_SENT as a
    condition to begin waiting again. In this case the tracee is interrupted
    even though the tracer already acted on its behalf. This breaks the
    assumption SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV wanted to ensure,
    namely that the tracer can be sure the syscall is not interrupted or
    restarted on the tracee after it is received on the tracer. Fix this
    by also considering SECCOMP_NOTIFY_REPLIED when evaluating whether to
    switch to uninterruptible waiting.
    
    With the condition changed the loop in seccomp_do_user_notification()
    would exit immediately after deciding that noninterruptible waiting
    is required if the operation already reached SECCOMP_NOTIFY_REPLIED,
    skipping the code that processes pending addfd commands first. Prevent
    this by executing the remaining loop body one last time in this case.
    
    Fixes: c2aa2dfef243 ("seccomp: Add wait_killable semantic to seccomp user notifier")
    Reported-by: Ali Polatel <alip@chesswob.org>
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220291
    Signed-off-by: Johannes Nixdorf <johannes@nixdorf.dev>
    Link: https://lore.kernel.org/r/20250725-seccomp-races-v2-1-cf8b9d139596@nixdorf.dev
    Signed-off-by: Kees Cook <kees@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
selftests/nolibc: fix EXPECT_NZ macro [+ + +]
Author: Benjamin Berg <benjamin.berg@intel.com>
Date:   Thu Jul 31 22:12:22 2025 +0200

    selftests/nolibc: fix EXPECT_NZ macro
    
    [ Upstream commit 6d33ce3634f99e0c6c9ce9fc111261f2c411cb48 ]
    
    The expect non-zero macro was incorrect and never used. Fix its
    definition.
    
    Fixes: 362aecb2d8cfa ("selftests/nolibc: add basic infrastructure to ease creation of nolibc tests")
    Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
    Link: https://lore.kernel.org/r/20250731201225.323254-2-benjamin@sipsolutions.net
    Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
selftests: arm64: Check fread return value in exec_target [+ + +]
Author: Bala-Vignesh-Reddy <reddybalavignesh9979@gmail.com>
Date:   Fri Aug 8 13:38:30 2025 +0530

    selftests: arm64: Check fread return value in exec_target
    
    [ Upstream commit a679e5683d3eef22ca12514ff8784b2b914ebedc ]
    
    Fix -Wunused-result warning generated when compiled with gcc 13.3.0,
    by checking fread's return value and handling errors, preventing
    potential failures when reading from stdin.
    
    Fixes compiler warning:
    warning: ignoring return value of 'fread' declared with attribute
    'warn_unused_result' [-Wunused-result]
    
    Fixes: 806a15b2545e ("kselftests/arm64: add PAuth test for whether exec() changes keys")
    
    Signed-off-by: Bala-Vignesh-Reddy <reddybalavignesh9979@gmail.com>
    Reviewed-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

selftests: watchdog: skip ping loop if WDIOF_KEEPALIVEPING not supported [+ + +]
Author: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Date:   Sun Sep 14 20:58:41 2025 +0530

    selftests: watchdog: skip ping loop if WDIOF_KEEPALIVEPING not supported
    
    [ Upstream commit e8cfc524eaf3c0ed88106177edb6961e202e6716 ]
    
    Check if watchdog device supports WDIOF_KEEPALIVEPING option before
    entering keep_alive() ping test loop. Fix watchdog-test silently looping
    if ioctl based ping is not supported by the device. Exit from test in
    such case instead of getting stuck in loop executing failing keep_alive()
    
    watchdog_info:
     identity:              m41t93 rtc Watchdog
     firmware_version:      0
    Support/Status: Set timeout (in seconds)
    Support/Status: Watchdog triggers a management or other external alarm not a reboot
    
    Watchdog card disabled.
    Watchdog timeout set to 5 seconds.
    Watchdog ping rate set to 2 seconds.
    Watchdog card enabled.
    WDIOC_KEEPALIVE not supported by this device
    
    without this change
    Watchdog card disabled.
    Watchdog timeout set to 5 seconds.
    Watchdog ping rate set to 2 seconds.
    Watchdog card enabled.
    Watchdog Ticking Away!
    (Where test stuck here forver silently)
    
    Updated change log at commit time:
    Shuah Khan <skhan@linuxfoundation.org>
    
    Link: https://lore.kernel.org/r/20250914152840.GA3047348@bhairav-test.ee.iitb.ac.in
    Fixes: d89d08ffd2c5 ("selftests: watchdog: Fix ioctl SET* error paths to take oneshot exit path")
    Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
    Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
serial: max310x: Add error checking in probe() [+ + +]
Author: Dan Carpenter <dan.carpenter@linaro.org>
Date:   Thu Aug 7 18:54:37 2025 +0300

    serial: max310x: Add error checking in probe()
    
    [ Upstream commit 672a37ba8af1f2ebcedeb94aea2cdd047f805f30 ]
    
    Check if devm_i2c_new_dummy_device() fails.
    
    Fixes: 2e1f2d9a9bdb ("serial: max310x: implement I2C support")
    Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
    Link: https://lore.kernel.org/r/aJTMPZiKqeXSE-KM@stanley.mountain
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
smb: client: fix crypto buffers in non-linear memory [+ + +]
Author: Enzo Matsumiya <ematsumiya@suse.de>
Date:   Thu Sep 25 12:10:33 2025 -0300

    smb: client: fix crypto buffers in non-linear memory
    
    [ Upstream commit 998a67b954680f26f3734040aeeed08642d49721 ]
    
    The crypto API, through the scatterlist API, expects input buffers to be
    in linear memory.  We handle this with the cifs_sg_set_buf() helper
    that converts vmalloc'd memory to their corresponding pages.
    
    However, when we allocate our aead_request buffer (@creq in
    smb2ops.c::crypt_message()), we do so with kvzalloc(), which possibly
    puts aead_request->__ctx in vmalloc area.
    
    AEAD algorithm then uses ->__ctx for its private/internal data and
    operations, and uses sg_set_buf() for such data on a few places.
    
    This works fine as long as @creq falls into kmalloc zone (small
    requests) or vmalloc'd memory is still within linear range.
    
    Tasks' stacks are vmalloc'd by default (CONFIG_VMAP_STACK=y), so too
    many tasks will increment the base stacks' addresses to a point where
    virt_addr_valid(buf) will fail (BUG() in sg_set_buf()) when that
    happens.
    
    In practice: too many parallel reads and writes on an encrypted mount
    will trigger this bug.
    
    To fix this, always alloc @creq with kmalloc() instead.
    Also drop the @sensitive_size variable/arguments since
    kfree_sensitive() doesn't need it.
    
    Backtrace:
    
    [  945.272081] ------------[ cut here ]------------
    [  945.272774] kernel BUG at include/linux/scatterlist.h:209!
    [  945.273520] Oops: invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC NOPTI
    [  945.274412] CPU: 7 UID: 0 PID: 56 Comm: kworker/u33:0 Kdump: loaded Not tainted 6.15.0-lku-11779-g8e9d6efccdd7-dirty #1 PREEMPT(voluntary)
    [  945.275736] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-2-gc13ff2cd-prebuilt.qemu.org 04/01/2014
    [  945.276877] Workqueue: writeback wb_workfn (flush-cifs-2)
    [  945.277457] RIP: 0010:crypto_gcm_init_common+0x1f9/0x220
    [  945.278018] Code: b0 00 00 00 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc 48 c7 c0 00 00 00 80 48 2b 05 5c 58 e5 00 e9 58 ff ff ff <0f> 0b 0f 0b 0f 0b 0f 0b 0f 0b 0f 0b 48 c7 04 24 01 00 00 00 48 8b
    [  945.279992] RSP: 0018:ffffc90000a27360 EFLAGS: 00010246
    [  945.280578] RAX: 0000000000000000 RBX: ffffc90001d85060 RCX: 0000000000000030
    [  945.281376] RDX: 0000000000080000 RSI: 0000000000000000 RDI: ffffc90081d85070
    [  945.282145] RBP: ffffc90001d85010 R08: ffffc90001d85000 R09: 0000000000000000
    [  945.282898] R10: ffffc90001d85090 R11: 0000000000001000 R12: ffffc90001d85070
    [  945.283656] R13: ffff888113522948 R14: ffffc90001d85060 R15: ffffc90001d85010
    [  945.284407] FS:  0000000000000000(0000) GS:ffff8882e66cf000(0000) knlGS:0000000000000000
    [  945.285262] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  945.285884] CR2: 00007fa7ffdd31f4 CR3: 000000010540d000 CR4: 0000000000350ef0
    [  945.286683] Call Trace:
    [  945.286952]  <TASK>
    [  945.287184]  ? crypt_message+0x33f/0xad0 [cifs]
    [  945.287719]  crypto_gcm_encrypt+0x36/0xe0
    [  945.288152]  crypt_message+0x54a/0xad0 [cifs]
    [  945.288724]  smb3_init_transform_rq+0x277/0x300 [cifs]
    [  945.289300]  smb_send_rqst+0xa3/0x160 [cifs]
    [  945.289944]  cifs_call_async+0x178/0x340 [cifs]
    [  945.290514]  ? __pfx_smb2_writev_callback+0x10/0x10 [cifs]
    [  945.291177]  smb2_async_writev+0x3e3/0x670 [cifs]
    [  945.291759]  ? find_held_lock+0x32/0x90
    [  945.292212]  ? netfs_advance_write+0xf2/0x310
    [  945.292723]  netfs_advance_write+0xf2/0x310
    [  945.293210]  netfs_write_folio+0x346/0xcc0
    [  945.293689]  ? __pfx__raw_spin_unlock_irq+0x10/0x10
    [  945.294250]  netfs_writepages+0x117/0x460
    [  945.294724]  do_writepages+0xbe/0x170
    [  945.295152]  ? find_held_lock+0x32/0x90
    [  945.295600]  ? kvm_sched_clock_read+0x11/0x20
    [  945.296103]  __writeback_single_inode+0x56/0x4b0
    [  945.296643]  writeback_sb_inodes+0x229/0x550
    [  945.297140]  __writeback_inodes_wb+0x4c/0xe0
    [  945.297642]  wb_writeback+0x2f1/0x3f0
    [  945.298069]  wb_workfn+0x300/0x490
    [  945.298472]  process_one_work+0x1fe/0x590
    [  945.298949]  worker_thread+0x1ce/0x3c0
    [  945.299397]  ? __pfx_worker_thread+0x10/0x10
    [  945.299900]  kthread+0x119/0x210
    [  945.300285]  ? __pfx_kthread+0x10/0x10
    [  945.300729]  ret_from_fork+0x119/0x1b0
    [  945.301163]  ? __pfx_kthread+0x10/0x10
    [  945.301601]  ret_from_fork_asm+0x1a/0x30
    [  945.302055]  </TASK>
    
    Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list")
    Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

smb: server: fix IRD/ORD negotiation with the client [+ + +]
Author: Stefan Metzmacher <metze@samba.org>
Date:   Wed Aug 20 15:34:58 2025 +0200

    smb: server: fix IRD/ORD negotiation with the client
    
    [ Upstream commit fad988a2158d743da7971884b93482a73735b25e ]
    
    Already do real negotiation in smb_direct_handle_connect_request()
    where we see the requested initiator_depth and responder_resources
    from the client.
    
    We should detect legacy iwarp clients using MPA v1
    with the custom IRD/ORD negotiation.
    
    We need to send the custom IRD/ORD in big endian,
    but we need to try to let clients with broken requests
    using little endian (older cifs.ko) to work.
    
    Note the reason why this uses u8 for
    initiator_depth and responder_resources is
    that the rdma layer also uses it.
    
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Cc: Steve French <smfrench@gmail.com>
    Cc: Tom Talpey <tom@talpey.com>
    Cc: linux-cifs@vger.kernel.org
    Cc: samba-technical@lists.samba.org
    Cc: linux-rdma@vger.kernel.org
    Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers")
    Signed-off-by: Stefan Metzmacher <metze@samba.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
smp: Fix up and expand the smp_call_function_many() kerneldoc [+ + +]
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Tue Sep 9 13:44:14 2025 +0200

    smp: Fix up and expand the smp_call_function_many() kerneldoc
    
    [ Upstream commit ccf09357ffef2ab472369ab9cdf470c9bc9b821a ]
    
    The smp_call_function_many() kerneldoc comment got out of sync with the
    function definition (bool parameter "wait" is incorrectly described as a
    bitmask in it), so fix it up by copying the "wait" description from the
    smp_call_function() kerneldoc and add information regarding the handling
    of the local CPU to it.
    
    Fixes: 49b3bd213a9f ("smp: Fix all kernel-doc warnings")
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
soc: qcom: rpmh-rsc: Unconditionally clear _TRIGGER bit for TCS [+ + +]
Author: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
Date:   Mon Aug 25 11:53:50 2025 +0530

    soc: qcom: rpmh-rsc: Unconditionally clear _TRIGGER bit for TCS
    
    [ Upstream commit f87412d18edb5b8393eb8cb1c2d4a54f90185a21 ]
    
    Unconditionally clear the TCS_AMC_MODE_TRIGGER bit when a
    transaction completes. Previously this bit was only cleared when
    a wake TCS was borrowed as an AMC TCS but not for dedicated
    AMC TCS. Leaving this bit set for AMC TCS and entering deeper low
    power modes can generate a false completion IRQ.
    
    Prevent this scenario by always clearing the TCS_AMC_MODE_TRIGGER
    bit upon receiving a completion IRQ.
    
    Fixes: 15b3bf61b8d4 ("soc: qcom: rpmh-rsc: Clear active mode configuration for wake TCS")
    Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
    Link: https://lore.kernel.org/r/20250825-rpmh_rsc_change-v1-1-138202c31bf6@oss.qualcomm.com
    Signed-off-by: Bjorn Andersson <andersson@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
sparc: fix accurate exception reporting in copy_to_user for Niagara 4 [+ + +]
Author: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Date:   Fri Sep 5 00:03:33 2025 +0200

    sparc: fix accurate exception reporting in copy_to_user for Niagara 4
    
    [ Upstream commit 5a746c1a2c7980de6c888b6373299f751ad7790b ]
    
    The referenced commit introduced exception handlers on user-space memory
    references in copy_from_user and copy_to_user. These handlers return from
    the respective function and calculate the remaining bytes left to copy
    using the current register contents. This commit fixes a bad calculation.
    This will fix the return value of copy_to_user in a specific faulting case.
    The behaviour of memcpy stays unchanged.
    
    Fixes: 957077048009 ("sparc64: Convert NG4copy_{from,to}_user to accurate exception reporting.")
    Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> # on Oracle SPARC T4-1
    Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
    Reviewed-by: Andreas Larsson <andreas@gaisler.com>
    Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-4-1ca72dda195b@mkarcher.dialup.fu-berlin.de
    Signed-off-by: Andreas Larsson <andreas@gaisler.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

sparc: fix accurate exception reporting in copy_{from,to}_user for M7 [+ + +]
Author: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Date:   Fri Sep 5 00:03:34 2025 +0200

    sparc: fix accurate exception reporting in copy_{from,to}_user for M7
    
    [ Upstream commit 936fb512752af349fc30ccbe0afe14a2ae6d7159 ]
    
    The referenced commit introduced exception handlers on user-space memory
    references in copy_from_user and copy_to_user. These handlers return from
    the respective function and calculate the remaining bytes left to copy
    using the current register contents. This commit fixes a couple of bad
    calculations. This will fix the return value of copy_from_user and
    copy_to_user in the faulting case. The behaviour of memcpy stays unchanged.
    
    Fixes: 34060b8fffa7 ("arch/sparc: Add accurate exception reporting in M7memcpy")
    Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> # on Oracle SPARC S7
    Tested-by: Tony Rodriguez <unixpro1970@gmail.com> # S7, see https://lore.kernel.org/r/98564e2e68df2dda0e00c67a75c7f7dfedb33c7e.camel@physik.fu-berlin.de
    Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
    Reviewed-by: Andreas Larsson <andreas@gaisler.com>
    Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-5-1ca72dda195b@mkarcher.dialup.fu-berlin.de
    Signed-off-by: Andreas Larsson <andreas@gaisler.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

sparc: fix accurate exception reporting in copy_{from_to}_user for Niagara [+ + +]
Author: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Date:   Fri Sep 5 00:03:32 2025 +0200

    sparc: fix accurate exception reporting in copy_{from_to}_user for Niagara
    
    [ Upstream commit 0b67c8fc10b13a9090340c5f8a37d308f4e1571c ]
    
    The referenced commit introduced exception handlers on user-space memory
    references in copy_from_user and copy_to_user. These handlers return from
    the respective function and calculate the remaining bytes left to copy
    using the current register contents. This commit fixes a couple of bad
    calculations and a broken epilogue in the exception handlers. This will
    prevent crashes and ensure correct return values of copy_from_user and
    copy_to_user in the faulting case. The behaviour of memcpy stays unchanged.
    
    Fixes: 7ae3aaf53f16 ("sparc64: Convert NGcopy_{from,to}_user to accurate exception reporting.")
    Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> # on SPARC T4 with modified kernel to use Niagara 1 code
    Tested-by: Magnus Lindholm <linmag7@gmail.com> # on Sun Fire T2000
    Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
    Tested-by: Ethan Hawke <ehawk@ember.systems> # on Sun Fire T2000
    Tested-by: Ken Link <iissmart@numberzero.org> # on Sun Fire T1000
    Reviewed-by: Andreas Larsson <andreas@gaisler.com>
    Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-3-1ca72dda195b@mkarcher.dialup.fu-berlin.de
    Signed-off-by: Andreas Larsson <andreas@gaisler.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC [+ + +]
Author: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Date:   Fri Sep 5 00:03:30 2025 +0200

    sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC
    
    [ Upstream commit 4fba1713001195e59cfc001ff1f2837dab877efb ]
    
    The referenced commit introduced exception handlers on user-space memory
    references in copy_from_user and copy_to_user. These handlers return from
    the respective function and calculate the remaining bytes left to copy
    using the current register contents. This commit fixes a couple of bad
    calculations. This will fix the return value of copy_from_user and
    copy_to_user in the faulting case. The behaviour of memcpy stays unchanged.
    
    Fixes: cb736fdbb208 ("sparc64: Convert U1copy_{from,to}_user to accurate exception reporting.")
    Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> # on QEMU 10.0.3
    Tested-by: René Rebe <rene@exactcode.com> # on Ultra 5 UltraSparc IIi
    Tested-by: Jonathan 'theJPster' Pallant <kernel@thejpster.org.uk> # on Sun Netra T1
    Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
    Reviewed-by: Andreas Larsson <andreas@gaisler.com>
    Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-1-1ca72dda195b@mkarcher.dialup.fu-berlin.de
    Signed-off-by: Andreas Larsson <andreas@gaisler.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III [+ + +]
Author: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Date:   Fri Sep 5 00:03:31 2025 +0200

    sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III
    
    [ Upstream commit 47b49c06eb62504075f0f2e2227aee2e2c2a58b3 ]
    
    Anthony Yznaga tracked down that a BUG_ON in ext4 code with large folios
    enabled resulted from copy_from_user() returning impossibly large values
    greater than the size to be copied. This lead to __copy_from_iter()
    returning impossible values instead of the actual number of bytes it was
    able to copy.
    
    The BUG_ON has been reported in
    https://lore.kernel.org/r/b14f55642207e63e907965e209f6323a0df6dcee.camel@physik.fu-berlin.de
    
    The referenced commit introduced exception handlers on user-space memory
    references in copy_from_user and copy_to_user. These handlers return from
    the respective function and calculate the remaining bytes left to copy
    using the current register contents. The exception handlers expect that
    %o2 has already been masked during the bulk copy loop, but the masking was
    performed after that loop. This will fix the return value of copy_from_user
    and copy_to_user in the faulting case. The behaviour of memcpy stays
    unchanged.
    
    Fixes: ee841d0aff64 ("sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.")
    Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> # on Sun Netra 240
    Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com>
    Tested-by: René Rebe <rene@exactcode.com> # on UltraSparc III+ and UltraSparc IIIi
    Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
    Reviewed-by: Andreas Larsson <andreas@gaisler.com>
    Link: https://lore.kernel.org/r/20250905-memcpy_series-v4-2-1ca72dda195b@mkarcher.dialup.fu-berlin.de
    Signed-off-by: Andreas Larsson <andreas@gaisler.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Squashfs: fix uninit-value in squashfs_get_parent [+ + +]
Author: Phillip Lougher <phillip@squashfs.org.uk>
Date:   Fri Sep 19 00:33:08 2025 +0100

    Squashfs: fix uninit-value in squashfs_get_parent
    
    commit 74058c0a9fc8b2b4d5f4a0ef7ee2cfa66a9e49cf upstream.
    
    Syzkaller reports a "KMSAN: uninit-value in squashfs_get_parent" bug.
    
    This is caused by open_by_handle_at() being called with a file handle
    containing an invalid parent inode number.  In particular the inode number
    is that of a symbolic link, rather than a directory.
    
    Squashfs_get_parent() gets called with that symbolic link inode, and
    accesses the parent member field.
    
            unsigned int parent_ino = squashfs_i(inode)->parent;
    
    Because non-directory inodes in Squashfs do not have a parent value, this
    is uninitialised, and this causes an uninitialised value access.
    
    The fix is to initialise parent with the invalid inode 0, which will cause
    an EINVAL error to be returned.
    
    Regular inodes used to share the parent field with the block_list_start
    field.  This is removed in this commit to enable the parent field to
    contain the invalid inode number 0.
    
    Link: https://lkml.kernel.org/r/20250918233308.293861-1-phillip@squashfs.org.uk
    Fixes: 122601408d20 ("Squashfs: export operations")
    Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
    Reported-by: syzbot+157bdef5cf596ad0da2c@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/all/68cc2431.050a0220.139b6.0001.GAE@google.com/
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
sunrpc: fix null pointer dereference on zero-length checksum [+ + +]
Author: Lei Lu <llfamsec@gmail.com>
Date:   Mon Aug 11 21:58:48 2025 +0800

    sunrpc: fix null pointer dereference on zero-length checksum
    
    commit 6df164e29bd4e6505c5a2e0e5f1e1f6957a16a42 upstream.
    
    In xdr_stream_decode_opaque_auth(), zero-length checksum.len causes
    checksum.data to be set to NULL. This triggers a NPD when accessing
    checksum.data in gss_krb5_verify_mic_v2(). This patch ensures that
    the value of checksum.len is not less than XDR_UNIT.
    
    Fixes: 0653028e8f1c ("SUNRPC: Convert gss_verify_header() to use xdr_stream")
    Cc: stable@kernel.org
    Signed-off-by: Lei Lu <llfamsec@gmail.com>
    Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
tcp: fix __tcp_close() to only send RST when required [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Wed Sep 3 08:47:18 2025 +0000

    tcp: fix __tcp_close() to only send RST when required
    
    [ Upstream commit 5f9238530970f2993b23dd67fdaffc552a2d2e98 ]
    
    If the receive queue contains payload that was already
    received, __tcp_close() can send an unexpected RST.
    
    Refine the code to take tp->copied_seq into account,
    as we already do in tcp recvmsg().
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reviewed-by: Neal Cardwell <ncardwell@google.com>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
    Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
    Link: https://patch.msgid.link/20250903084720.1168904-2-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
thermal/drivers/qcom/lmh: Add missing IRQ includes [+ + +]
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Date:   Mon Jul 28 15:18:24 2025 +0300

    thermal/drivers/qcom/lmh: Add missing IRQ includes
    
    [ Upstream commit b50b2c53f98fcdb6957e184eb488c16502db9575 ]
    
    As reported by LKP, the Qualcomm LMH driver needs to include several
    IRQ-related headers, which decrlare necessary IRQ functionality.
    Currently driver builds on ARM64 platforms, where the headers are pulled
    in implicitly by other headers, but fails to build on other platforms.
    
    Fixes: 53bca371cdf7 ("thermal/drivers/qcom: Add support for LMh driver")
    Reported-by: kernel test robot <lkp@intel.com>
    Closes: https://lore.kernel.org/oe-kbuild-all/202507270042.KdK0KKht-lkp@intel.com/
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20250728-lmh-scm-v2-2-33bc58388ca5@oss.qualcomm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
thermal/drivers/qcom: Make LMH select QCOM_SCM [+ + +]
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Date:   Mon Jul 28 15:18:23 2025 +0300

    thermal/drivers/qcom: Make LMH select QCOM_SCM
    
    [ Upstream commit 57eda47bd14b0c2876f2db42e757c57b7a671965 ]
    
    The QCOM_SCM symbol is not user-visible, so it makes little sense to
    depend on it. Make LMH driver select QCOM_SCM as all other drivers do
    and, as the dependecy is now correctly handled, enable || COMPILE_TEST
    in order to include the driver into broader set of build tests.
    
    Fixes: 9e5a4fb84230 ("thermal/drivers/qcom/lmh: make QCOM_LMH depends on QCOM_SCM")
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Link: https://lore.kernel.org/r/20250728-lmh-scm-v2-1-33bc58388ca5@oss.qualcomm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
tools/nolibc: make time_t robust if __kernel_old_time_t is missing in host headers [+ + +]
Author: Zhouyi Zhou <zhouzhouyi@gmail.com>
Date:   Fri Sep 19 01:46:43 2025 +0000

    tools/nolibc: make time_t robust if __kernel_old_time_t is missing in host headers
    
    [ Upstream commit 0ff52df6b32a6b04a7c9dfe3d7a387aff215b482 ]
    
    Commit d5094bcb5bfd ("tools/nolibc: define time_t in terms of
    __kernel_old_time_t") made nolibc use the kernel's time type so that
    `time_t` matches `timespec::tv_sec` on all ABIs (notably x32).
    
    But since __kernel_old_time_t is fairly new, notably from 2020 in commit
    94c467ddb273 ("y2038: add __kernel_old_timespec and __kernel_old_time_t"),
    nolibc builds that rely on host headers may fail.
    
    Switch to __kernel_time_t, which is the same as __kernel_old_time_t and
    has existed for longer.
    
    Tested in PPC VM of Open Source Lab of Oregon State University
    (./tools/testing/selftests/rcutorture/bin/mkinitrd.sh)
    
    Fixes: d5094bcb5bfd ("tools/nolibc: define time_t in terms of __kernel_old_time_t")
    Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
    [Thomas: Reformat commit and its message a bit]
    Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
tty: n_gsm: Don't block input queue by waiting MSC [+ + +]
Author: Seppo Takalo <seppo.takalo@nordicsemi.no>
Date:   Wed Aug 27 15:26:56 2025 +0300

    tty: n_gsm: Don't block input queue by waiting MSC
    
    [ Upstream commit 3cf0b3c243e56bc43be560617416c1d9f301f44c ]
    
    Currently gsm_queue() processes incoming frames and when opening
    a DLC channel it calls gsm_dlci_open() which calls gsm_modem_update().
    If basic mode is used it calls gsm_modem_upd_via_msc() and it
    cannot block the input queue by waiting the response to come
    into the same input queue.
    
    Instead allow sending Modem Status Command without waiting for remote
    end to respond. Define a new function gsm_modem_send_initial_msc()
    for this purpose. As MSC is only valid for basic encoding, it does
    not do anything for advanced or when convergence layer type 2 is used.
    
    Fixes: 48473802506d ("tty: n_gsm: fix missing update of modem controls after DLCI open")
    Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
    Link: https://lore.kernel.org/r/20250827123221.1148666-1-seppo.takalo@nordicsemi.no
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
uio_hv_generic: Let userspace take care of interrupt mask [+ + +]
Author: Naman Jain <namjain@linux.microsoft.com>
Date:   Thu Aug 28 10:12:00 2025 +0530

    uio_hv_generic: Let userspace take care of interrupt mask
    
    commit b15b7d2a1b09ef5428a8db260251897405a19496 upstream.
    
    Remove the logic to set interrupt mask by default in uio_hv_generic
    driver as the interrupt mask value is supposed to be controlled
    completely by the user space. If the mask bit gets changed
    by the driver, concurrently with user mode operating on the ring,
    the mask bit may be set when it is supposed to be clear, and the
    user-mode driver will miss an interrupt which will cause a hang.
    
    For eg- when the driver sets inbound ring buffer interrupt mask to 1,
    the host does not interrupt the guest on the UIO VMBus channel.
    However, setting the mask does not prevent the host from putting a
    message in the inbound ring buffer. So let’s assume that happens,
    the host puts a message into the ring buffer but does not interrupt.
    
    Subsequently, the user space code in the guest sets the inbound ring
    buffer interrupt mask to 0, saying “Hey, I’m ready for interrupts”.
    User space code then calls pread() to wait for an interrupt.
    Then one of two things happens:
    
    * The host never sends another message. So the pread() waits forever.
    * The host does send another message. But because there’s already a
      message in the ring buffer, it doesn’t generate an interrupt.
      This is the correct behavior, because the host should only send an
      interrupt when the inbound ring buffer transitions from empty to
      not-empty. Adding an additional message to a ring buffer that is not
      empty is not supposed to generate an interrupt on the guest.
      Since the guest is waiting in pread() and not removing messages from
      the ring buffer, the pread() waits forever.
    
    This could be easily reproduced in hv_fcopy_uio_daemon if we delay
    setting interrupt mask to 0.
    
    Similarly if hv_uio_channel_cb() sets the interrupt_mask to 1,
    there’s a race condition. Once user space empties the inbound ring
    buffer, but before user space sets interrupt_mask to 0, the host could
    put another message in the ring buffer but it wouldn’t interrupt.
    Then the next pread() would hang.
    
    Fix these by removing all instances where interrupt_mask is changed,
    while keeping the one in set_event() unchanged to enable userspace
    control the interrupt mask by writing 0/1 to /dev/uioX.
    
    Fixes: 95096f2fbd10 ("uio-hv-generic: new userspace i/o driver for VMBus")
    Suggested-by: John Starks <jostarks@microsoft.com>
    Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Michael Kelley <mhklinux@outlook.com>
    Reviewed-by: Long Li <longli@microsoft.com>
    Reviewed-by: Tianyu Lan <tiala@microsoft.com>
    Tested-by: Tianyu Lan <tiala@microsoft.com>
    Link: https://lore.kernel.org/r/20250828044200.492030-1-namjain@linux.microsoft.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
usb: cdns3: cdnsp-pci: remove redundant pci_disable_device() call [+ + +]
Author: Miaoqian Lin <linmq006@gmail.com>
Date:   Wed Sep 3 22:16:13 2025 +0800

    usb: cdns3: cdnsp-pci: remove redundant pci_disable_device() call
    
    commit e9c206324eeb213957a567a9d066bdeb355c7491 upstream.
    
    The cdnsp-pci driver uses pcim_enable_device() to enable a PCI device,
    which means the device will be automatically disabled on driver detach
    through the managed device framework. The manual pci_disable_device()
    call in the error path is therefore redundant.
    
    Found via static anlaysis and this is similar to commit 99ca0b57e49f
    ("thermal: intel: int340x: processor: Fix warning during module unload").
    
    Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
    Cc: stable@vger.kernel.org
    Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
    Link: https://lore.kernel.org/r/20250903141613.2535472-1-linmq006@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

usb: gadget: configfs: Correctly set use_os_string at bind [+ + +]
Author: William Wu <william.wu@rock-chips.com>
Date:   Fri Aug 22 11:36:09 2025 +0800

    usb: gadget: configfs: Correctly set use_os_string at bind
    
    [ Upstream commit e271cc0d25015f4be6c88bd7731444644eb352c2 ]
    
    Once the use_os_string flag is set to true for some functions
    (e.g. adb/mtp) which need to response the OS string, and then
    if we re-bind the ConfigFS gadget to use the other functions
    (e.g. hid) which should not to response the OS string, however,
    because the use_os_string flag is still true, so the usb gadget
    response the OS string descriptor incorrectly, this can cause
    the USB device to be unrecognizable on the Windows system.
    
    An example of this as follows:
    
    echo 1 > os_desc/use
    ln -s functions/ffs.adb configs/b.1/function0
    start adbd
    echo "<udc device>" > UDC   #succeed
    
    stop adbd
    rm configs/b.1/function0
    echo 0 > os_desc/use
    ln -s functions/hid.gs0 configs/b.1/function0
    echo "<udc device>" > UDC  #fail to connect on Windows
    
    This patch sets the use_os_string flag to false at bind if
    the functions not support OS Descriptors.
    
    Signed-off-by: William Wu <william.wu@rock-chips.com>
    Fixes: 87213d388e92 ("usb: gadget: configfs: OS String support")
    Link: https://lore.kernel.org/r/1755833769-25434-1-git-send-email-william.wu@rock-chips.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

usb: host: max3421-hcd: Fix error pointer dereference in probe cleanup [+ + +]
Author: Dan Carpenter <dan.carpenter@linaro.org>
Date:   Thu Aug 7 18:55:00 2025 +0300

    usb: host: max3421-hcd: Fix error pointer dereference in probe cleanup
    
    [ Upstream commit 186e8f2bdba551f3ae23396caccd452d985c23e3 ]
    
    The kthread_run() function returns error pointers so the
    max3421_hcd->spi_thread pointer can be either error pointers or NULL.
    Check for both before dereferencing it.
    
    Fixes: 05dfa5c9bc37 ("usb: host: max3421-hcd: fix "spi_rd8" uses dynamic stack allocation warning")
    Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
    Link: https://lore.kernel.org/r/aJTMVAPtRe5H6jug@stanley.mountain
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

usb: misc: qcom_eud: Access EUD_MODE_MANAGER2 through secure calls [+ + +]
Author: Komal Bajaj <komal.bajaj@oss.qualcomm.com>
Date:   Thu Jul 31 14:31:32 2025 +0530

    usb: misc: qcom_eud: Access EUD_MODE_MANAGER2 through secure calls
    
    [ Upstream commit c0485e864a2eaa1d5a84c71e573dd236d0e885ae ]
    
    EUD_MODE_MANAGER2 register is mapped to a memory region that is marked
    as read-only for operating system running at EL1, enforcing access
    restrictions that prohibit direct memory-mapped writes via writel().
    
    Attempts to write to this region from HLOS can result in silent failures
    or memory access violations, particularly when toggling EUD (Embedded
    USB Debugger) state. To ensure secure register access, modify the driver
    to use qcom_scm_io_writel(), which routes the write operation to Qualcomm
    Secure Channel Monitor (SCM). SCM has the necessary permissions to access
    protected memory regions, enabling reliable control over EUD state.
    
    SC7280, the only user of EUD is also affected, indicating that this could
    never have worked on a properly fused device.
    
    Fixes: 9a1bf58ccd44 ("usb: misc: eud: Add driver support for Embedded USB Debugger(EUD)")
    Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
    Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Reviewed-by: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
    Signed-off-by: Komal Bajaj <komal.bajaj@oss.qualcomm.com>
    Link: https://lore.kernel.org/r/20250731-eud_mode_manager_secure_access-v8-1-4a5dcbb79f41@oss.qualcomm.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

usb: phy: twl6030: Fix incorrect type for ret [+ + +]
Author: Xichao Zhao <zhao.xichao@vivo.com>
Date:   Fri Aug 22 17:22:24 2025 +0800

    usb: phy: twl6030: Fix incorrect type for ret
    
    [ Upstream commit b570b346ddd727c4b41743a6a2f49e7217c5317f ]
    
    In the twl6030_usb_probe(), the variable ret is declared as
    a u32 type. However, since ret may receive -ENODEV when accepting
    the return value of omap_usb2_set_comparator().Therefore, its type
    should be changed to int.
    
    Fixes: 0e98de67bacba ("usb: otg: make twl6030_usb as a comparator driver to omap_usb2")
    Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
    Link: https://lore.kernel.org/r/20250822092224.30645-1-zhao.xichao@vivo.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

usb: typec: tipd: Clear interrupts first [+ + +]
Author: Sven Peter <sven@kernel.org>
Date:   Sun Sep 14 12:56:06 2025 +0000

    usb: typec: tipd: Clear interrupts first
    
    commit be5ae730ffa6fd774a00a4705c1e11e078b08ca1 upstream.
    
    Right now the interrupt handler first reads all updated status registers
    and only then clears the interrupts. It's possible that a duplicate
    interrupt for a changed register or plug state comes in after the
    interrupts have been processed but before they have been cleared:
    
    * plug is inserted, TPS_REG_INT_PLUG_EVENT is set
    * TPS_REG_INT_EVENT1 is read
    * tps6598x_handle_plug_event() has run and registered the plug
    * plug is removed again, TPS_REG_INT_PLUG_EVENT is set (again)
    * TPS_REG_INT_CLEAR1 is written, TPS_REG_INT_PLUG_EVENT is cleared
    
    We then have no plug connected and no pending interrupt but the tipd
    core still thinks there is a plug. It's possible to trigger this with
    e.g. a slightly broken Type-C to USB A converter.
    
    Fix this by first clearing the interrupts and only then reading the
    updated registers.
    
    Fixes: 45188f27b3d0 ("usb: typec: tipd: Add support for Apple CD321X")
    Fixes: 0a4c005bd171 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers")
    Cc: stable@kernel.org
    Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
    Reviewed-by: Neal Gompa <neal@gompa.dev>
    Signed-off-by: Sven Peter <sven@kernel.org>
    Link: https://lore.kernel.org/r/20250914-apple-usb3-tipd-v1-1-4e99c8649024@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

usb: vhci-hcd: Prevent suspending virtually attached devices [+ + +]
Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Date:   Tue Sep 2 15:15:46 2025 +0300

    usb: vhci-hcd: Prevent suspending virtually attached devices
    
    [ Upstream commit e40b984b6c4ce3f80814f39f86f87b2a48f2e662 ]
    
    The VHCI platform driver aims to forbid entering system suspend when at
    least one of the virtual USB ports are bound to an active USB/IP
    connection.
    
    However, in some cases, the detection logic doesn't work reliably, i.e.
    when all devices attached to the virtual root hub have been already
    suspended, leading to a broken suspend state, with unrecoverable resume.
    
    Ensure the virtually attached devices do not enter suspend by setting
    the syscore PM flag.  Note this is currently limited to the client side
    only, since the server side doesn't implement system suspend prevention.
    
    Fixes: 04679b3489e0 ("Staging: USB/IP: add client driver")
    Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
    Acked-by: Shuah Khan <skhan@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20250902-vhci-hcd-suspend-fix-v3-1-864e4e833559@collabora.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
vfio/pds: replace bitmap_free with vfree [+ + +]
Author: Zilin Guan <zilin@seu.edu.cn>
Date:   Sat Sep 13 15:31:54 2025 +0000

    vfio/pds: replace bitmap_free with vfree
    
    [ Upstream commit acb59a4bb8ed34e738a4c3463127bf3f6b5e11a9 ]
    
    host_seq_bmp is allocated with vzalloc but is currently freed with
    bitmap_free, which uses kfree internally. This mismach prevents the
    resource from being released properly and may result in memory leaks
    or other issues.
    
    Fix this by freeing host_seq_bmp with vfree to match the vzalloc
    allocation.
    
    Fixes: f232836a9152 ("vfio/pds: Add support for dirty page tracking")
    Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
    Reviewed-by: Brett Creeley <brett.creeley@amd.com>
    Link: https://lore.kernel.org/r/20250913153154.1028835-1-zilin@seu.edu.cn
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
vhost: vringh: Fix copy_to_iter return value check [+ + +]
Author: Michael S. Tsirkin <mst@redhat.com>
Date:   Thu Sep 25 02:04:08 2025 -0400

    vhost: vringh: Fix copy_to_iter return value check
    
    [ Upstream commit 439263376c2c4e126cac0d07e4987568de4eaba5 ]
    
    The return value of copy_to_iter can't be negative, check whether the
    copied length is equal to the requested length instead of checking for
    negative values.
    
    Cc: zhang jiao <zhangjiao2@cmss.chinamobile.com>
    Link: https://lore.kernel.org/all/20250910091739.2999-1-zhangjiao2@cmss.chinamobile.com
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Fixes: 309bba39c945 ("vringh: iterate on iotlb_translate to handle large translations")
    Link: https://patch.msgid.link/cd637504a6e3967954a9e80fc1b75e8c0978087b.1758723310.git.mst@redhat.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

vhost: vringh: Modify the return value check [+ + +]
Author: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Date:   Wed Sep 10 17:17:38 2025 +0800

    vhost: vringh: Modify the return value check
    
    [ Upstream commit 82a8d0fda55b35361ee7f35b54fa2b66d7847d2b ]
    
    The return value of copy_from_iter and copy_to_iter can't be negative,
    check whether the copied lengths are equal.
    
    Fixes: 309bba39c945 ("vringh: iterate on iotlb_translate to handle large translations")
    Cc: "Stefano Garzarella" <sgarzare@redhat.com>
    Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
    Message-Id: <20250910091739.2999-1-zhangjiao2@cmss.chinamobile.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
watchdog: mpc8xxx_wdt: Reload the watchdog timer when enabling the watchdog [+ + +]
Author: Christophe Leroy <christophe.leroy@csgroup.eu>
Date:   Tue Aug 12 14:51:26 2025 +0200

    watchdog: mpc8xxx_wdt: Reload the watchdog timer when enabling the watchdog
    
    [ Upstream commit 7dfd80f70ef00d871df5af7c391133f7ba61ad9b ]
    
    When the watchdog gets enabled with this driver, it leaves enough time
    for the core watchdog subsystem to start pinging it. But when the
    watchdog is already started by hardware or by the boot loader, little
    time remains before it fires and it happens that the core watchdog
    subsystem doesn't have time to start pinging it.
    
    Until commit 19ce9490aa84 ("watchdog: mpc8xxx: use the core worker
    function") pinging was managed by the driver itself and the watchdog
    was immediately pinged by setting the timer expiry to 0.
    
    So restore similar behaviour by pinging it when enabling it so that
    if it was already enabled the watchdog timer counter is reloaded.
    
    Fixes: 19ce9490aa84 ("watchdog: mpc8xxx: use the core worker function")
    Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
    Reviewed-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
wifi: ath10k: avoid unnecessary wait for service ready message [+ + +]
Author: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Date:   Mon Aug 11 17:26:45 2025 +0800

    wifi: ath10k: avoid unnecessary wait for service ready message
    
    [ Upstream commit 51a73f1b2e56b0324b4a3bb8cebc4221b5be4c7a ]
    
    Commit e57b7d62a1b2 ("wifi: ath10k: poll service ready message before
    failing") works around the failure in waiting for the service ready
    message by active polling. Note the polling is triggered after initial
    wait timeout, which means that the wait-till-timeout can not be avoided
    even the message is ready.
    
    A possible fix is to do polling once before wait as well, however this
    can not handle the race that the message arrives right after polling.
    So the solution is to do periodic polling until timeout.
    
    Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00309-QCARMSWPZ-1
    
    Fixes: e57b7d62a1b2 ("wifi: ath10k: poll service ready message before failing")
    Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
    Closes: https://lore.kernel.org/all/97a15967-5518-4731-a8ff-d43ff7f437b0@molgen.mpg.de
    Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
    Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
    Link: https://patch.msgid.link/20250811-ath10k-avoid-unnecessary-wait-v1-1-db2deb87c39b@oss.qualcomm.com
    Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

wifi: mac80211: fix Rx packet handling when pubsta information is not available [+ + +]
Author: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Date:   Wed Sep 17 12:42:03 2025 +0530

    wifi: mac80211: fix Rx packet handling when pubsta information is not available
    
    [ Upstream commit 32d340ae675800672e1219444a17940a8efe5cca ]
    
    In ieee80211_rx_handle_packet(), if the caller does not provide pubsta
    information, an attempt is made to find the station using the address 2
    (source address) field in the header. Since pubsta is missing, link
    information such as link_valid and link_id is also unavailable. Now if such
    a situation comes, and if a matching ML station entry is found based on
    the source address, currently the packet is dropped due to missing link ID
    in the status field which is not correct.
    
    Hence, to fix this issue, if link_valid is not set and the station is an
    ML station, make an attempt to find a link station entry using the source
    address. If a valid link station is found, derive the link ID and proceed
    with packet processing. Otherwise, drop the packet as per the existing
    flow.
    
    Fixes: ea9d807b5642 ("wifi: mac80211: add link information in ieee80211_rx_status")
    Suggested-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
    Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
    Link: https://patch.msgid.link/20250917-fix_data_packet_rx_with_mlo_and_no_pubsta-v1-1-8cf971a958ac@oss.qualcomm.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

wifi: mt76: fix potential memory leak in mt76_wmac_probe() [+ + +]
Author: Abdun Nihaal <abdun.nihaal@gmail.com>
Date:   Wed Jul 9 20:25:30 2025 +0530

    wifi: mt76: fix potential memory leak in mt76_wmac_probe()
    
    [ Upstream commit 42754b7de2b1a2cf116c5e3f1e8e78392f4ed700 ]
    
    In mt76_wmac_probe(), when the mt76_alloc_device() call succeeds, memory
    is allocated for both struct ieee80211_hw and a workqueue. However, on
    the error path, the workqueue is not freed. Fix that by calling
    mt76_free_device() on the error path.
    
    Fixes: c8846e101502 ("mt76: add driver for MT7603E and MT7628/7688")
    Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
    Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
    Link: https://patch.msgid.link/20250709145532.41246-1-abdun.nihaal@gmail.com
    Signed-off-by: Felix Fietkau <nbd@nbd.name>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

wifi: mwifiex: send world regulatory domain to driver [+ + +]
Author: Stefan Kerkmann <s.kerkmann@pengutronix.de>
Date:   Mon Aug 4 16:16:59 2025 +0200

    wifi: mwifiex: send world regulatory domain to driver
    
    [ Upstream commit 56819d00bc2ebaa6308913c28680da5d896852b8 ]
    
    The world regulatory domain is a restrictive subset of channel
    configurations which allows legal operation of the adapter all over the
    world. Changing to this domain should not be prevented.
    
    Fixes: dd4a9ac05c8e1 ("mwifiex: send regulatory domain info to firmware only if alpha2 changed") changed
    Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de>
    Reviewed-by: Jeff Chen <jeff.chen_1@nxp.con>
    Link: https://patch.msgid.link/20250804-fix-mwifiex-regulatory-domain-v1-1-e4715c770c4d@pengutronix.de
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

wifi: rtw89: avoid circular locking dependency in ser_state_run() [+ + +]
Author: Fedor Pchelkin <pchelkin@ispras.ru>
Date:   Sat Sep 20 00:08:50 2025 +0300

    wifi: rtw89: avoid circular locking dependency in ser_state_run()
    
    [ Upstream commit 570f94511766f9236d3462dfb8a3c719c2b54c23 ]
    
    Lockdep gives a splat [1] when ser_hdl_work item is executed.  It is
    scheduled at mac80211 workqueue via ieee80211_queue_work() and takes a
    wiphy lock inside.  However, this workqueue can be flushed when e.g.
    closing the interface and wiphy lock is already taken in that case.
    
    Choosing wiphy_work_queue() for SER is likely not suitable.  Back on to
    the global workqueue.
    
    [1]:
    
     WARNING: possible circular locking dependency detected
     6.17.0-rc2 #17 Not tainted
     ------------------------------------------------------
     kworker/u32:1/61 is trying to acquire lock:
     ffff88811bc00768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: ser_state_run+0x5e/0x180 [rtw89_core]
    
     but task is already holding lock:
     ffffc9000048fd30 ((work_completion)(&ser->ser_hdl_work)){+.+.}-{0:0}, at: process_one_work+0x7b5/0x1450
    
     which lock already depends on the new lock.
    
     the existing dependency chain (in reverse order) is:
    
     -> #2 ((work_completion)(&ser->ser_hdl_work)){+.+.}-{0:0}:
            process_one_work+0x7c6/0x1450
            worker_thread+0x49e/0xd00
            kthread+0x313/0x640
            ret_from_fork+0x221/0x300
            ret_from_fork_asm+0x1a/0x30
    
     -> #1 ((wq_completion)phy0){+.+.}-{0:0}:
            touch_wq_lockdep_map+0x8e/0x180
            __flush_workqueue+0x129/0x10d0
            ieee80211_stop_device+0xa8/0x110
            ieee80211_do_stop+0x14ce/0x2880
            ieee80211_stop+0x13a/0x2c0
            __dev_close_many+0x18f/0x510
            __dev_change_flags+0x25f/0x670
            netif_change_flags+0x7b/0x160
            do_setlink.isra.0+0x1640/0x35d0
            rtnl_newlink+0xd8c/0x1d30
            rtnetlink_rcv_msg+0x700/0xb80
            netlink_rcv_skb+0x11d/0x350
            netlink_unicast+0x49a/0x7a0
            netlink_sendmsg+0x759/0xc20
            ____sys_sendmsg+0x812/0xa00
            ___sys_sendmsg+0xf7/0x180
            __sys_sendmsg+0x11f/0x1b0
            do_syscall_64+0xbb/0x360
            entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
     -> #0 (&rdev->wiphy.mtx){+.+.}-{4:4}:
            __lock_acquire+0x124c/0x1d20
            lock_acquire+0x154/0x2e0
            __mutex_lock+0x17b/0x12f0
            ser_state_run+0x5e/0x180 [rtw89_core]
            rtw89_ser_hdl_work+0x119/0x220 [rtw89_core]
            process_one_work+0x82d/0x1450
            worker_thread+0x49e/0xd00
            kthread+0x313/0x640
            ret_from_fork+0x221/0x300
            ret_from_fork_asm+0x1a/0x30
    
     other info that might help us debug this:
    
     Chain exists of:
       &rdev->wiphy.mtx --> (wq_completion)phy0 --> (work_completion)(&ser->ser_hdl_work)
    
      Possible unsafe locking scenario:
    
            CPU0                    CPU1
            ----                    ----
       lock((work_completion)(&ser->ser_hdl_work));
                                    lock((wq_completion)phy0);
                                    lock((work_completion)(&ser->ser_hdl_work));
       lock(&rdev->wiphy.mtx);
    
      *** DEADLOCK ***
    
     2 locks held by kworker/u32:1/61:
      #0: ffff888103835148 ((wq_completion)phy0){+.+.}-{0:0}, at: process_one_work+0xefa/0x1450
      #1: ffffc9000048fd30 ((work_completion)(&ser->ser_hdl_work)){+.+.}-{0:0}, at: process_one_work+0x7b5/0x1450
    
     stack backtrace:
     CPU: 0 UID: 0 PID: 61 Comm: kworker/u32:1 Not tainted 6.17.0-rc2 #17 PREEMPT(voluntary)
     Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS edk2-20250523-14.fc42 05/23/2025
     Workqueue: phy0 rtw89_ser_hdl_work [rtw89_core]
     Call Trace:
      <TASK>
      dump_stack_lvl+0x5d/0x80
      print_circular_bug.cold+0x178/0x1be
      check_noncircular+0x14c/0x170
      __lock_acquire+0x124c/0x1d20
      lock_acquire+0x154/0x2e0
      __mutex_lock+0x17b/0x12f0
      ser_state_run+0x5e/0x180 [rtw89_core]
      rtw89_ser_hdl_work+0x119/0x220 [rtw89_core]
      process_one_work+0x82d/0x1450
      worker_thread+0x49e/0xd00
      kthread+0x313/0x640
      ret_from_fork+0x221/0x300
      ret_from_fork_asm+0x1a/0x30
      </TASK>
    
    Found by Linux Verification Center (linuxtesting.org).
    
    Fixes: ebfc9199df05 ("wifi: rtw89: add wiphy_lock() to work that isn't held wiphy_lock() yet")
    Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
    Acked-by: Ping-Ke Shih <pkshih@realtek.com>
    Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
    Link: https://patch.msgid.link/20250919210852.823912-5-pchelkin@ispras.ru
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
x86/vdso: Fix output operand size of RDPID [+ + +]
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Mon Jun 16 11:52:57 2025 +0200

    x86/vdso: Fix output operand size of RDPID
    
    [ Upstream commit ac9c408ed19d535289ca59200dd6a44a6a2d6036 ]
    
    RDPID instruction outputs to a word-sized register (64-bit on x86_64 and
    32-bit on x86_32). Use an unsigned long variable to store the correct size.
    
    LSL outputs to 32-bit register, use %k operand prefix to always print the
    32-bit name of the register.
    
    Use RDPID insn mnemonic while at it as the minimum binutils version of
    2.30 supports it.
    
      [ bp: Merge two patches touching the same function into a single one. ]
    
    Fixes: ffebbaedc861 ("x86/vdso: Introduce helper functions for CPU and node number")
    Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Link: https://lore.kernel.org/20250616095315.230620-1-ubizjak@gmail.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>