]> git.hungrycats.org Git - linux/log
linux
5 weeks agoASoC: meson: aiu: make aiu_formatter_i2s_drv static
Jerome Brunet [Wed, 12 Aug 2026 20:50:34 +0000 (22:50 +0200)]
ASoC: meson: aiu: make aiu_formatter_i2s_drv static

aiu_formatter_i2s_drv is indeed used only in the aiu and it is not meant
to be exported. It should be static.

Cc: Valerio Setti <vsetti@baylibre.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202608080634.hf6aJGPB-lkp@intel.com/
Fixes: 83b83024cdbf ("ASoC: meson: aiu: use aiu-formatter-i2s to format I2S output data")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Valerio Setti <vsetti@baylibre.com>
Link: https://patch.msgid.link/20260812-aiu-formatter-static-v1-1-67936d57ba05@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: spacemit: advertise only DMA-backed DAI streams
bui duc phuc [Wed, 5 Aug 2026 06:43:48 +0000 (13:43 +0700)]
ASoC: spacemit: advertise only DMA-backed DAI streams

The static DAI template initializes both playback and capture stream
capabilities before dma-names is examined. As a result,
snd_soc_dai_stream_valid() considers both directions valid even when the
device only provides a single DMA channel.

Move the playback and capture capability initialization into
spacemit_i2s_init_dai(), where it is performed only for the stream
directions backed by a corresponding DMA channel. This preserves the
existing capabilities for devices with both "tx" and "rx" DMA channels,
while preventing unsupported stream directions from being advertised.

Initialize rate_min and rate_max together with the other stream
capabilities to preserve the existing rate constraints.

Fixes: fce217449075 ("ASoC: spacemit: add i2s support for K1 SoC")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260805064348.44283-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: mxs: Improve probe error handling
Mark Brown [Wed, 12 Aug 2026 17:37:48 +0000 (18:37 +0100)]
ASoC: mxs: Improve probe error handling

bui duc phuc <phucduc.bui@gmail.com> says:

This series improves probe error handling in the MXS ASoC drivers.
Use dev_err_probe() where appropriate and remove redundant dev_err() calls
when the corresponding errors are already reported by the called functions
or further down the call chain.

Compile-tested only.

Link: https://patch.msgid.link/20260812101418.37966-1-phucduc.bui@gmail.com
5 weeks agoASoC: mxs-sgtl5000: Drop redundant probe error messages
bui duc phuc [Wed, 12 Aug 2026 10:14:18 +0000 (17:14 +0700)]
ASoC: mxs-sgtl5000: Drop redundant probe error messages

Remove the probe error messages to avoid duplicate error reporting,
since the error is already reported by the called functions.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260812101418.37966-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: mxs-saif: Drop redundant probe error messages
bui duc phuc [Wed, 12 Aug 2026 10:14:17 +0000 (17:14 +0700)]
ASoC: mxs-saif: Drop redundant probe error messages

The functions called here don't log the error themselves, but the
error is already reported deeper in the call chain, so the dev_err()
calls are redundant and can be removed.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260812101418.37966-3-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: mxs-saif: Use dev_err_probe() for error handling
bui duc phuc [Wed, 12 Aug 2026 10:14:16 +0000 (17:14 +0700)]
ASoC: mxs-saif: Use dev_err_probe() for error handling

Replace dev_err() with dev_err_probe() to prevent log spam when probe
returns -EPROBE_DEFER.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260812101418.37966-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: pxa: Drop redundant probe error messages
bui duc phuc [Wed, 12 Aug 2026 08:43:11 +0000 (15:43 +0700)]
ASoC: pxa: Drop redundant probe error messages

devm_platform_ioremap_resource() does not report the error itself,
but the error is already reported deeper in the call chain,
so the dev_err() calls are redundant and can be removed.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260812084311.29188-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: samsung: i2s: drop secondary DAI for i2sv7 hardware variant
Marek Szyprowski [Wed, 12 Aug 2026 07:44:37 +0000 (09:44 +0200)]
ASoC: samsung: i2s: drop secondary DAI for i2sv7 hardware variant

Commit 9167f260477b ("ASoC: soc-generic-dmaengine: Handle DMA channel
request failures correctly") started reporting DMA channel request
failures during probe instead of silently ignoring them. This exposed a
bug in the Samsung I2S driver: it always registered a second DAI and its
associated "tx-sec" DMA channel, even for hardware variants that don't
actually support it, such as i2sv7 used on Exynos5433. As a result,
sound card probing on Exynos5433-based boards started failing, whereas
previously it worked only because the channel request failure was
ignored.

Drop the QUIRK_SEC_DAI flag from i2sv7, since this variant does not have
a secondary DAI and register "Secondary Playback" DAPM route only for
variants with such interface.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://patch.msgid.link/20260812074438.3225001-1-m.szyprowski@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: mediatek: mt8365: use devm_platform_ioremap_resource helpers
Rosen Penev [Tue, 11 Aug 2026 04:24:24 +0000 (21:24 -0700)]
ASoC: mediatek: mt8365: use devm_platform_ioremap_resource helpers

Simplify the probe function by using devm_platform_ioremap_resource()
for the base address and devm_platform_get_and_ioremap_resource() for
the SRAM, dropping the manual platform_get_resource() calls.

Assisted-by: opencode:deepseek-v4-flash-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260811042424.66882-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: es8316: Add regulator support
Mark Brown [Wed, 12 Aug 2026 10:48:41 +0000 (11:48 +0100)]
ASoC: es8316: Add regulator support

Hongyang Zhao <hongyang.zhao@thundersoft.com> says:

Add regulator support for the four ES8316 power domains so board
descriptions can model and control the codec supplies.

The binding patch documents AVDD, CPVDD, DVDD and PVDD as optional
supplies for ES8316, preserving compatibility with existing device-tree
descriptions. The driver patch enables the supplies before initializing
the regmap and keeps them enabled for the lifetime of the I2C device.

The missing supply model was identified while reviewing the RubikPi 3
audio support:
https://lore.kernel.org/linux-arm-msm/c293d9c7-bdb7-4303-80c8-404228c434d7@oss.qualcomm.com/

Link: https://patch.msgid.link/20260812-es8316-regulator-next-20260722-v2-0-e7078bc9bc9c@thundersoft.com
5 weeks agoASoC: codecs: es8316: Add regulator support
Hongyang Zhao [Wed, 12 Aug 2026 09:35:44 +0000 (17:35 +0800)]
ASoC: codecs: es8316: Add regulator support

ES8316 has separate AVDD, CPVDD, DVDD and PVDD supply inputs.

Request and enable the supplies during I2C probe, before initializing
the regmap. Keep them enabled for the lifetime of the I2C device so the
regmap cannot access an unpowered device and its cache remains
synchronized if the ASoC component is unbound and rebound.

Signed-off-by: Hongyang Zhao <hongyang.zhao@thundersoft.com>
Link: https://patch.msgid.link/20260812-es8316-regulator-next-20260722-v2-2-e7078bc9bc9c@thundersoft.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: dt-bindings: es8316: Add regulator supplies
Hongyang Zhao [Wed, 12 Aug 2026 09:35:43 +0000 (17:35 +0800)]
ASoC: dt-bindings: es8316: Add regulator supplies

The ES8316 has separate AVDD, CPVDD, DVDD and PVDD supply inputs for
its analog, charge pump, digital core and digital I/O domains. Describe
all four inputs so boards can model the codec power topology.

The binding also covers ES8311 and ES8323, whose supply inputs differ,
so restrict these properties to the ES8316 compatible. Keep them
optional for compatibility with existing descriptions.

Signed-off-by: Hongyang Zhao <hongyang.zhao@thundersoft.com>
Link: https://patch.msgid.link/20260812-es8316-regulator-next-20260722-v2-1-e7078bc9bc9c@thundersoft.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: xilinx: formatter_pcm: fix stream_data leak on open error
Rosen Penev [Tue, 11 Aug 2026 18:51:40 +0000 (11:51 -0700)]
ASoC: xilinx: formatter_pcm: fix stream_data leak on open error

In xlnx_formatter_pcm_open(), stream_data is allocated and
adata->play_stream or adata->capture_stream is assigned early.  If a
later step, such as snd_pcm_hw_constraint_step() or
snd_pcm_hw_constraint_integer(), fails, the function returns the error
immediately.  ALSA does not call the close callback when open fails, so
stream_data is leaked and the stream pointer is left dangling, pointing
to a substream that ALSA frees.  A later interrupt would then call
snd_pcm_period_elapsed() on the freed substream.

Free stream_data and clear the stream pointer on the error paths.

Fixes: 6f6c3c36f091 ("ASoC: xlnx: add pcm formatter platform driver")
Assisted-by: opencode:deepseek-v4-flash-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/20260811185140.27149-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: amd: enable audio on HP OmniBook X Flip 14
Mark Brown [Tue, 11 Aug 2026 21:12:13 +0000 (22:12 +0100)]
ASoC: amd: enable audio on HP OmniBook X Flip 14

Ville Saarinen <wiza@saarinenkoti.fi> says:

The HP OmniBook X Flip 14-kc0xxx (board 8EA1, Strix Point, ACP 7.2) has no
usable audio on mainline at all. Its BIOS reports an ACP configuration flag
of FLAG_AMD_LEGACY_ONLY_DMIC, which binds the legacy ACP driver and
registers a PDM-only card, so the SoundWire links are never scanned. The
two TAS2783 speaker amplifiers on link 0 and the RT712-VB jack codec on
link 1 never enumerate, and the machine has no playback path whatsoever.

Patch 1 adds a DMI quirk overriding the flag so snd_pci_ps probes. Patch 2
adds the machine entry describing the link topology.

With both applied the card comes up and every path on the machine works:
internal speakers, headphone jack with detection, headset microphone and
the internal DMIC array. Two further patches are needed for the speakers
to render stereo rather than mono, and to survive a system resume; those
are in the TAS2783 codec driver and are being sent separately to the TI
maintainers, since they have no build dependency on this pair.

Related reports for the same root cause on other machines:

  - kernel bugzilla #221226 (ASUS Zenbook S16)
  - CachyOS linux-cachyos#820 (HP OmniBook X Flip 16, board 8EA2 -- the
    sibling board, which would need its own entry; I have no access to
    one and have not added it)

Tested on the affected machine only. I do not have any other ACP 7.2
board, so the gating on patch 2 is written to be conservative rather than
broad.

Testing
=======

The hardware testing was done on v7.1.6, where an equivalent version of
this pair is what makes audio work on the machine. Against the master
commit named below, both patches have been compile-tested only (gcc, W=1,
no new warnings, no new external symbol references).

Patch 2 has been reworked slightly relative to the tested build: the
RT712-VB entry now reuses the existing jack_dmic_endpoints array, which
already describes exactly the AIF1 jack + AIF3 DMIC pairing this board
needs, instead of adding a second identical copy of it. That was a
mechanical substitution, but it has not been through hardware.

Tool disclosure, per Documentation/process/generated-content.rst
================================================================

This work was done in extended interactive sessions with Claude (Anthropic,
model claude-opus-5) acting as a coding and debugging assistant, and a
substantial amount of the analysis and of the patch text originated with
it. Both patches carry an Assisted-by tag as described in
Documentation/process/coding-assistants.rst.

The division of work:

  - The assistant read the DMI data and ACP configuration flag off the
    running machine, identified the flag override as the fix, derived the
    SoundWire topology from the enumerated peripherals, and drafted both
    patches and both changelogs.
  - I ran everything that needed root or physical access, rebooted into
    each build, and did the listening tests. The left/right ordering in
    patch 2 is set by the order of the two amplifier entries; the first
    version had the sides reversed and that was caught by ear, not by the
    assistant.
  - No single prompt generated these patches. The session was iterative
    over roughly a day: inspect state, form a hypothesis, build, reboot,
    measure, discard the hypothesis if the measurement disagreed. Several
    confident intermediate conclusions were wrong and were only caught by
    measurement.

I have reviewed both patches, I understand what they do, and I take
responsibility for them.

Link: https://patch.msgid.link/20260809101439.4798-1-wiza@saarinenkoti.fi
5 weeks agoASoC: amd: acp70: add HP OmniBook X Flip 14 SoundWire machine
Ville Saarinen [Sun, 9 Aug 2026 10:15:09 +0000 (10:15 +0000)]
ASoC: amd: acp70: add HP OmniBook X Flip 14 SoundWire machine

Describe the SoundWire topology of the HP OmniBook X Flip 14-kc0xxx
(board 8EA1): two TAS2783 smart amplifiers aggregated on link 0 (unique
IDs 0xC and 0x9, group_position 0 and 1, name prefixes tas2783-1 and
tas2783-2) driving the left and right internal speakers, and an RT712-VB
on link 1 providing the headset jack on AIF1 and the internal DMIC array
on AIF3. The RT712 amplifier path (AIF2) is left unused because the
speakers are driven by the external TAS2783 pair, so the existing
jack_dmic_endpoints array describes it exactly.

The entry is gated on snd_soc_acpi_amd_sdca_is_device_rt712_vb() so it
does not capture a board carrying a different link 1 codec.

Developed with AI assistance. The assistant derived the link topology
from the enumerated peripherals and drafted the table entry. The order
of the two amplifier entries, which is what assigns the physical sides,
was corrected after a listening test by the submitter.

All hardware measurements quoted above were run by the submitter on the
affected machine. The submitter has reviewed the change, understands it
and takes responsibility for it.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Ville Saarinen <wiza@saarinenkoti.fi>
Link: https://patch.msgid.link/20260809101439.4798-3-wiza@saarinenkoti.fi
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: amd: acp-config: force SoundWire probe on HP OmniBook X Flip 14
Ville Saarinen [Sun, 9 Aug 2026 10:15:04 +0000 (10:15 +0000)]
ASoC: amd: acp-config: force SoundWire probe on HP OmniBook X Flip 14

The BIOS on the HP OmniBook X Flip 14-kc0xxx (board 8EA1, Strix Point,
ACP 7.2) reports acp-audio-config-flag = FLAG_AMD_LEGACY_ONLY_DMIC. That
binds the legacy ACP driver and registers a PDM-only card, so the
SoundWire links are never scanned: the two TAS2783 speaker amplifiers on
link 0 and the RT712-VB jack codec on link 1 do not enumerate and the
machine ends up with no usable playback path at all.

Add a DMI entry for the board so the flag is overridden to 0 and
snd_pci_ps probes instead.

Developed with AI assistance. The assistant read the board's ACP
configuration flag out of the running system, identified the flag
override as the fix and drafted the DMI entry.

All hardware measurements quoted above were run by the submitter on the
affected machine. The submitter has reviewed the change, understands it
and takes responsibility for it.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Ville Saarinen <wiza@saarinenkoti.fi>
Link: https://patch.msgid.link/20260809101439.4798-2-wiza@saarinenkoti.fi
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: dt-bindings: qcom,sm8250: Add Maili sound card
Mark Brown [Tue, 11 Aug 2026 21:10:21 +0000 (22:10 +0100)]
ASoC: dt-bindings: qcom,sm8250: Add Maili sound card

Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com> says:

This series add support for sound card on Qualcomm Maili boards.

Link: https://patch.msgid.link/20260811084605.1820056-1-prasad.kumpatla@oss.qualcomm.com
5 weeks agoASoC: qcom: sc8280xp: Add Maili sound card support
Prasad Kumpatla [Tue, 11 Aug 2026 08:46:05 +0000 (14:16 +0530)]
ASoC: qcom: sc8280xp: Add Maili sound card support

Add the Maili sound card compatible. Maili can reuse the Hawi sound card
data.

Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260811084605.1820056-3-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: dt-bindings: qcom,sm8250: Add Maili sound card
Prasad Kumpatla [Tue, 11 Aug 2026 08:46:04 +0000 (14:16 +0530)]
ASoC: dt-bindings: qcom,sm8250: Add Maili sound card

Add the Maili sound card compatible to the SM8450-family sound card
bindings.

Signed-off-by: Prasad Kumpatla <prasad.kumpatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260811084605.1820056-2-prasad.kumpatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: fsl-asoc-card: defer probe when the CPU DAI device is not ready
LiangCheng Wang [Wed, 5 Aug 2026 07:55:43 +0000 (15:55 +0800)]
ASoC: fsl-asoc-card: defer probe when the CPU DAI device is not ready

fsl_asoc_card_probe() hard-fails with -EINVAL when the CPU DAI (SAI)
platform device is not found. Like the codec, the CPU DAI may just be
probed later than the machine driver; the order is not guaranteed and
varies across kernel versions, so a permanent -EINVAL leaves the card
unregistered with no analog playback or capture.

Defer probe instead, mirroring commit e396dec46c56 ("ASoC:
fsl-asoc-card: Defer probe when fail to find codec device").

Tested on i.MX8MP with an ALC5672 on SAI3: the card that failed to
register on v6.18 now comes up during boot.

Fixes: 708b4351f08c ("ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support")
Signed-off-by: LiangCheng Wang <zaq14760@gmail.com>
Link: https://patch.msgid.link/20260805-fsl-asoc-defer-cpu-dai-v1-1-43f7f538e384@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: pxa: Use devm_clk_get_optional() for extclk clock
bui duc phuc [Tue, 11 Aug 2026 10:09:49 +0000 (17:09 +0700)]
ASoC: pxa: Use devm_clk_get_optional() for extclk clock

The Device Tree binding defines the extclk clock as an optional
property, but the driver currently uses devm_clk_get() and manually
handles the absence of the clock.

Use devm_clk_get_optional() to match the binding and simplify the
optional clock handling. This also propagates errors other than the
absence of the optional clock, including -EPROBE_DEFER.

This changes the existing behavior for errors other than
-EPROBE_DEFER. RFC to discuss whether these errors should cause probe
to fail rather than being treated as an unavailable optional clock.

Fixes: 90eb6b59d311 ("ASoC: pxa-ssp: add support for an external clock in devicetree")
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260811100949.61142-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: qcom: q6apm: keep the graph start count in sync with the DSP
Jorijn van der Graaf [Sun, 26 Jul 2026 21:12:26 +0000 (23:12 +0200)]
ASoC: qcom: q6apm: keep the graph start count in sync with the DSP

q6apm_graph_start() increments start_count even when APM_CMD_GRAPH_START
fails, leaving the graph counted as running while the DSP never started
it. A later start - a retried prepare, or a resume after a failed start -
then finds a non-zero count, skips the command and returns success with
no data flowing.

Count the graph only once the DSP has accepted the start. The count then
stays at zero for a graph that never started, so also stop decrementing
below zero in q6apm_graph_stop(): the compressed free path stops
unconditionally, and a negative count would make the next start skip the
command in the same way.

Fixes: 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support")
Assisted-by: Claude:claude-opus-5
Signed-off-by: Jorijn van der Graaf <jorijnvdgraaf@catcrafts.net>
Link: https://patch.msgid.link/20260726211226.94059-1-jorijnvdgraaf@catcrafts.net
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: ti: omap-twl4030: Check for missing card name after parsing
bui duc phuc [Wed, 5 Aug 2026 04:45:56 +0000 (11:45 +0700)]
ASoC: ti: omap-twl4030: Check for missing card name after parsing

Return any error from snd_soc_of_parse_card_name() directly. If the
helper returns successfully but card->name remains unset, report the
missing card name explicitly before returning -ENODEV.

Suggested-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260805044556.38183-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: Intel: KMB: Propagate -EPROBE_DEFER from IRQ lookup
bui duc phuc [Thu, 6 Aug 2026 05:59:37 +0000 (12:59 +0700)]
ASoC: Intel: KMB: Propagate -EPROBE_DEFER from IRQ lookup

Return -EPROBE_DEFER from platform_get_irq_optional() so the driver is
re-probed when the interrupt resource becomes available instead of
continuing probe without an IRQ.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260806055937.24600-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: tas2781: Fix compiling warning for tasdevice_set_capture_profile_id()
Shenghao Ding [Tue, 11 Aug 2026 12:14:46 +0000 (20:14 +0800)]
ASoC: tas2781: Fix compiling warning for tasdevice_set_capture_profile_id()

Correct the mismatched function description, parameter names and return
value documentation in the comment block. No functional code change, only
comment and documentation update.

Fixes: 431c15610d01 ("ASoC: tas2781: add capture_profile_id field and update the tuning_switch function")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20260811121446.1805-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: dwc: Propagate -EPROBE_DEFER from IRQ lookup
bui duc phuc [Thu, 6 Aug 2026 06:10:45 +0000 (13:10 +0700)]
ASoC: dwc: Propagate -EPROBE_DEFER from IRQ lookup

platform_get_irq_optional() never returns 0. It returns a positive IRQ
number on success or a negative error code on failure.

Return -EPROBE_DEFER from platform_get_irq_optional() so the driver is
re-probed when the interrupt resource becomes available instead of
continuing probe without an IRQ.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260806061046.25323-1-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: Use auto-cleanup for firmware loading
Mark Brown [Mon, 10 Aug 2026 14:34:19 +0000 (15:34 +0100)]
ASoC: Use auto-cleanup for firmware loading

Takashi Iwai <tiwai@suse.de> says:

here is a revised series of trivial patches to use the auto-cleanup
(via __free(firmware)) for firmware management.
Now compile warnings due to the mixture with goto have been addressed
for rt1320-sdw and wm2000 drivers.  Others remain identical, just took
a few review Acks.

Link: https://patch.msgid.link/20260806140006.1412298-1-tiwai@suse.de
6 weeks agoASoC: SOF: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 14:00:03 +0000 (16:00 +0200)]
ASoC: SOF: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
and __free(kfree) auto-cleanups for the firmware data and the temporary
string or array.

Only the code refactoring, no functional changes.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Cc: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-32-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SDCA: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 14:00:02 +0000 (16:00 +0200)]
ASoC: SDCA: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Maciej Strozek <mstrozek@opensource.cirrus.com>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-31-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: renesas: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 14:00:01 +0000 (16:00 +0200)]
ASoC: renesas: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-30-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: qcom: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 14:00:00 +0000 (16:00 +0200)]
ASoC: qcom: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Srinivas Kandagatla <srini@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-29-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: Intel: catpt: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:59 +0000 (15:59 +0200)]
ASoC: Intel: catpt: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-28-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: Intel: avs: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:58 +0000 (15:59 +0200)]
ASoC: Intel: avs: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-27-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: fsl: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:57 +0000 (15:59 +0200)]
ASoC: fsl: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Shengjiu Wang <shengjiu.wang@gmail.com>
Cc: Xiubo Li <Xiubo.Lee@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-26-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: zl38060: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:56 +0000 (15:59 +0200)]
ASoC: zl38060: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-25-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: wm2000: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:55 +0000 (15:59 +0200)]
ASoC: wm2000: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-24-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: wm0010: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:54 +0000 (15:59 +0200)]
ASoC: wm0010: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-23-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: tlv320aic31xx: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:53 +0000 (15:59 +0200)]
ASoC: tlv320aic31xx: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Shenghao Ding <shenghao-ding@ti.com>
Cc: Kevin Lu <kevin-lu@ti.com>
Cc: Baojun Xu <baojun.xu@ti.com>
Cc: Sen Wang <sen@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-22-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: tas5805m: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:52 +0000 (15:59 +0200)]
ASoC: tas5805m: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-21-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: tas2781: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:51 +0000 (15:59 +0200)]
ASoC: tas2781: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Shenghao Ding <shenghao-ding@ti.com>
Cc: Kevin Lu <kevin-lu@ti.com>
Cc: Baojun Xu <baojun.xu@ti.com>
Cc: Sen Wang <sen@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-20-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: sma1307: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:50 +0000 (15:59 +0200)]
ASoC: sma1307: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Kiseok Jo <kiseok.jo@irondevice.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-19-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: sigmadsp: se auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:49 +0000 (15:59 +0200)]
ASoC: sigmadsp: se auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Nuno Sá <nuno.sa@analog.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-18-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: rt722-sdca: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:48 +0000 (15:59 +0200)]
ASoC: rt722-sdca: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup, as well as the firmware file name being released with
__free(kfree).

Only the code refactoring, no functional changes.

Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-17-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: rt5677: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:47 +0000 (15:59 +0200)]
ASoC: rt5677: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-16-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: rt5575: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:46 +0000 (15:59 +0200)]
ASoC: rt5575: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-15-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: rt1320-sdw: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:45 +0000 (15:59 +0200)]
ASoC: rt1320-sdw: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-14-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: peb2466: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:44 +0000 (15:59 +0200)]
ASoC: peb2466: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Reviewed-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-13-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: pcm6240: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:43 +0000 (15:59 +0200)]
ASoC: pcm6240: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Since the firmware release is cleaned up automatically, we can convert
the mutex call with guard() gracefully, too.

Only the code refactoring, no functional changes.

Reviewed-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-12-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: ntpfw: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:42 +0000 (15:59 +0200)]
ASoC: ntpfw: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-11-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: max98390: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:41 +0000 (15:59 +0200)]
ASoC: max98390: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-10-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: hdac_hda: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:40 +0000 (15:59 +0200)]
ASoC: hdac_hda: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-9-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: fs-amp-lib: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:39 +0000 (15:59 +0200)]
ASoC: fs-amp-lib: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Cc: Nick Li <nick.li@foursemi.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-8-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: aw88399: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:38 +0000 (15:59 +0200)]
ASoC: aw88399: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-7-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: aw88395: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:37 +0000 (15:59 +0200)]
ASoC: aw88395: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-6-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: aw88261: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:36 +0000 (15:59 +0200)]
ASoC: aw88261: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-5-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: aw88166: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:35 +0000 (15:59 +0200)]
ASoC: aw88166: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: aw88081: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:34 +0000 (15:59 +0200)]
ASoC: aw88081: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-3-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: aw87390: Use auto-cleanup for firmware loading
Takashi Iwai [Thu, 6 Aug 2026 13:59:33 +0000 (15:59 +0200)]
ASoC: aw87390: Use auto-cleanup for firmware loading

Simplify the code to manage the firmware loading with __free(firmware)
auto-cleanup.

Only the code refactoring, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260806140006.1412298-2-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: qcom: sc8280xp: configure codec sysclk for QCS615
Le Qi [Mon, 10 Aug 2026 03:10:32 +0000 (11:10 +0800)]
ASoC: qcom: sc8280xp: configure codec sysclk for QCS615

Continuous high-amplitude noise could occur in the DA7213 microphone
capture path after a Bluetooth out-of-range/reset event followed by
reconnection. The noise was present in both the raw ALSA capture and
PipeWire input, confirming that it originated before Bluetooth
encoding.

The codec already obtains and enables MCLK through its DT clock and
bias-level handling. However, the machine driver did not explicitly
configure the codec sysclk during hw_params(). Enable
codec_sysclk_set for QCS615 so that the DA7213 clock source and rate
are configured before the codec power-up sequence.

Verified on QCS615 Talos with repeated Bluetooth disconnect and
reconnect cycles. The noise was no longer reproducible.

Signed-off-by: Le Qi <le.qi@oss.qualcomm.com>
Link: https://patch.msgid.link/20260810031032.2001053-1-le.qi@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoLinux 7.2-rc7
Linus Torvalds [Sun, 9 Aug 2026 21:54:50 +0000 (14:54 -0700)]
Linux 7.2-rc7

6 weeks agoMerge tag 'trace-v7.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
Linus Torvalds [Sun, 9 Aug 2026 15:47:31 +0000 (08:47 -0700)]
Merge tag 'trace-v7.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:

 - Fix use-after-free in eventfs_remove_rec()

   The freeing of the eventfs_inode children used list_for_each_entry()
   where the child is freed via srcu, but there's still a chance that it
   gets freed. It should be using list_for_each_entry_safe().

 - Fix eventfs_inode SRCU use of list in freeing

   The iterator uses an SRCU protected list walk on the eventfs inodes.
   The eventfs inode uses its "list" field in a union with the RCU list
   head. When the inode gets added to the SRCU list it immediately
   corrupts the list pointer and can cause an issue with the iterator.
   Move the RCU list head to be shared with the children list head which
   allows the iterator to check the parent inode if is freed before
   referencing the child. Have the iterator check the parent "is_freed"
   field and break out if it is set. Also add memory barriers to make
   sure the ordering is correct.

 - Fix various RCU synchronization issues with direct_functions

   Updates to direct_functions have some missing RCU protection and
   synchronization. Restructure the code a bit to make sure updates to
   the direct_functions are protected.

 - Remove an unneeded comma from a scope_guard()

   There's a spurious comma in a scope_guard(). Remove it.

 - Fix race in per CPU buffer swap in the ring buffer

   When a per CPU buffer swap happens, it must make sure that it doesn't
   occur while a writer is active. Instead it returns an -EBUSY. But
   there's a small race window when a writer moves from one sub-buffer
   to the next that it resets the "committing" counter. If a swap
   happens at that moment, the buffer used for the commit of an event
   will not match the buffer the event is actually on. Instead of using
   the "committing" counter, use the recursive detection counter that
   does not get reset when the writer crosses sub-buffers.

 - Fix off-by-one in ftrace_free_mem()

   The function ftrace_free_mem() gets an "end_ptr" as a parameter that
   is exclusive to the rang to be freed. But its value is used to search
   for the records that expects an inclusive value. Subtract one from
   the parameter to convert it to an inclusive range.

 - Disable resizing of the ring buffer for persistent buffers

   Resizing the persistent buffer has undefined behavior. Prevent it
   from being resized.

 - Disable changing ring buffer subbuf order when resizing is disabled

   The ring buffer subbuffer order can not be changed during resizing.
   Use that instead of just checking if the buffer is mapped as mapped
   buffers also have resizing disabled.

 - Initialize subbuf_order of reader pages when they are created

   In rb_allocate_cpu_buffer() the bpage->order is not updated to the
   current subbuf_order leaving it as zero. This value is used when the
   page is freed.

 - Fix test_ringbuffer() to test for ERR_PTR before calling
   kthread_stop()

   The rb_threads[] array is assigned the output of kthread_run_on_cpu()
   which could return an ERR_PTR. At the end of the test, all threads in
   the array are cleaned up by kthread_stop() passing in the value in
   the array if it isn't zero. But if the array contains an ERR_PTR,
   kthread_stop() will not be able to handle it properly.

* tag 'trace-v7.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  ring-buffer: Fix crash passing ERR_PTR to kthread_stop()
  ring-buffer: Initialise reader page order in rb_allocate_cpu_buffer()
  ring-buffer: Prevent subbuf order change when resizing is disabled
  ring-buffer: Prevent resizing of persistent ring buffer
  ftrace: Fix off-by-one fentry site disable in ftrace_free_mem()
  ring-buffer: Use current_context for safe per-CPU buffer swap
  ftrace: Drop extra comma in trace_buffered_event_enable
  ftrace: Protect direct_functions in update_ftrace_direct_mod
  ftrace: Protect direct_functions in update_ftrace_direct_del
  ftrace: Protect direct_functions in ftrace_find_rec_direct
  eventfs: Use children field for rcu head and add memory barriers
  eventfs: Fix use-after-free in eventfs_remove_rec()

6 weeks agoMerge tag 's390-7.2-7' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Sun, 9 Aug 2026 13:31:16 +0000 (06:31 -0700)]
Merge tag 's390-7.2-7' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Vasily Gorbik:

 - Fix potential uninitialized memory reads and buffer overflows from
   malformed zcrypt CCA and EP11 requests by properly validating lengths
   and payloads

 - Fix possible out of bounds accesses in zcrypt EP11 domain handling by
   replacing fixed payload layout assumptions with parsing ASN.1 fields
   with bounds checks

 - Fix zcrypt CCA and EP11 request and reply buffer allocations missing
   required 4-byte padding, and scrub the full allocation on release

 - Fix zcrypt CCA and EP11 messages leaking up to 3 uninitialized bytes
   of memory by zeroing trailing alignment padding

* tag 's390-7.2-7' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/zcrypt: Pad trailing CCA or EP11 message with zeros
  s390/zcrypt: Improve EP11 CPRB domain handling with ASN.1 parsing
  s390/zcrypt: Improve EP11 CPRB length and overflow checks
  s390/zcrypt: Improve CCA CPRB length and overflow checks
  s390/zcrypt: Fix CPRB memory allocation in zcrypt misc code

6 weeks agoring-buffer: Fix crash passing ERR_PTR to kthread_stop()
Hui Su [Fri, 7 Aug 2026 15:41:46 +0000 (23:41 +0800)]
ring-buffer: Fix crash passing ERR_PTR to kthread_stop()

In test_ringbuffer()'s out_free cleanup loop, the check
`!rb_threads[cpu]` only catches NULL entries and misses entries that
hold an ERR_PTR.

rb_threads[] is static, so unassigned slots are NULL. But when
kthread_run_on_cpu() fails for a cpu, it stores ERR_PTR(-ENOMEM) (or
-EINTR) in rb_threads[cpu] before the creation loop jumps to out_free.
That entry is non-NULL, so the old `!ptr` check does not break, and the
cleanup proceeds to call kthread_stop() on the ERR_PTR. kthread_stop()
then dereferences the bogus pointer, crashing the kernel during the
late_initcall self-test.

crash logs:
  BUG: kernel NULL pointer dereference, address: 000000000000001c
  Oops: 0002 [#1] SMP NOPTI
  CPU: 1 PID: 1 Comm: swapper/0 Not tainted 7.2.0-rc6-dirty #7 PREEMPT(lazy)
  RIP: 0010:kthread_stop+0x2e/0x220
  RBX: fffffffffffffff4
  CR2: 000000000000001c
  Call Trace:
   <TASK>
   test_ringbuffer+0x1ec/0x650
   do_one_initcall+0x6c/0x2c0
   kernel_init_freeable+0x21d/0x420
   kernel_init+0x15/0x1c0
   ret_from_fork+0x21b/0x320
   </TASK>
  Kernel panic - not syncing: Fatal exception

Cc: stable@vger.kernel.org
Fixes: 64ed3a049e3e ("ring-buffer: make use of the helper function kthread_run_on_cpu()")
Link: https://patch.msgid.link/20260807154145.2846521-2-sh_def@163.com
Signed-off-by: Hui Su <sh_def@163.com>
Reviewed-by: Vincent Donnefort <vdonnefort@google.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoring-buffer: Initialise reader page order in rb_allocate_cpu_buffer()
Vincent Donnefort [Thu, 6 Aug 2026 21:13:03 +0000 (22:13 +0100)]
ring-buffer: Initialise reader page order in rb_allocate_cpu_buffer()

In rb_allocate_cpu_buffer(), bpage->order was omitted, leaving it as 0.
This is an issue for a ring-buffer with subbufs bigger than PAGE_SIZE if
when freed: free_buffer_page() relies on this value. Align the value
with the actual allocation size (buffer::subbuf_order).

Cc: stable@vger.kernel.org
Fixes: f9b94daa542a ("ring-buffer: Set new size of the ring buffer sub page")
Link: https://patch.msgid.link/20260806211306.3704194-4-vdonnefort@google.com
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoring-buffer: Prevent subbuf order change when resizing is disabled
Vincent Donnefort [Thu, 6 Aug 2026 21:13:02 +0000 (22:13 +0100)]
ring-buffer: Prevent subbuf order change when resizing is disabled

Because ring_buffer_subbuf_order_set() frees buffer pages, we can't
allow it when resizing is disabled. A non-consuming reader is at risk of
use-after-free (rb_advance_iter()).

Return -EBUSY on resize_disabled, matching ring_buffer_resize()
behaviour.

Cc: stable@vger.kernel.org
Fixes: f9b94daa542a ("ring-buffer: Set new size of the ring buffer sub page")
Link: https://patch.msgid.link/20260806211306.3704194-3-vdonnefort@google.com
Reported-by: syzbot+e0cc44465d6bae735679@syzkaller.appspotmail.com
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoring-buffer: Prevent resizing of persistent ring buffer
Vincent Donnefort [Thu, 6 Aug 2026 21:13:01 +0000 (22:13 +0100)]
ring-buffer: Prevent resizing of persistent ring buffer

Dynamically resizing a persistent ring buffer is not possible. Disable
the feature.

Cc: stable@vger.kernel.org
Fixes: be68d63a139b ("ring-buffer: Add ring_buffer_alloc_range()")
Link: https://patch.msgid.link/20260806211306.3704194-2-vdonnefort@google.com
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoftrace: Fix off-by-one fentry site disable in ftrace_free_mem()
Josh Poimboeuf [Thu, 6 Aug 2026 04:56:46 +0000 (21:56 -0700)]
ftrace: Fix off-by-one fentry site disable in ftrace_free_mem()

When a module's init text is freed, do_init_module() calls
ftrace_free_mem() with a half-open [start, end) range.  However the
ftrace_cmp_recs() comparator treats the upper bound as inclusive, as all
its other users do, passing 'ip + size - 1'.  So ftrace_free_mem() can
delete a record sitting exactly at 'end', which is outside the freed
range.

For a kernel without CFI or IBT, the first record of a function is at
the function start, which for the first function in a module is also the
base of its text allocation.  As the module allocator packs its regions,
that address is often the 'end' passed by a neighboring module's
do_init_module(), causing the first function's ftrace location to get
disabled, preventing an attempt to livepatch it:

  livepatch: failed to find location for function 'pcspkr_probe'

Convert the exclusive end to the inclusive 'end - 1' the comparator
expects, and return early for an empty range to avoid the subtraction
from underflowing when the init text size is zero.

Cc: stable@vger.kernel.org
Fixes: 42c269c88dc1 ("ftrace: Allow for function tracing to record init functions on boot up")
Link: https://patch.msgid.link/1b5ccfa8095bdb1277f84af1c2c2e2205aca03ae.1785992188.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoring-buffer: Use current_context for safe per-CPU buffer swap
Tengda Wu [Mon, 3 Aug 2026 00:56:39 +0000 (00:56 +0000)]
ring-buffer: Use current_context for safe per-CPU buffer swap

The ring_buffer_swap_cpu() function currently checks the per-CPU
committing counter to determine if a buffer is actively being written to
before performing the swap. However, there exists a race window where
this check can be bypassed:

    ring_buffer_lock_reserve
        cpu_buffer = buffer->buffers[cpu];       // cpu_buffer_a
        rb_reserve_next_event
            rb_start_commit // inc committing
            if (unlikely(READ_ONCE(cpu_buffer->buffer) != buffer)) {...}
            __rb_reserve_next
                rb_move_tail
                    rb_end_commit(cpu_buffer);   // dec committing => 0
                    /* interrupt hits here, successfully swaps! */
                    local_inc(&cpu_buffer->committing);

    ring_buffer_unlock_commit
        cpu_buffer = buffer->buffers[cpu];      // cpu_buffer_b
        rb_commit
            rb_end_commit
            RB_WARN_ON(cpu_buffer, !local_read(&cpu_buffer->committing))
                                                // triggers warning

The committing counter can temporarily drop to 0 during a single write
operation (within rb_move_tail), creating a window where swap can
succeed even though the write is still in progress. This leads to
inconsistent buffer state and triggers the RB_WARN_ON in rb_commit().

Replace the committing counter check with current_context checks, which
are set at the entry of ring_buffer_lock_reserve() and remain valid
throughout the entire write operation, providing a reliable indicator of
buffer busy state during swap.

Cc: stable@vger.kernel.org
Fixes: 4239c38fe0b3 ("ring-buffer: Process commits whenever moving to a new page.")
Link: https://patch.msgid.link/20260803005640.2445666-2-wutengda@huaweicloud.com
Signed-off-by: Tengda Wu <wutengda@huaweicloud.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoMerge tag 'x86-urgent-2026-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 8 Aug 2026 23:43:07 +0000 (16:43 -0700)]
Merge tag 'x86-urgent-2026-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Ingo Molnar:

 - Fix MCE CMCI discovery initialization ordering bug (Breno Leitao)

* tag 'x86-urgent-2026-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mce: Set up the polling timer before CMCI discovery

6 weeks agoMerge tag 'locking-urgent-2026-08-08' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 8 Aug 2026 23:39:53 +0000 (16:39 -0700)]
Merge tag 'locking-urgent-2026-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull futex fix from Ingo Molnar:

 - Fix race in futex_pivot_pending() during private hash resize
   that can cause stuck tasks (Yao Kai)

* tag 'locking-urgent-2026-08-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Fix race in futex_pivot_pending() during private hash resize

6 weeks agoMerge tag 'usb-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 8 Aug 2026 23:33:04 +0000 (16:33 -0700)]
Merge tag 'usb-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB / Thunderbolt fixes from Greg KH:
 "Here are some small USB and Thunderbolt driver fixes for 7.2-rc7 that
  resolve some reported issues. Included in here are:

   - new quirk for some broken USB devices

   - thunderbolt device fixes for reported issues

   - usb gadget driver fix

   - usb atm driver fix

   - xhci driver fixes.

   - other minor USB driver fixes

  All of these have been in linux-next this week with no reported
  issues"

* tag 'usb-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: xhci: use BIT_ULL for CRCR bits to fix incorrect 64bit mask
  usb: quirks: Add ShanWan gamepad to quirk list
  usb: hub: Split announce_device() to log device identity before enumeration
  usb: core: Add quirk for 255-bytes initial config read
  usb: atm: cxacru: properly kill rcv_urb on error in cxacru_cm()
  usb: misc: usbio: check ibuf_len against rxbuf_len in bulk msg
  usb: gadget: f_ncm: Use unsigned int for ndp_index
  usb: cdnsp: fix incorrect endian conversions for APB timeout register
  thunderbolt: Initialize ->domain_released completion before it is being used
  thunderbolt: icm: Preserve USB4 proxy data-valid bit
  thunderbolt: Bound the DROM dual link port number before indexing sw->ports
  thunderbolt: Fix bandwidth group reservation indexing
  thunderbolt: stream: Unmap buffers with mapped size

6 weeks agoMerge tag 'tty-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sat, 8 Aug 2026 23:31:15 +0000 (16:31 -0700)]
Merge tag 'tty-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty / serial / vt driver fixes from Greg KH:
 "Here are some small serial and vt tty driver fixes for 7.2-rc7 that
  resolve some reported problems. Included in here are:

   - two vt core fixes

   - amba-pl011 serial driver fixes

   - 8250_of and 8250_dma driver fixes

   - qcom-geni serial driver fix

   - sc16is7xx serial driver fix

  All of these have been in linux-next this week with no reported
  issues"

* tag 'tty-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: amba-pl011: synchronize DMA teardown
  serial: amba-pl011: cancel RS485 hrtimers after freeing IRQ
  serial: amba-pl011: fix indefinite RS485 post-send delay
  vt: add permission check for KDSKBMETA ioctl
  vt: stabilize tty reference in kbd_keycode with tty_port_tty_get
  serial: 8250_of: clear stuck empty-FIFO RX-timeout on LPC32xx
  serial: qcom-geni: fix TX DMA buffer flush
  serial: 8250_dma: Clear stale RX state on shutdown
  serial: sc16is7xx: enable THRI before filling TX FIFO

6 weeks agoMerge tag 'staging-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 8 Aug 2026 23:29:33 +0000 (16:29 -0700)]
Merge tag 'staging-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
 "Here are some more small staging driver fixes, just for the rtl8723bs
  driver, for some reported problems found with it now that people are
  starting to actually test the thing with "bad" networks.

  Nothing major, but good to have in the -final release. All of these
  have been in linux-next for over a week with no reported problems"

* tag 'staging-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: rtl8723bs: validate monitor transmit frame lengths
  staging: rtl8723bs: fix missing shared-key auth challenge length check
  staging: rtl8723bs: fix OOB read in WMM_param_handler()
  staging: rtl8723bs: fix OOB read in rtw_get_wpa_ie()

6 weeks agoMerge tag 'char-misc-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 8 Aug 2026 23:25:59 +0000 (16:25 -0700)]
Merge tag 'char-misc-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char / misc and documentation fixes from Greg KH:
 "Here are some small char/misc and nvmem and documentation fixes for
  7.2-rc7 to resolve some reported issues.  Included in here are:

   - updates to the documentation for the kernel threat model and
     security bugs to get the LLMs to actually follow what we have been
     asking them to do (i.e. not claim security issues for things we do
     not consider security issues.)

   - nvmem driver fixes which required a tiny "layout" driver to be
     added.

   - fastrpc driver fixes

   - mei driver fix

   - counter driver fix

   - binder driver fix

  All of these have been in linux-next this week with no reported
  problems"

* tag 'char-misc-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  docs: security-bugs: clarify some mandatory steps for AI reports
  docs: coding-assistant: explain important steps when looking for bugs
  docs: security-bugs: clarify what counts as a valid version
  docs: threat-model: move fake devices out of "non production use"
  docs: threat-model: clarify "security bug" vs "vulnerability"
  counter: microchip-tcb-capture: Fix DT channel validation
  mei: pull kvfree out of spinlock
  rust_binder: do not query current thread for all ioctls
  nvmem: layouts: Add fixed-layout driver
  nvmem: apple-spmi-nvmem: wrap regmap calls to satisfy CFI
  misc: fastrpc: fix memory leak in fastrpc_channel_ctx_free
  misc: fastrpc: fix channel ctx ref leak when session alloc fails
  misc: fastrpc: take fl->lock when moving mmaps on interrupted invoke
  misc: fastrpc: Remove buffer from list prior to unmap operation
  misc: fastrpc: Fix initial memory allocation for Audio PD memory pool

6 weeks agoftrace: Drop extra comma in trace_buffered_event_enable
Leon Hwang [Thu, 30 Jul 2026 15:04:11 +0000 (23:04 +0800)]
ftrace: Drop extra comma in trace_buffered_event_enable

Drop the extra comma in "scoped_guard()" to cleanup the code.

Link: https://patch.msgid.link/20260730150411.88667-5-leon.hwang@linux.dev
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoftrace: Protect direct_functions in update_ftrace_direct_mod
Leon Hwang [Thu, 30 Jul 2026 15:04:10 +0000 (23:04 +0800)]
ftrace: Protect direct_functions in update_ftrace_direct_mod

Fix accessing the __rcu pointer direct_functions with RCU protection.

Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260730150411.88667-4-leon.hwang@linux.dev
Fixes: e93672f770d7 ("ftrace: Add update_ftrace_direct_mod function")
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoftrace: Protect direct_functions in update_ftrace_direct_del
Leon Hwang [Thu, 30 Jul 2026 15:04:09 +0000 (23:04 +0800)]
ftrace: Protect direct_functions in update_ftrace_direct_del

Fix accessing the __rcu pointer direct_functions with RCU protection.

Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260730150411.88667-3-leon.hwang@linux.dev
Fixes: 8d2c1233f371 ("ftrace: Add update_ftrace_direct_del function")
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoftrace: Protect direct_functions in ftrace_find_rec_direct
Leon Hwang [Thu, 30 Jul 2026 15:04:08 +0000 (23:04 +0800)]
ftrace: Protect direct_functions in ftrace_find_rec_direct

Fix accessing the __rcu pointer direct_functions with RCU protection.

Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260730150411.88667-2-leon.hwang@linux.dev
Fixes: d05cb470663a ("ftrace: Fix modification of direct_function hash while in use")
Acked-by: Jiri Olsa <jolsa@kernel.org>
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoMerge tag 'fbdev-for-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Sat, 8 Aug 2026 14:47:52 +0000 (07:47 -0700)]
Merge tag 'fbdev-for-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull fbdev fixes from Helge Deller:
 "A few patches for the core fbdev layer which stabilize or fix
  potential issues with text font rendering after screen rotation or
  after user initiated font changes and locking fixes for sysfb during
  modifications of the graphics mode database"

* tag 'fbdev-for-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  fbdev: bitblit: bound-check glyph index in bit_cursor()
  fbdev: Fix out-of-bounds access when rotating console after font resize
  fbdev: core: Fix pointer desynchronization in fb_io_read()
  fbdev: serialize mode sysfs access with lock_fb_info()
  fbdev: clear fb_info->mode before deleting a videomode
  fbdev: bound mode sysfs output to the sysfs buffer

6 weeks agoeventfs: Use children field for rcu head and add memory barriers
Steven Rostedt [Sat, 8 Aug 2026 13:42:15 +0000 (09:42 -0400)]
eventfs: Use children field for rcu head and add memory barriers

When an eventfs inode is freed, it sets ei->is_freed and then uses its
ei->list to add it to the srcu link list as the list field is a union with
the rcu list head. As the ei->list is used to iterate over an SRCU
protected list without taking the eventfs_mutex, there's nothing stopping
the iteration over that list to see the ei->rcu instead of the ei->list
and it will read a corrupt target.

To fix this, change the union of the rcu list head with the children list.
On freeing the eventfs inode, set the is_free and execute a smp_wmb()
before adding the eventfs inode to the SRCU list.

On iteration of the ei->children list, at the start, execute a smp_rmb()
and then read the is_freed of the ei to see if the children list is still
valid. If is_freed is set, then the ei_child read is not valid and the
loop should exit immediately.

Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260808094215.4252430d@robin
Fixes: 704f960dbee2f ("eventfs: Read ei->entries before ei->children in eventfs_iterate()")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260806022719.375354-1-shuangpeng.kernel%40gmail.com
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoeventfs: Fix use-after-free in eventfs_remove_rec()
Shuangpeng Bai [Thu, 6 Aug 2026 02:27:19 +0000 (22:27 -0400)]
eventfs: Fix use-after-free in eventfs_remove_rec()

eventfs_remove_rec() recursively removes the child at the current loop
position. After the recursive call returns, list_for_each_entry() advances
by reading list.next from the removed child.

If free_ei() drops the final reference, release_ei() reuses the list/rcu
union to queue an SRCU callback. The child may be freed before that read.
The eventfs_mutex serializes list updates, but it does not keep the removed
child alive or prevent the SRCU callback from running.

Use list_for_each_entry_safe() to save the next sibling before recursively
removing the current child.

Cc: stable@vger.kernel.org
Fixes: 43aa6f97c2d0 ("eventfs: Get rid of dentry pointers without refcounts")
Link: https://patch.msgid.link/20260806022719.375354-1-shuangpeng.kernel@gmail.com
Signed-off-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
6 weeks agoMerge tag 'driver-core-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 8 Aug 2026 14:13:29 +0000 (07:13 -0700)]
Merge tag 'driver-core-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core fixes from Danilo Krummrich:

 - Fix Rust build failure on s390 by gating ioremap() / iounmap()
   helpers and the io::mem module on CONFIG_HAS_IOMEM; gate affected
   doctests as well.

 - Add missing kernel-doc for show_const / store_const union members in
   struct device_attribute.

* tag 'driver-core-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
  rust: io: gate ioremap doctests on CONFIG_HAS_IOMEM
  rust: io: gate ioremap/iounmap on CONFIG_HAS_IOMEM
  driver core: add missing kernel-doc for union members

6 weeks agoMerge tag 'input-for-v7.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor...
Linus Torvalds [Sat, 8 Aug 2026 14:09:35 +0000 (07:09 -0700)]
Merge tag 'input-for-v7.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - Fixes for information leaks and OOB accesses across several drivers,
   including evdev, focaltech, edt-ft5x06, iforce, and cs40l50-vibra

 - Improvements to the synaptics-rmi4 driver to properly handle F54
   worker errors and prevent buffer overflows

 - Input validation fixes in the hynitron_cstxxx touchscreen driver to
   prevent issues with invalid finger IDs and touch counts

 - Fixes for use-after-free and initialization bugs in the byd mouse and
   psxpad-spi drivers

 - New quirks for the atkbd driver to make keyboard work on HONOR and
   Xiaomi laptops

 - Support for the ZENAIM LEVERLESS controller in the xpad driver.

* tag 'input-for-v7.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: evdev - sanitize event type index when fetching event masks
  Input: synaptics-rmi4 - propagate F54 worker errors to V4L2 queue
  Input: synaptics-rmi4 - block s_input when F54 queue is busy
  Input: synaptics-rmi4 - bound the F54 report size to the allocated buffer
  Input: synaptics-rmi4 - zero report size on F54 work error
  Input: synaptics-rmi4 - fix F55 transmitter electrode count typo
  Input: hynitron_cstxxx - validate touch count and finger IDs
  Input: evdev - fix information leak in evdev_pass_values()
  fixp-arith: convert comments to kernel-doc format
  Input: focaltech - fix array out-of-bounds in focaltech_process_rel_packet
  Input: atkbd - skip deactivate for HONOR ZQC-P
  Input: atkbd - skip deactivate for Xiaomi Book Pro 14's internal keyboard
  Input: iforce - validate input packet lengths
  Input: psxpad-spi - set driver data before use
  Input: cs40l50-vibra - validate custom data from user space
  Input: xpad - add support for ZENAIM LEVERLESS
  Input: edt-ft5x06 - ignore contacts with an out-of-range slot id
  Input: byd - synchronize timer deletion before freeing private data

6 weeks agoMerge tag 'powerpc-7.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sat, 8 Aug 2026 14:03:59 +0000 (07:03 -0700)]
Merge tag 'powerpc-7.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Madhavan Srinivasan:

 - A couple of fixes for a memory leak and a underflow case

Thanks to George Wilson and R Nageswara Sastry

* tag 'powerpc-7.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/pseries: lparcfg - fix kbuf[] underflow
  powerpc/pseries: pci - logic bug
  powerpc/pseries: papr-phy-attest - validate cmd.length, plug mem leak

6 weeks agofbdev: bitblit: bound-check glyph index in bit_cursor()
Rik van Riel [Sat, 8 Aug 2026 02:19:56 +0000 (22:19 -0400)]
fbdev: bitblit: bound-check glyph index in bit_cursor()

bit_cursor() fetches the glyph under the cursor with

c = scr_readw(vc_pos);
src = vc_font.data + ((c & charmask) * w * height);

where charmask is 0x1ff when vc_hi_font_mask is set. The screen buffer
value comes directly from scr_readw() and may be larger than the current
font's glyph count.

Syzkaller triggers this via vcs_write(). The Call Trace shows
vcs_write() in vc_screen.c writing an arbitrary 16-bit value with
writev() to /dev/vcsa, which vcs_write_buf() in vc_screen.c stores via
vcs_scr_writew() without checking charcount. The stored value is later
read in bit_cursor() in bitblit.c.

When the font is changed from a font with 512 glyphs to a font with
256 glyphs, the screen buffer can retain characters with the high
bit set from the previous mode, which could also produce the same
out-of-bounds access.

  BUG: KASAN: global-out-of-bounds in soft_cursor+0x378/0x6bc drivers/video/fbdev/core/softcursor.c:70
  Read of size 16 at addr ffff800086c57970

  Call Trace:
   soft_cursor+0x378/0x6bc drivers/video/fbdev/core/softcursor.c:70
   bit_cursor+0xa90/0x1108 drivers/video/fbdev/core/bitblit.c:365
   fbcon_cursor+0x344/0x498 drivers/video/fbdev/core/fbcon.c:1427
   hide_cursor+0xdc/0x2d0 drivers/tty/vt/vt.c:883
   update_region+0x100/0x18c drivers/tty/vt/vt.c:669
   vcs_write+0x8ec/0xaf0 drivers/tty/vt/vc_screen.c:685

bit_putcs_aligned() and bit_putcs_unaligned() already clamp the glyph
index to vc_font.charcount. Apply the same clamp in bit_cursor() after
extracting the attribute and masking, before indexing fontdata.

The fix completes the bounds checking started in commit 18c4ef4e765a
("fbdev: bitblit: bound-check glyph index in bit_putcs*"), which missed
the cursor path.

This change should be safe because the clamp reuses the existing
contract from fbcon: charcount is maintained under console_lock in
con_font_set() and fbcon_font_set(), and hi_font_mask is cleared when
switching from 512 to 256 glyphs. When stale screen data with high bits
remains after a font switch, or when vcs_write() stores an arbitrary
value, clamping the index to 0 prevents the out-of-bounds read without
changing cursor semantics — the same fallback bit_putcs uses.

Reported-by: syzbot+61b1db46218109869c14@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=61b1db46218109869c14
Link: https://lore.kernel.org/all/6a75205c.01d0871a.3a0d52.0032.GAE@google.com/
Fixes: 18c4ef4e765a ("fbdev: bitblit: bound-check glyph index in bit_putcs*")
Cc: stable@vger.kernel.org
Assisted-by: Hermes:muse-spark-1.2 syzkaller
Signed-off-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Helge Deller <deller@gmx.de>
6 weeks agofbdev: Fix out-of-bounds access when rotating console after font resize
Zizhi Wo [Wed, 29 Jul 2026 02:12:04 +0000 (10:12 +0800)]
fbdev: Fix out-of-bounds access when rotating console after font resize

[BUG]
Recently, we encountered a KASAN warning as follows:

BUG: KASAN: slab-out-of-bounds in ccw_putcs+0x8bd/0xa80
Read of size 1 at addr ff11000110067100 by task bash/1209
CPU: 10 UID: 0 PID: 1209 Comm: bash Not tainted 7.2.0-rc3 #69 PREEMPT(full)
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-4.fc41 04/01/2014
 Call Trace:
  <TASK>
  ...
  kasan_report+0xf0/0x120
  ? ccw_putcs+0x8bd/0xa80
  ccw_putcs+0x8bd/0xa80
  ? __pfx_ccw_putcs+0x10/0x10
  fbcon_putcs+0x338/0x410
  ? __pfx_ccw_putcs+0x10/0x10
  do_update_region+0x21d/0x450
  invert_screen+0x29d/0x5e0
  ? __kmalloc_noprof+0x493/0x640
  ? vc_do_resize+0x17c/0xe50
  clear_selection+0x4c/0x60
  vc_do_resize+0xaee/0xe50
  fbcon_modechanged+0x2bd/0x640
  rotate_all_store+0x298/0x380
  ...

reproduce:
1) issue two ioctls: first a KDFONTOP ioctl with op.op = KD_FONT_OP_SET,
op.width = 1 and op.height = 1, then a TIOCL_SETSEL ioctl
2) echo 2 > /sys/devices/virtual/graphics/fbcon/rotate_all
3) issue two ioctls: first a KDFONTOP ioctl with op.op = KD_FONT_OP_SET,
op.width = 8 and op.height = 1, then a TIOCL_SETSEL ioctl
4) echo 3 > /sys/devices/virtual/graphics/fbcon/rotate_all

[CAUSE]
The root cause is that fbcon_modechanged() first sets the current rotate's
corresponding ops. Subsequently, during vc_resize(), it may trigger
clear_selection(), and in fbcon_putcs->ccw_putcs[rotate=3], this can result
in an out-of-bounds access to "src". This happens because par->rotated.buf
is reallocated in fbcon_rotate_font():
1) When rotate=2, its size is (width + 7) / 8 * height
2) When rotate=3, its size is (height + 7) / 8 * width

And the call to fbcon_rotate_font() occurs after clear_selection(). In
other words, the fontbuffer is allocated using the size calculated from the
previous rotation 2, but before reallocating it with the new size,
con_putcs is already using the new rotation 3:

rotate_all_store
 fbcon_rotate_all
  fbcon_set_all_vcs
   fbcon_modechanged
    set_blitting_type
    ...
     par->bitops = &ccw_fbcon_bitops
    vc_resize
    ...
     clear_selection
      highlight
      ...
       do_update_region
fbcon_putcs
...
 image.dy = vyres - ((xx + count) * vc->vc_font.width) [1]  // overflow!
 ccw_putcs_aligned
  // old buf size is still being used during the read!
  src = par->rotated.buf + (scr_readw(s--) & charmask) * cellsize
  fb_pad_aligned_buffer----[src KASAN!!!] [2]
  info->fbops->fb_imageblit(info, image)
   sys_imageblit
    fb_imageblit
     fb_address_forward
      // offset: image->dy * bits_per_line + image->dx * bpp
      unsigned int bits = (unsigned int)adr->bits + offset
      adr->address += (bits & ~(BITS_PER_LONG - 1u)) / BITS_PER_BYTE [3]
     fb_bitmap_imageblit
     ...
      fb_read_offset // page fault! [4]
    update_screen
     redraw_screen
     ...
      ccw_cursor
       soft_cursor
        memcpy(src, image->data, dsize)----[src KASAN again!!!] [5]
     fbcon_switch
      fbcon_rotate_font
       font_data_rotate
dst = kmalloc_array(charcount, d_cellsize, GFP_KERNEL)
       // the new size is allocated only here!
       par->rotated.buf = buf [6]

[FIX]
A fairly obvious approach is to follow fbcon_switch(): in
fbcon_modechanged(), call rotate_font() before vc_resize() so that a
correctly sized buffer is allocated in time, as done in [6]. This fix is
necessary, but it is not sufficient on its own.

In [1] it causes an image.dy overflow (ccw_putcs: vyres = 768,
image.dy = 4294967040), because vc_cols has not been updated in time at
this point (it is likewise only updated after clear_selection()). This
allows (xx + count) * width to exceed vyres, causing image.dy to overflow.
Subsequently, address in [3] is incremented by an even larger amount, which
triggers a page fault at [4].

Therefore, a second fix is required in combination with the first: move
clear_selection() earlier, before set_blitting_type() in
fbcon_set_all_vcs(), to prevent the out-of-bounds access. fbcon_rotate()
has a similar problem, so add the same clear there. Since vc_is_sel() is
not exported, the fbdev side is currently forced to call clear_selection()
unconditionally, causing the global selection to be cleared prematurely.
And this will not cause any other significant impact.

Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
Signed-off-by: Helge Deller <deller@gmx.de>
6 weeks agofbdev: core: Fix pointer desynchronization in fb_io_read()
Mingyu Wang [Tue, 21 Jul 2026 08:19:42 +0000 (16:19 +0800)]
fbdev: core: Fix pointer desynchronization in fb_io_read()

In fb_io_read(), if copy_to_user() performs a partial copy (e.g., due to
a faulty user buffer), the loop adjusts the chunk size 'c' and updates
the remaining 'count'. However, the hardware 'src' pointer has already
been eagerly advanced by the original chunk size.

If the loop is allowed to continue, the read will resume from an
incorrect, over-advanced offset. Since the remaining 'count' was only
decremented by the successful bytes, this desynchronization causes the
next iterations to execute more hardware reads than originally bounded,
eventually leading to out-of-bounds I/O reads.

Fix this by breaking out of the loop immediately upon a partial
copy_to_user(). A partial copy indicates a faulty user buffer, making
subsequent read attempts futile. Breaking out ensures we return the
number of successfully read bytes without risking out-of-bounds hardware
accesses in subsequent mismatched iterations.

Fixes: 6121cd9ef911 ("fbdev: Move I/O read and write code into helper functions")
Cc: stable@vger.kernel.org
Signed-off-by: Mingyu Wang <25181214217@stu.xidian.edu.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
6 weeks agofbdev: serialize mode sysfs access with lock_fb_info()
Melbin K Mathew [Wed, 1 Jul 2026 23:42:48 +0000 (01:42 +0200)]
fbdev: serialize mode sysfs access with lock_fb_info()

show_mode(), show_modes(), and store_mode() access fb_info->modelist
and fb_info->mode without holding lock_fb_info(). store_modes() takes
lock_fb_info() while replacing the modelist and freeing the old one.

A concurrent reader or writer can load a pointer to an old modelist
entry before store_modes() frees it, then dereference freed memory or
store a stale freed pointer in fb_info->mode.

Take lock_fb_info() in show_mode(), show_modes(), and store_mode() to
serialize with store_modes(). In show_mode(), copy the mode to the
stack and format after dropping the lock. In store_mode(), split
activate() into a _locked variant to avoid double-locking, and hold
the locks for the modelist walk, mode conversion, activation, and
fb_info->mode assignment together.

Cc: stable@vger.kernel.org # v7.1+
Signed-off-by: Melbin K Mathew <mlbnkm1@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
6 weeks agofbdev: clear fb_info->mode before deleting a videomode
Melbin K Mathew [Wed, 1 Jul 2026 23:42:47 +0000 (01:42 +0200)]
fbdev: clear fb_info->mode before deleting a videomode

fb_set_var() can delete a mode from info->modelist when userspace
passes FB_ACTIVATE_INV_MODE through FBIOPUT_VSCREENINFO. The code
checks that the mode being deleted is not the current info->var and
that fbcon is not using it, but it does not check fb_info->mode.

fb_info->mode may still point into the modelist entry being deleted.
If the entry is freed, later mode sysfs reads through show_mode() can
dereference a stale pointer.

Clear fb_info->mode before calling fb_delete_videomode() when it
matches the mode being removed.

Cc: stable@vger.kernel.org # v7.1+
Signed-off-by: Melbin K Mathew <mlbnkm1@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
6 weeks agofbdev: bound mode sysfs output to the sysfs buffer
Melbin K Mathew [Wed, 1 Jul 2026 23:42:46 +0000 (01:42 +0200)]
fbdev: bound mode sysfs output to the sysfs buffer

mode_string() uses snprintf() which can return a value larger than the
remaining buffer space. show_modes() accumulates the return value into i
without checking whether i has reached PAGE_SIZE, causing the offset to
advance past the sysfs buffer if the modelist is long enough.

Add a size parameter to mode_string() and use scnprintf() to return
only the bytes actually written. Add an early return when offset
already exceeds the buffer. In show_modes(), stop accumulating once
the buffer is full.

Cc: stable@vger.kernel.org # v7.1+
Signed-off-by: Melbin K Mathew <mlbnkm1@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
6 weeks agopowerpc/pseries: lparcfg - fix kbuf[] underflow
George Wilson [Fri, 7 Aug 2026 16:59:00 +0000 (11:59 -0500)]
powerpc/pseries: lparcfg - fix kbuf[] underflow

In lparcfg_write(), a count of 0 results in kbuf[] being indexed at -1.
Check for count == 0 in the existing check for count > sizeof(kbuf) and
return -EINVAL if true.

Fixes: 74422e2b1939 ("powerpc/pseries: Remove VLA from lparcfg_write()")
Acked-by: Nayna Jain <nayna@linux.ibm.com>
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Cc: stable@vger.kernel.org # 4.20
Signed-off-by: George Wilson <gcwilson@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
6 weeks agopowerpc/pseries: pci - logic bug
George Wilson [Fri, 7 Aug 2026 16:58:36 +0000 (11:58 -0500)]
powerpc/pseries: pci - logic bug

The checks on num_vfs in pseries_pci_sriov_enable() are ANDed where OR
was apparently intended.  Change it to OR.

Fixes: 9a7f6b438664 ("powerpc/pseries/pci: Associate PEs to VFs in configure SR-IOV")
Acked-by: Nayna Jain <nayna@linux.ibm.com>
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Cc: stable@vger.kernel.org # 4.16
Signed-off-by: George Wilson <gcwilson@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
6 weeks agopowerpc/pseries: papr-phy-attest - validate cmd.length, plug mem leak
George Wilson [Fri, 7 Aug 2026 16:56:21 +0000 (11:56 -0500)]
powerpc/pseries: papr-phy-attest - validate cmd.length, plug mem leak

In papr_phy_attest_create_handle(), the params->cmd.length is not
validated before use, which can result in a buffer overlow.  Check it and
return -EINVAL if it is either 0 or exceeds sizeof(params->cmd).

Also, params is freed on the success path but not error. Free it on
errors after memory allocation.  And free it on negative fd.

Fixes: 86900ab620a4 ("powerpc/pseries: Add a char driver for physical-attestation RTAS")
Acked-by: Haren Myneni <haren@linux.ibm.com>
Acked-by: Nayna Jain <nayna@linux.ibm.com>
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Cc: stable@vger.kernel.org # 6.16
Signed-off-by: George Wilson <gcwilson@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
6 weeks agoMerge tag 'watchdog-for-v7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 8 Aug 2026 00:29:59 +0000 (17:29 -0700)]
Merge tag 'watchdog-for-v7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull watchdog fixes from Guenter Roeck:

 - at91sam9_wdt: prevent timer rearm during teardown

 - bd96801_wdt: Fix timeout for enabled WDG

 - atcwdt200: Fix return value when watchdog is enabled

* tag 'watchdog-for-v7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  watchdog: at91sam9_wdt: prevent timer rearm during teardown
  watchdog: bd96801_wdt: Fix timeout for enabled WDG
  watchdog: atcwdt200: fix return value when watchdog is enabled

6 weeks agoMerge tag 'hwmon-for-v7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Sat, 8 Aug 2026 00:14:05 +0000 (17:14 -0700)]
Merge tag 'hwmon-for-v7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "Various fixes, most of them fixing critical or high severity bugs
  reported by Sashiko.

  ads7828:
   - Fix external VREF regulator handling

  corsair-psu:
   - Fix linear11 calculation
   - Serialize debugfs access against hwmon
   - Fix possible out-of-bounds access on missing string termination

  ltc4282:
   - Fix parsing adi,current-limit-sense-microvolt
   - Clamp negative current limits
   - Avoid overflow in maximum power calculation

  nzxt-smart2:
   - Check return value of init_device() in probe

  PMBus core:
   - Fix type confusion in notification logic
   - Avoid race condition during probe

  PMBus/lm25066:
   - Fix PMBus coefficient calculations"

* tag 'hwmon-for-v7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (corsair-psu) Fix linear11 calculation
  hwmon: (corsair-psu) serialize debugfs access against hwmon
  hwmon: (ltc4282) Fix parsing adi,current-limit-sense-microvolt
  hwmon: (ltc4282) Clamp negative current limits
  hwmon: (ltc4282) Avoid overflow in maximum power calculation
  hwmon: (ads7828) Fix external VREF regulator handling
  hwmon: (corsair-psu) fix possible out-of-bounds access on missing string termination
  hwmon: (pmbus/lm25066) Fix PMBus coefficient calculations
  hwmon: (nzxt-smart2) Check return value of init_device() in probe
  hwmon: (pmbus) Fix type confusion in notification logic
  hwmon: (pmbus/core) Avoid race condition during probe

6 weeks agoMerge tag 'ata-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux
Linus Torvalds [Fri, 7 Aug 2026 23:32:54 +0000 (16:32 -0700)]
Merge tag 'ata-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux

Pull ata fixes from Damien Le Moal:

 - Disable link power management on yet another misbehaving WD drive
   (Niklas)

 - Fix a use after free issue in the pata_sl82c105 driver (Hongyan)

* tag 'ata-7.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: pata_sl82c105: fix bridge revision use-after-free
  ata: libata-core: Disable LPM on WDC WD141KFGX-68FH9N0

6 weeks agoMerge tag 'drm-fixes-2026-08-08' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Fri, 7 Aug 2026 22:45:51 +0000 (15:45 -0700)]
Merge tag 'drm-fixes-2026-08-08' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly fixes for drm, feels relatively quiet for the post-AI world,
  mostly amdgpu and xe with a few fixes across the board:

  shmem:
   - check VMA boundaries for PMD mappings

  xe:
   - Fix memory leak in exec_queue_set_hang_replay_state
   - Apply RCS/CCS yield policy to SR-IOV VFs

  amdgpu:
   - JPEG queue reset fixes
   - GC 12 fix
   - GMC 12.1 fixes
   - Lockdep false positive fix
   - Userq fix
   - Bounds checking fixes
   - Devcoredump fixes
   - DCN 2.0.1 fix
   - Aperture mapping fix
   - DC avmute fix
   - DC self refresh fix

  radeon:
   - Performance regression fix

  panthor:
   - skip zero sized firmware segments
   - check VMA boundaries for PMD mappings

  bridge:
   - ps8640: propagate AUX transfer register errors

  amdxdna:
   - Improve error handling in amdxdna_insert_pages.

  v3d:
   - serialise scheduler timeouts"

* tag 'drm-fixes-2026-08-08' of https://gitlab.freedesktop.org/drm/kernel: (26 commits)
  drm/amd/display: allow self-refresh exit while entry is blocked
  drm/amdgpu: fix aperture iounmap skipped on device removal
  drm/amd/display: Check for tg ops in dce110_set_avmute
  Revert "drm/amdgpu: fix aperture mapping leak"
  drm/radeon: restore hardware polling in fence_is_signaled to fix performance regression
  drm/amd: Disable DP audio spread spectrum for Cyan Skillfish
  drm/amdgpu/gmc12.1: fix MMHUB0 check in pasid tlb flush
  drm/amdgpu: Allocate coredump ring buffers per ring
  drm/amdgpu: Use virtual alloc during coredump
  drm/amdgpu: reject oversized IBs with per-ring packet limits
  drm/amdgpu/userq: serialize queue map against GPU reset
  drm/amdgpu: Fix lockdep false positive in amdgpu_lockdep_init
  drm/amdgpu/gmc12.1: implement tlb inv semaphore
  drm/amdgpu: read TRUNCATE_COORD_MODE on gfx12
  drm/amdgpu: fix JPEG v5.3.0 queue reset failure in DPG mode
  drm/amdgpu: fix JPEG v4.0.5 queue reset failure in DPG mode
  drm/amdgpu: fix JPEG v5.0.0 queue reset failure in DPG mode
  drm/panthor: Check VMA boundaries for PMD mappings
  drm/xe/uc: Apply RCS/CCS yield policy to SR-IOV VFs
  drm/xe: Fix memory leak in exec_queue_set_hang_replay_state()
  ...

6 weeks agoASoC: fsl_easrc: fix missing return on success in runtime_resume
Shengjiu Wang [Fri, 7 Aug 2026 07:22:02 +0000 (15:22 +0800)]
ASoC: fsl_easrc: fix missing return on success in runtime_resume

Commit 48d84310be60 ("ASoC: fsl_easrc: Use guard() for spin locks")
refactored fsl_easrc_runtime_resume() but accidentally dropped the
early return on the success path.  The original code had a skip_load
label followed by "return 0"; that label was removed during cleanup
but the corresponding success return was lost too.

As a result, every successful resume falls through into the
disable_mem_clk error path and calls clk_disable_unprepare() on a
clock that is still in use, leading to an unbalanced clock disable.

Restore the missing "return 0" before the disable_mem_clk error label.

Fixes: 48d84310be60 ("ASoC: fsl_easrc: Use guard() for spin locks")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20260807072202.380021-1-shengjiu.wang@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoMerge tag 'pinctrl-v7.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Fri, 7 Aug 2026 19:18:33 +0000 (12:18 -0700)]
Merge tag 'pinctrl-v7.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
 "Qualcomm fixes: some incorrectly defined groups in IPQ9650, two pins
  needing to be marked as GPIO in IPQ806X"

* tag 'pinctrl-v7.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: qcom: ipq806x: mark pci reset as a GPIO pin function
  pinctrl: qcom: ipq806x: mark gpio as a GPIO pin function
  pinctrl: qcom: ipq9650: fix audio_sec_mclk_in1/out1 group pins

6 weeks agoASoC: amd: acp: return irq error directly
Rosen Penev [Fri, 7 Aug 2026 01:24:08 +0000 (18:24 -0700)]
ASoC: amd: acp: return irq error directly

platform_get_irq() returns multiple error codes. Return the irq directly
instead of just -ENODEV.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20260807012408.55272-1-rosenp@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>