Changelog in Linux kernel 6.13.8

 
ACPI: resource: IRQ override for Eluktronics MECH-17 [+ + +]
Author: Gannon Kolding <gannon.kolding@gmail.com>
Date:   Mon Jan 27 02:39:02 2025 -0700

    ACPI: resource: IRQ override for Eluktronics MECH-17
    
    [ Upstream commit 607ab6f85f4194b644ea95ac5fe660ef575db3b4 ]
    
    The Eluktronics MECH-17 (GM7RG7N) needs IRQ overriding for the
    keyboard to work.
    
    Adding a DMI_MATCH entry for this laptop model makes the internal
    keyboard function normally.
    
    Signed-off-by: Gannon Kolding <gannon.kolding@gmail.com>
    Link: https://patch.msgid.link/20250127093902.328361-1-gannon.kolding@gmail.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
alpha/elf: Fix misc/setarch test of util-linux by removing 32bit support [+ + +]
Author: Eric W. Biederman <ebiederm@xmission.com>
Date:   Sun Jan 12 23:39:01 2025 -0600

    alpha/elf: Fix misc/setarch test of util-linux by removing 32bit support
    
    [ Upstream commit b029628be267cba3c7684ec684749fe3e4372398 ]
    
    Richard Henderson <richard.henderson@linaro.org> writes[1]:
    
    > There was a Spec benchmark (I forget which) which was memory bound and ran
    > twice as fast with 32-bit pointers.
    >
    > I copied the idea from DEC to the ELF abi, but never did all the other work
    > to allow the toolchain to take advantage.
    >
    > Amusingly, a later Spec changed the benchmark data sets to not fit into a
    > 32-bit address space, specifically because of this.
    >
    > I expect one could delete the ELF bit and personality and no one would
    > notice. Not even the 10 remaining Alpha users.
    
    In [2] it was pointed out that parts of setarch weren't working
    properly on alpha because it has it's own SET_PERSONALITY
    implementation.  In the discussion that followed Richard Henderson
    pointed out that the 32bit pointer support for alpha was never
    completed.
    
    Fix this by removing alpha's 32bit pointer support.
    
    As a bit of paranoia refuse to execute any alpha binaries that have
    the EF_ALPHA_32BIT flag set.  Just in case someone somewhere has
    binaries that try to use alpha's 32bit pointer support.
    
    Link: https://lkml.kernel.org/r/CAFXwXrkgu=4Qn-v1PjnOR4SG0oUb9LSa0g6QXpBq4ttm52pJOQ@mail.gmail.com [1]
    Link: https://lkml.kernel.org/r/20250103140148.370368-1-glaubitz@physik.fu-berlin.de [2]
    Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Reviewed-by: Arnd Bergmann <arnd@arndb.de>
    Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    Link: https://lore.kernel.org/r/87y0zfs26i.fsf_-_@email.froward.int.ebiederm.org
    Signed-off-by: Kees Cook <kees@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ALSA: hda/realtek: Limit mic boost on Positivo ARN50 [+ + +]
Author: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Date:   Sat Feb 1 11:39:30 2025 -0300

    ALSA: hda/realtek: Limit mic boost on Positivo ARN50
    
    [ Upstream commit 76b0a22d4cf7dc9091129560fdc04e73eb9db4cb ]
    
    The internal mic boost on the Positivo ARN50 is too high.
    Fix this by applying the ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine
    to limit the gain.
    
    Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
    Link: https://patch.msgid.link/20250201143930.25089-1-edson.drosdeck@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ALSA: hda: hda-intel: add Panther Lake-H support [+ + +]
Author: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Date:   Mon Feb 10 10:17:30 2025 +0200

    ALSA: hda: hda-intel: add Panther Lake-H support
    
    [ Upstream commit d7e2447a4d51de5c3c03e3b7892898e98ddd9769 ]
    
    Add Intel PTL-H audio Device ID.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
    Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Link: https://patch.msgid.link/20250210081730.22916-5-peter.ujfalusi@linux.intel.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ALSA: hda: intel-dsp-config: Add PTL-H support [+ + +]
Author: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Date:   Mon Feb 10 10:17:28 2025 +0200

    ALSA: hda: intel-dsp-config: Add PTL-H support
    
    [ Upstream commit 214e6be2d91d5d58f28d3a37630480077a1aafbd ]
    
    Use same recipes as PTL for PTL-H.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
    Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Link: https://patch.msgid.link/20250210081730.22916-3-peter.ujfalusi@linux.intel.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
apple-nvme: Release power domains when probe fails [+ + +]
Author: Hector Martin <marcan@marcan.st>
Date:   Thu Feb 13 11:12:59 2025 -0500

    apple-nvme: Release power domains when probe fails
    
    [ Upstream commit eefa72a15ea03fd009333aaa9f0e360b2578e434 ]
    
    Signed-off-by: Hector Martin <marcan@marcan.st>
    Reviewed-by: Neal Gompa <neal@gompa.dev>
    Reviewed-by: Sven Peter <sven@svenpeter.dev>
    Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
arm64: amu: Delay allocating cpumask for AMU FIE support [+ + +]
Author: Beata Michalska <beata.michalska@arm.com>
Date:   Fri Jan 31 15:58:42 2025 +0000

    arm64: amu: Delay allocating cpumask for AMU FIE support
    
    [ Upstream commit d923782b041218ef3804b2fed87619b5b1a497f3 ]
    
    For the time being, the amu_fie_cpus cpumask is being exclusively used
    by the AMU-related internals of FIE support and is guaranteed to be
    valid on every access currently made. Still the mask is not being
    invalidated on one of the error handling code paths, which leaves
    a soft spot with theoretical risk of UAF for CPUMASK_OFFSTACK cases.
    To make things sound, delay allocating said cpumask
    (for CPUMASK_OFFSTACK) avoiding otherwise nasty sanitising case failing
    to register the cpufreq policy notifications.
    
    Signed-off-by: Beata Michalska <beata.michalska@arm.com>
    Reviewed-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
    Reviewed-by: Sumit Gupta <sumitg@nvidia.com>
    Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
    Link: https://lore.kernel.org/r/20250131155842.3839098-1-beata.michalska@arm.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

arm64: mm: Populate vmemmap at the page level if not section aligned [+ + +]
Author: Zhenhua Huang <quic_zhenhuah@quicinc.com>
Date:   Tue Mar 4 15:27:00 2025 +0800

    arm64: mm: Populate vmemmap at the page level if not section aligned
    
    commit d4234d131b0a3f9e65973f1cdc71bb3560f5d14b upstream.
    
    On the arm64 platform with 4K base page config, SECTION_SIZE_BITS is set
    to 27, making one section 128M. The related page struct which vmemmap
    points to is 2M then.
    Commit c1cc1552616d ("arm64: MMU initialisation") optimizes the
    vmemmap to populate at the PMD section level which was suitable
    initially since hot plug granule is always one section(128M). However,
    commit ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug")
    introduced a 2M(SUBSECTION_SIZE) hot plug granule, which disrupted the
    existing arm64 assumptions.
    
    The first problem is that if start or end is not aligned to a section
    boundary, such as when a subsection is hot added, populating the entire
    section is wasteful.
    
    The next problem is if we hotplug something that spans part of 128 MiB
    section (subsections, let's call it memblock1), and then hotplug something
    that spans another part of a 128 MiB section(subsections, let's call it
    memblock2), and subsequently unplug memblock1, vmemmap_free() will clear
    the entire PMD entry which also supports memblock2 even though memblock2
    is still active.
    
    Assuming hotplug/unplug sizes are guaranteed to be symmetric. Do the
    fix similar to x86-64: populate to pages levels if start/end is not aligned
    with section boundary.
    
    Cc: stable@vger.kernel.org # v5.4+
    Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug")
    Acked-by: David Hildenbrand <david@redhat.com>
    Signed-off-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
    Reviewed-by: Oscar Salvador <osalvador@suse.de>
    Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
    Link: https://lore.kernel.org/r/20250304072700.3405036-1-quic_zhenhuah@quicinc.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
ASoC: amd: yc: Support mic on another Lenovo ThinkPad E16 Gen 2 model [+ + +]
Author: Thomas Mizrahi <thomasmizra@gmail.com>
Date:   Sat Mar 8 01:06:28 2025 -0300

    ASoC: amd: yc: Support mic on another Lenovo ThinkPad E16 Gen 2 model
    
    commit 0704a15b930cf97073ce091a0cd7ad32f2304329 upstream.
    
    The internal microphone on the Lenovo ThinkPad E16 model requires a
    quirk entry to work properly. This was fixed in a previous patch (linked
    below), but depending on the specific variant of the model, the product
    name may be "21M5" or "21M6".
    
    The following patch fixed this issue for the 21M5 variant:
      https://lore.kernel.org/all/20240725065442.9293-1-tiwai@suse.de/
    
    This patch adds support for the microphone on the 21M6 variant.
    
    Link: https://github.com/ramaureirac/thinkpad-e14-linux/issues/31
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Mizrahi <thomasmizra@gmail.com>
    Link: https://patch.msgid.link/20250308041303.198765-1-thomasmizra@gmail.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ASoC: arizona/madera: use fsleep() in up/down DAPM event delays. [+ + +]
Author: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Date:   Wed Feb 5 16:08:46 2025 +0000

    ASoC: arizona/madera: use fsleep() in up/down DAPM event delays.
    
    [ Upstream commit 679074942c2502a95842a80471d8fb718165ac77 ]
    
    Using `fsleep` instead of `msleep` resolves some customer complaints
    regarding the precision of up/down DAPM event timing. `fsleep()`
    automatically selects the appropriate sleep function, making the delay
    time more predictable.
    
    Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
    Link: https://patch.msgid.link/20250205160849.500306-1-vitalyr@opensource.cirrus.com
    Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe() [+ + +]
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date:   Mon Mar 10 18:45:36 2025 +0100

    ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe()
    
    [ Upstream commit ed92bc5264c4357d4fca292c769ea9967cd3d3b6 ]
    
    Free some resources in the error handling path of the probe, as already
    done in the remove function.
    
    Fixes: e3523e01869d ("ASoC: wm0010: Add initial wm0010 DSP driver")
    Fixes: fd8b96574456 ("ASoC: wm0010: Clear IRQ as wake source and include missing header")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
    Link: https://patch.msgid.link/5139ba1ab8c4c157ce04e56096a0f54a1683195c.1741549792.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: cs42l43: Fix maximum ADC Volume [+ + +]
Author: Charles Keepax <ckeepax@opensource.cirrus.com>
Date:   Thu Mar 6 13:32:54 2025 +0000

    ASoC: cs42l43: Fix maximum ADC Volume
    
    [ Upstream commit e26f1cfeac6712516bfeed80890da664f4f2e88a ]
    
    The range of ADC volume is -1 -> 3 (-6 to 18dB) so the number of levels
    should actually be 4.
    
    Fixes: fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43")
    Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
    Link: https://patch.msgid.link/20250306133254.1861046-1-ckeepax@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: dapm-graph: set fill colour of turned on nodes [+ + +]
Author: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Date:   Fri Feb 21 21:39:32 2025 +0100

    ASoC: dapm-graph: set fill colour of turned on nodes
    
    [ Upstream commit d31babd7e304d3b800d36ff74be6739405b985f2 ]
    
    Some tools like KGraphViewer interpret the "ON" nodes not having an
    explicitly set fill colour as them being entirely black, which obscures
    the text on them and looks funny. In fact, I thought they were off for
    the longest time. Comparing to the output of the `dot` tool, I assume
    they are supposed to be white.
    
    Instead of speclawyering over who's in the wrong and must immediately
    atone for their wickedness at the altar of RFC2119, just be explicit
    about it, set the fillcolor to white, and nobody gets confused.
    
    Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
    Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
    Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
    Link: https://patch.msgid.link/20250221-dapm-graph-node-colour-v1-1-514ed0aa7069@collabora.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: Intel: soc-acpi-intel-mtl-match: declare adr as ull [+ + +]
Author: Bard Liao <yung-chuan.liao@linux.intel.com>
Date:   Tue Feb 4 11:31:34 2025 +0800

    ASoC: Intel: soc-acpi-intel-mtl-match: declare adr as ull
    
    [ Upstream commit 20efccc53abf99fa52ea30a43dec758f6b6b9940 ]
    
    The adr is u64.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
    Link: https://patch.msgid.link/20250204033134.92332-3-yung-chuan.liao@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: Intel: sof_sdw: Add lookup of quirk using PCI subsystem ID [+ + +]
Author: Richard Fitzgerald <rf@opensource.cirrus.com>
Date:   Tue Feb 4 13:39:41 2025 +0800

    ASoC: Intel: sof_sdw: Add lookup of quirk using PCI subsystem ID
    
    [ Upstream commit fc016ef7da64fd473d73ee6c261ba1b0b47afe2b ]
    
    Add lookup of PCI subsystem vendor:device ID to find a quirk.
    
    The subsystem ID (SSID) is part of the PCI specification to uniquely
    identify a particular system-specific implementation of a hardware
    device.
    
    Unlike DMI information, it identifies the sound hardware itself, rather
    than a specific model of PC. SSID can be more reliable and stable than
    DMI strings, and is preferred by some vendors as the way to identify
    the actual sound hardware.
    
    Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Link: https://patch.msgid.link/20250204053943.93596-2-yung-chuan.liao@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: Intel: sof_sdw: Add quirk for Asus Zenbook S14 [+ + +]
Author: Richard Fitzgerald <rf@opensource.cirrus.com>
Date:   Tue Feb 4 13:39:42 2025 +0800

    ASoC: Intel: sof_sdw: Add quirk for Asus Zenbook S14
    
    [ Upstream commit 0843449708085c4fb45a3c325c2fbced556f6abf ]
    
    Asus laptops with sound PCI subsystem ID 1043:1e13 have the DMICs
    connected to the host instead of the CS42L43 so need the
    SOC_SDW_CODEC_MIC quirk.
    
    Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Link: https://patch.msgid.link/20250204053943.93596-3-yung-chuan.liao@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: Intel: sof_sdw: Add support for Fatcat board with BT offload enabled in PTL platform [+ + +]
Author: Uday M Bhat <uday.m.bhat@intel.com>
Date:   Tue Feb 4 13:39:43 2025 +0800

    ASoC: Intel: sof_sdw: Add support for Fatcat board with BT offload enabled in PTL platform
    
    [ Upstream commit d8989106287d3735c7e7fc6acb3811d62ebb666c ]
    
        This change adds an entry for fatcat boards in soundwire quirk table
        and also, enables BT offload for PTL RVP.
    
    Signed-off-by: Uday M Bhat <uday.m.bhat@intel.com>
    Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
    Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Link: https://patch.msgid.link/20250204053943.93596-4-yung-chuan.liao@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: Intel: sof_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks() [+ + +]
Author: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Date:   Mon Mar 3 14:55:52 2025 +0800

    ASoC: Intel: sof_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
    
    commit 4363f02a39e25e80e68039b4323c570b0848ec66 upstream.
    
    Initialize current_be_id to 0 to handle the unlikely case when there are
    no devices connected to a DAI.
    In this case create_sdw_dailink() would return without touching the passed
    pointer to current_be_id.
    
    Found by gcc -fanalyzer
    
    Fixes: 59bf457d8055 ("ASoC: intel: sof_sdw: Factor out SoundWire DAI creation")
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Link: https://patch.msgid.link/20250303065552.78328-1-yung-chuan.liao@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ASoC: ops: Consistently treat platform_max as control value [+ + +]
Author: Charles Keepax <ckeepax@opensource.cirrus.com>
Date:   Fri Feb 28 15:14:56 2025 +0000

    ASoC: ops: Consistently treat platform_max as control value
    
    [ Upstream commit 0eba2a7e858907a746ba69cd002eb9eb4dbd7bf3 ]
    
    This reverts commit 9bdd10d57a88 ("ASoC: ops: Shift tested values in
    snd_soc_put_volsw() by +min"), and makes some additional related
    updates.
    
    There are two ways the platform_max could be interpreted; the maximum
    register value, or the maximum value the control can be set to. The
    patch moved from treating the value as a control value to a register
    one. When the patch was applied it was technically correct as
    snd_soc_limit_volume() also used the register interpretation. However,
    even then most of the other usages treated platform_max as a
    control value, and snd_soc_limit_volume() has since been updated to
    also do so in commit fb9ad24485087 ("ASoC: ops: add correct range
    check for limiting volume"). That patch however, missed updating
    snd_soc_put_volsw() back to the control interpretation, and fixing
    snd_soc_info_volsw_range(). The control interpretation makes more
    sense as limiting is typically done from the machine driver, so it is
    appropriate to use the customer facing representation rather than the
    internal codec representation. Update all the code to consistently use
    this interpretation of platform_max.
    
    Finally, also add some comments to the soc_mixer_control struct to
    hopefully avoid further patches switching between the two approaches.
    
    Fixes: fb9ad24485087 ("ASoC: ops: add correct range check for limiting volume")
    Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
    Link: https://patch.msgid.link/20250228151456.3703342-1-ckeepax@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: rsnd: adjust convert rate limitation [+ + +]
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Wed Feb 5 00:20:48 2025 +0000

    ASoC: rsnd: adjust convert rate limitation
    
    [ Upstream commit 89f9cf185885d4358aa92b48e51d0f09b71775aa ]
    
    Current rsnd driver supports Synchronous SRC Mode, but HW allow to update
    rate only within 1% from current rate. Adjust to it.
    
    Becially, this feature is used to fine-tune subtle difference that occur
    during sampling rate conversion in SRC. So, it should be called within 1%
    margin of rate difference.
    
    If there was difference over 1%, it will apply with 1% increments by using
    loop without indicating error message.
    
    Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Link: https://patch.msgid.link/871pwd2qe8.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: rsnd: don't indicate warning on rsnd_kctrl_accept_runtime() [+ + +]
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Wed Feb 5 00:20:42 2025 +0000

    ASoC: rsnd: don't indicate warning on rsnd_kctrl_accept_runtime()
    
    [ Upstream commit c3fc002b206c6c83d1e3702b979733002ba6fb2c ]
    
    rsnd_kctrl_accept_runtime() (1) is used for runtime convert rate
    (= Synchronous SRC Mode). Now, rsnd driver has 2 kctrls for it
    
    (A):    "SRC Out Rate Switch"
    (B):    "SRC Out Rate"          // it calls (1)
    
    (A): can be called anytime
    (B): can be called only runtime, and will indicate warning if it was used
       at non-runtime.
    
    To use runtime convert rate (= Synchronous SRC Mode), user might uses
    command in below order.
    
    (X):    > amixer set "SRC Out Rate" on
            > aplay xxx.wav &
    (Y):    > amixer set "SRC Out Rate" 48010 // convert rate to 48010Hz
    
    (Y): calls B
    (X): calls both A and B.
    
    In this case, when user calls (X), it calls both (A) and (B), but it is not
    yet start running. So, (B) will indicate warning.
    
    This warning was added by commit b5c088689847 ("ASoC: rsnd: add warning
    message to rsnd_kctrl_accept_runtime()"), but the message sounds like the
    operation was not correct. Let's update warning message.
    
    The message is very SRC specific, implement it in src.c
    
    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Link: https://patch.msgid.link/8734gt2qed.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: rsnd: indicate unsupported clock rate [+ + +]
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Wed Feb 5 00:20:36 2025 +0000

    ASoC: rsnd: indicate unsupported clock rate
    
    [ Upstream commit 796106e29e5df6cd4b4e2b51262a8a19e9fa0625 ]
    
    It will indicate "unsupported clock rate" when setup clock failed.
    But it is unclear what kind of rate was failed. Indicate it.
    
    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Link: https://patch.msgid.link/874j192qej.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: rt722-sdca: add missing readable registers [+ + +]
Author: Bard Liao <yung-chuan.liao@linux.intel.com>
Date:   Mon Mar 10 16:04:40 2025 +0800

    ASoC: rt722-sdca: add missing readable registers
    
    [ Upstream commit 247fba13416af65b155949bae582d55c310f58b6 ]
    
    SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15,
    RT722_SDCA_CTL_FU_CH_GAIN, CH_01) ... SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY,
    RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN, CH_04) are used by the
    "FU15 Boost Volume" control, but not marked as readable.
    And the mbq size are 2 for those registers.
    
    Fixes: 7f5d6036ca005 ("ASoC: rt722-sdca: Add RT722 SDCA driver")
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
    Reviewed-by: Shuming Fan <shumingf@realtek.com>
    Link: https://patch.msgid.link/20250310080440.58797-1-yung-chuan.liao@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: simple-card-utils.c: add missing dlc->of_node [+ + +]
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Tue Feb 4 23:50:08 2025 +0000

    ASoC: simple-card-utils.c: add missing dlc->of_node
    
    [ Upstream commit dabbd325b25edb5cdd99c94391817202dd54b651 ]
    
    commit 90de551c1bf ("ASoC: simple-card-utils.c: enable multi Component
    support") added muiti Component support, but was missing to add
    dlc->of_node. Because of it, Sound device list will indicates strange
    name if it was DPCM connection and driver supports dai->driver->dai_args,
    like below
    
            > aplay -l
            card X: sndulcbmix [xxxx], device 0: fe.(null).rsnd-dai.0 (*) []
            ...                                     ^^^^^^
    
    It will be fixed by this patch
    
            > aplay -l
            card X: sndulcbmix [xxxx], device 0: fe.sound@ec500000.rsnd-dai.0 (*) []
            ...                                     ^^^^^^^^^^^^^^
    
    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
    Link: https://patch.msgid.link/87ikpp2rtb.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: SOF: amd: Add post_fw_run_delay ACP quirk [+ + +]
Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Date:   Fri Feb 7 13:46:02 2025 +0200

    ASoC: SOF: amd: Add post_fw_run_delay ACP quirk
    
    [ Upstream commit 91b98d5a6e8067c5226207487681a48f0d651e46 ]
    
    Stress testing resume from suspend on Valve Steam Deck OLED (Galileo)
    revealed that the DSP firmware could enter an unrecoverable faulty
    state, where the kernel ring buffer is flooded with IPC related error
    messages:
    
    [  +0.017002] snd_sof_amd_vangogh 0000:04:00.5: acp_sof_ipc_send_msg: Failed to acquire HW lock
    [  +0.000054] snd_sof_amd_vangogh 0000:04:00.5: ipc3_tx_msg_unlocked: ipc message send for 0x30100000 failed: -22
    [  +0.000005] snd_sof_amd_vangogh 0000:04:00.5: Failed to setup widget PIPELINE.6.ACPHS1.IN
    [  +0.000004] snd_sof_amd_vangogh 0000:04:00.5: Failed to restore pipeline after resume -22
    [  +0.000003] snd_sof_amd_vangogh 0000:04:00.5: PM: dpm_run_callback(): pci_pm_resume returns -22
    [  +0.000009] snd_sof_amd_vangogh 0000:04:00.5: PM: failed to resume async: error -22
    [...]
    [  +0.002582] PM: suspend exit
    [  +0.065085] snd_sof_amd_vangogh 0000:04:00.5: ipc tx error for 0x30130000 (msg/reply size: 12/0): -22
    [  +0.000499] snd_sof_amd_vangogh 0000:04:00.5: error: failed widget list set up for pcm 1 dir 0
    [  +0.000011] snd_sof_amd_vangogh 0000:04:00.5: error: set pcm hw_params after resume
    [  +0.000006] snd_sof_amd_vangogh 0000:04:00.5: ASoC: error at snd_soc_pcm_component_prepare on 0000:04:00.5: -22
    [...]
    
    A system reboot would be necessary to restore the speakers
    functionality.
    
    However, by delaying a bit any host to DSP transmission right after
    the firmware boot completed, the issue could not be reproduced anymore
    and sound continued to work flawlessly even after performing thousands
    of suspend/resume cycles.
    
    Introduce the post_fw_run_delay ACP quirk to allow providing the
    aforementioned delay via the snd_sof_dsp_ops->post_fw_run() callback for
    the affected devices.
    
    Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
    Link: https://patch.msgid.link/20250207-sof-vangogh-fixes-v1-1-67824c1e4c9a@collabora.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: SOF: amd: Handle IPC replies before FW_BOOT_COMPLETE [+ + +]
Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Date:   Fri Feb 7 13:46:04 2025 +0200

    ASoC: SOF: amd: Handle IPC replies before FW_BOOT_COMPLETE
    
    [ Upstream commit ac84ca815adb4171a4276b1d44096b75f6a150b7 ]
    
    In some cases, e.g. during resuming from suspend, there is a possibility
    that some IPC reply messages get received by the host while the DSP
    firmware has not yet reached the complete boot state.
    
    Detect when this happens and do not attempt to process the unexpected
    replies from DSP.  Instead, provide proper debugging support.
    
    Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
    Link: https://patch.msgid.link/20250207-sof-vangogh-fixes-v1-3-67824c1e4c9a@collabora.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: SOF: Intel: don't check number of sdw links when set dmic_fixup [+ + +]
Author: Bard Liao <yung-chuan.liao@linux.intel.com>
Date:   Tue Feb 25 17:37:15 2025 +0800

    ASoC: SOF: Intel: don't check number of sdw links when set dmic_fixup
    
    [ Upstream commit 56a677293509b2a0d39ac8d02b583c1ab1fe4d94 ]
    
    Currently, we assume that the PCH DMIC pins are pin-muxed with SoundWire
    links. However, we do see a HW design that use PCH DMIC along with 3
    SoundWire links. Remove the check now.
    With this change the PCM DMIC will be presented if it is reported by the
    BIOS irrespective of whether there are SDW links present or not.
    
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
    Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Link: https://patch.msgid.link/20250225093716.67240-2-yung-chuan.liao@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: SOF: Intel: hda: add softdep pre to snd-hda-codec-hdmi module [+ + +]
Author: Terry Cheong <htcheong@chromium.org>
Date:   Thu Feb 6 11:47:23 2025 +0200

    ASoC: SOF: Intel: hda: add softdep pre to snd-hda-codec-hdmi module
    
    [ Upstream commit 33b7dc7843dbdc9b90c91d11ba30b107f9138ffd ]
    
    In enviornment without KMOD requesting module may fail to load
    snd-hda-codec-hdmi, resulting in HDMI audio not usable.
    Add softdep to loading HDMI codec module first to ensure we can load it
    correctly.
    
    Signed-off-by: Terry Cheong <htcheong@chromium.org>
    Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Reviewed-by: Johny Lin <lpg76627@gmail.com>
    Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Link: https://patch.msgid.link/20250206094723.18013-1-peter.ujfalusi@linux.intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: SOF: Intel: pci-ptl: Add support for PTL-H [+ + +]
Author: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Date:   Mon Feb 10 10:17:29 2025 +0200

    ASoC: SOF: Intel: pci-ptl: Add support for PTL-H
    
    [ Upstream commit 4e9c87cfcd0584f2a2e2f352a43ff003d688f3a4 ]
    
    PTL-H uses the same configuration as PTL.
    
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
    Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Acked-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Link: https://patch.msgid.link/20250210081730.22916-4-peter.ujfalusi@linux.intel.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: tas2764: Fix power control mask [+ + +]
Author: Hector Martin <marcan@marcan.st>
Date:   Tue Feb 18 18:35:35 2025 +1000

    ASoC: tas2764: Fix power control mask
    
    [ Upstream commit a3f172359e22b2c11b750d23560481a55bf86af1 ]
    
    Reviewed-by: Neal Gompa <neal@gompa.dev>
    Signed-off-by: Hector Martin <marcan@marcan.st>
    Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
    Link: https://patch.msgid.link/20250218-apple-codec-changes-v2-1-932760fd7e07@gmail.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: tas2764: Set the SDOUT polarity correctly [+ + +]
Author: Hector Martin <marcan@marcan.st>
Date:   Tue Feb 18 18:36:02 2025 +1000

    ASoC: tas2764: Set the SDOUT polarity correctly
    
    [ Upstream commit f5468beeab1b1adfc63c2717b1f29ef3f49a5fab ]
    
    TX launch polarity needs to be the opposite of RX capture polarity, to
    generate the right bit slot alignment.
    
    Reviewed-by: Neal Gompa <neal@gompa.dev>
    Signed-off-by: Hector Martin <marcan@marcan.st>
    Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
    Link: https://patch.msgid.link/20250218-apple-codec-changes-v2-28-932760fd7e07@gmail.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: tas2770: Fix volume scale [+ + +]
Author: Hector Martin <marcan@marcan.st>
Date:   Sat Feb 8 00:54:35 2025 +0000

    ASoC: tas2770: Fix volume scale
    
    [ Upstream commit 579cd64b9df8a60284ec3422be919c362de40e41 ]
    
    The scale starts at -100dB, not -128dB.
    
    Signed-off-by: Hector Martin <marcan@marcan.st>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Link: https://patch.msgid.link/20250208-asoc-tas2770-v1-1-cf50ff1d59a3@kernel.org
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: tegra: Fix ADX S24_LE audio format [+ + +]
Author: Thorsten Blum <thorsten.blum@linux.dev>
Date:   Sat Feb 22 23:56:59 2025 +0100

    ASoC: tegra: Fix ADX S24_LE audio format
    
    commit 3d6c9dd4cb3013fe83524949b914f1497855e3de upstream.
    
    Commit 4204eccc7b2a ("ASoC: tegra: Add support for S24_LE audio format")
    added support for the S24_LE audio format, but duplicated S16_LE in
    OUT_DAI() for ADX instead.
    
    Fix this by adding support for the S24_LE audio format.
    
    Compile-tested only.
    
    Cc: stable@vger.kernel.org
    Fixes: 4204eccc7b2a ("ASoC: tegra: Add support for S24_LE audio format")
    Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
    Link: https://patch.msgid.link/20250222225700.539673-2-thorsten.blum@linux.dev
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
block: change blk_mq_add_to_batch() third argument type to bool [+ + +]
Author: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Date:   Tue Mar 11 19:43:59 2025 +0900

    block: change blk_mq_add_to_batch() third argument type to bool
    
    [ Upstream commit 9bce6b5f8987678b9c6c1fe433af6b5fe41feadc ]
    
    Commit 1f47ed294a2b ("block: cleanup and fix batch completion adding
    conditions") modified the evaluation criteria for the third argument,
    'ioerror', in the blk_mq_add_to_batch() function. Initially, the
    function had checked if 'ioerror' equals zero. Following the commit, it
    started checking for negative error values, with the presumption that
    such values, for instance -EIO, would be passed in.
    
    However, blk_mq_add_to_batch() callers do not pass negative error
    values. Instead, they pass status codes defined in various ways:
    
    - NVMe PCI and Apple drivers pass NVMe status code
    - virtio_blk driver passes the virtblk request header status byte
    - null_blk driver passes blk_status_t
    
    These codes are either zero or positive, therefore the revised check
    fails to function as intended. Specifically, with the NVMe PCI driver,
    this modification led to the failure of the blktests test case nvme/039.
    In this test scenario, errors are artificially injected to the NVMe
    driver, resulting in positive NVMe status codes passed to
    blk_mq_add_to_batch(), which unexpectedly processes the failed I/O in a
    batch. Hence the failure.
    
    To correct the ioerror check within blk_mq_add_to_batch(), make all
    callers to uniformly pass the argument as boolean. Modify the callers to
    check their specific status codes and pass the boolean value 'is_error'.
    Also describe the arguments of blK_mq_add_to_batch as kerneldoc.
    
    Fixes: 1f47ed294a2b ("block: cleanup and fix batch completion adding conditions")
    Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
    Link: https://lore.kernel.org/r/20250311104359.1767728-3-shinichiro.kawasaki@wdc.com
    [axboe: fold in documentation update]
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

block: fix 'kmem_cache of name 'bio-108' already exists' [+ + +]
Author: Ming Lei <ming.lei@redhat.com>
Date:   Fri Feb 28 21:26:56 2025 +0800

    block: fix 'kmem_cache of name 'bio-108' already exists'
    
    [ Upstream commit b654f7a51ffb386131de42aa98ed831f8c126546 ]
    
    Device mapper bioset often has big bio_slab size, which can be more than
    1000, then 8byte can't hold the slab name any more, cause the kmem_cache
    allocation warning of 'kmem_cache of name 'bio-108' already exists'.
    
    Fix the warning by extending bio_slab->name to 12 bytes, but fix output
    of /proc/slabinfo
    
    Reported-by: Guangwu Zhang <guazhang@redhat.com>
    Signed-off-by: Ming Lei <ming.lei@redhat.com>
    Link: https://lore.kernel.org/r/20250228132656.2838008-1-ming.lei@redhat.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Bluetooth: hci_event: Fix enabling passive scanning [+ + +]
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Fri Feb 28 13:12:54 2025 -0500

    Bluetooth: hci_event: Fix enabling passive scanning
    
    [ Upstream commit 0bdd88971519cfa8a76d1a4dde182e74cfbd5d5c ]
    
    Passive scanning shall only be enabled when disconnecting LE links,
    otherwise it may start result in triggering scanning when e.g. an ISO
    link disconnects:
    
    > HCI Event: LE Meta Event (0x3e) plen 29
          LE Connected Isochronous Stream Established (0x19)
            Status: Success (0x00)
            Connection Handle: 257
            CIG Synchronization Delay: 0 us (0x000000)
            CIS Synchronization Delay: 0 us (0x000000)
            Central to Peripheral Latency: 10000 us (0x002710)
            Peripheral to Central Latency: 10000 us (0x002710)
            Central to Peripheral PHY: LE 2M (0x02)
            Peripheral to Central PHY: LE 2M (0x02)
            Number of Subevents: 1
            Central to Peripheral Burst Number: 1
            Peripheral to Central Burst Number: 1
            Central to Peripheral Flush Timeout: 2
            Peripheral to Central Flush Timeout: 2
            Central to Peripheral MTU: 320
            Peripheral to Central MTU: 160
            ISO Interval: 10.00 msec (0x0008)
    ...
    > HCI Event: Disconnect Complete (0x05) plen 4
            Status: Success (0x00)
            Handle: 257
            Reason: Remote User Terminated Connection (0x13)
    < HCI Command: LE Set Extended Scan Enable (0x08|0x0042) plen 6
            Extended scan: Enabled (0x01)
            Filter duplicates: Enabled (0x01)
            Duration: 0 msec (0x0000)
            Period: 0.00 sec (0x0000)
    
    Fixes: 9fcb18ef3acb ("Bluetooth: Introduce LE auto connect options")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Bluetooth: L2CAP: Fix corrupted list in hci_chan_del [+ + +]
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Thu Feb 6 15:54:45 2025 -0500

    Bluetooth: L2CAP: Fix corrupted list in hci_chan_del
    
    commit ab4eedb790cae44313759b50fe47da285e2519d5 upstream.
    
    This fixes the following trace by reworking the locking of l2cap_conn
    so instead of only locking when changing the chan_l list this promotes
    chan_lock to a general lock of l2cap_conn so whenever it is being held
    it would prevents the likes of l2cap_conn_del to run:
    
    list_del corruption, ffff888021297e00->prev is LIST_POISON2 (dead000000000122)
    ------------[ cut here ]------------
    kernel BUG at lib/list_debug.c:61!
    Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
    CPU: 1 UID: 0 PID: 5896 Comm: syz-executor213 Not tainted 6.14.0-rc1-next-20250204-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
    RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59
    Code: 8c 4c 89 fe 48 89 da e8 32 8c 37 fc 90 0f 0b 48 89 df e8 27 9f 14 fd 48 c7 c7 a0 c0 60 8c 4c 89 fe 48 89 da e8 15 8c 37 fc 90 <0f> 0b 4c 89 e7 e8 0a 9f 14 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 cb
    RSP: 0018:ffffc90003f6f998 EFLAGS: 00010246
    RAX: 000000000000004e RBX: dead000000000122 RCX: 01454d423f7fbf00
    RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
    RBP: dffffc0000000000 R08: ffffffff819f077c R09: 1ffff920007eded0
    R10: dffffc0000000000 R11: fffff520007eded1 R12: dead000000000122
    R13: dffffc0000000000 R14: ffff8880352248d8 R15: ffff888021297e00
    FS:  00007f7ace6686c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f7aceeeb1d0 CR3: 000000003527c000 CR4: 00000000003526f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     <TASK>
     __list_del_entry_valid include/linux/list.h:124 [inline]
     __list_del_entry include/linux/list.h:215 [inline]
     list_del_rcu include/linux/rculist.h:168 [inline]
     hci_chan_del+0x70/0x1b0 net/bluetooth/hci_conn.c:2858
     l2cap_conn_free net/bluetooth/l2cap_core.c:1816 [inline]
     kref_put include/linux/kref.h:65 [inline]
     l2cap_conn_put+0x70/0xe0 net/bluetooth/l2cap_core.c:1830
     l2cap_sock_shutdown+0xa8a/0x1020 net/bluetooth/l2cap_sock.c:1377
     l2cap_sock_release+0x79/0x1d0 net/bluetooth/l2cap_sock.c:1416
     __sock_release net/socket.c:642 [inline]
     sock_close+0xbc/0x240 net/socket.c:1393
     __fput+0x3e9/0x9f0 fs/file_table.c:448
     task_work_run+0x24f/0x310 kernel/task_work.c:227
     ptrace_notify+0x2d2/0x380 kernel/signal.c:2522
     ptrace_report_syscall include/linux/ptrace.h:415 [inline]
     ptrace_report_syscall_exit include/linux/ptrace.h:477 [inline]
     syscall_exit_work+0xc7/0x1d0 kernel/entry/common.c:173
     syscall_exit_to_user_mode_prepare kernel/entry/common.c:200 [inline]
     __syscall_exit_to_user_mode_work kernel/entry/common.c:205 [inline]
     syscall_exit_to_user_mode+0x24a/0x340 kernel/entry/common.c:218
     do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    RIP: 0033:0x7f7aceeaf449
    Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007f7ace668218 EFLAGS: 00000246 ORIG_RAX: 000000000000002a
    RAX: fffffffffffffffc RBX: 00007f7acef39328 RCX: 00007f7aceeaf449
    RDX: 000000000000000e RSI: 0000000020000100 RDI: 0000000000000004
    RBP: 00007f7acef39320 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
    R13: 0000000000000004 R14: 00007f7ace668670 R15: 000000000000000b
     </TASK>
    Modules linked in:
    ---[ end trace 0000000000000000 ]---
    RIP: 0010:__list_del_entry_valid_or_report+0x12c/0x190 lib/list_debug.c:59
    Code: 8c 4c 89 fe 48 89 da e8 32 8c 37 fc 90 0f 0b 48 89 df e8 27 9f 14 fd 48 c7 c7 a0 c0 60 8c 4c 89 fe 48 89 da e8 15 8c 37 fc 90 <0f> 0b 4c 89 e7 e8 0a 9f 14 fd 42 80 3c 2b 00 74 08 4c 89 e7 e8 cb
    RSP: 0018:ffffc90003f6f998 EFLAGS: 00010246
    RAX: 000000000000004e RBX: dead000000000122 RCX: 01454d423f7fbf00
    RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
    RBP: dffffc0000000000 R08: ffffffff819f077c R09: 1ffff920007eded0
    R10: dffffc0000000000 R11: fffff520007eded1 R12: dead000000000122
    R13: dffffc0000000000 R14: ffff8880352248d8 R15: ffff888021297e00
    FS:  00007f7ace6686c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f7acef05b08 CR3: 000000003527c000 CR4: 00000000003526f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    
    Reported-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com
    Tested-by: syzbot+10bd8fe6741eedd2be2e@syzkaller.appspotmail.com
    Fixes: b4f82f9ed43a ("Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd [+ + +]
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Thu Jan 16 10:35:03 2025 -0500

    Bluetooth: L2CAP: Fix slab-use-after-free Read in l2cap_send_cmd
    
    [ Upstream commit b4f82f9ed43aefa79bec2504ae8c29be0c0f5d1d ]
    
    After the hci sync command releases l2cap_conn, the hci receive data work
    queue references the released l2cap_conn when sending to the upper layer.
    Add hci dev lock to the hci receive data work queue to synchronize the two.
    
    [1]
    BUG: KASAN: slab-use-after-free in l2cap_send_cmd+0x187/0x8d0 net/bluetooth/l2cap_core.c:954
    Read of size 8 at addr ffff8880271a4000 by task kworker/u9:2/5837
    
    CPU: 0 UID: 0 PID: 5837 Comm: kworker/u9:2 Not tainted 6.13.0-rc5-syzkaller-00163-gab75170520d4 #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
    Workqueue: hci1 hci_rx_work
    Call Trace:
     <TASK>
     __dump_stack lib/dump_stack.c:94 [inline]
     dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
     print_address_description mm/kasan/report.c:378 [inline]
     print_report+0x169/0x550 mm/kasan/report.c:489
     kasan_report+0x143/0x180 mm/kasan/report.c:602
     l2cap_build_cmd net/bluetooth/l2cap_core.c:2964 [inline]
     l2cap_send_cmd+0x187/0x8d0 net/bluetooth/l2cap_core.c:954
     l2cap_sig_send_rej net/bluetooth/l2cap_core.c:5502 [inline]
     l2cap_sig_channel net/bluetooth/l2cap_core.c:5538 [inline]
     l2cap_recv_frame+0x221f/0x10db0 net/bluetooth/l2cap_core.c:6817
     hci_acldata_packet net/bluetooth/hci_core.c:3797 [inline]
     hci_rx_work+0x508/0xdb0 net/bluetooth/hci_core.c:4040
     process_one_work kernel/workqueue.c:3229 [inline]
     process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310
     worker_thread+0x870/0xd30 kernel/workqueue.c:3391
     kthread+0x2f0/0x390 kernel/kthread.c:389
     ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
     </TASK>
    
    Allocated by task 5837:
     kasan_save_stack mm/kasan/common.c:47 [inline]
     kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
     poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
     __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394
     kasan_kmalloc include/linux/kasan.h:260 [inline]
     __kmalloc_cache_noprof+0x243/0x390 mm/slub.c:4329
     kmalloc_noprof include/linux/slab.h:901 [inline]
     kzalloc_noprof include/linux/slab.h:1037 [inline]
     l2cap_conn_add+0xa9/0x8e0 net/bluetooth/l2cap_core.c:6860
     l2cap_connect_cfm+0x115/0x1090 net/bluetooth/l2cap_core.c:7239
     hci_connect_cfm include/net/bluetooth/hci_core.h:2057 [inline]
     hci_remote_features_evt+0x68e/0xac0 net/bluetooth/hci_event.c:3726
     hci_event_func net/bluetooth/hci_event.c:7473 [inline]
     hci_event_packet+0xac2/0x1540 net/bluetooth/hci_event.c:7525
     hci_rx_work+0x3f3/0xdb0 net/bluetooth/hci_core.c:4035
     process_one_work kernel/workqueue.c:3229 [inline]
     process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310
     worker_thread+0x870/0xd30 kernel/workqueue.c:3391
     kthread+0x2f0/0x390 kernel/kthread.c:389
     ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
    
    Freed by task 54:
     kasan_save_stack mm/kasan/common.c:47 [inline]
     kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
     kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:582
     poison_slab_object mm/kasan/common.c:247 [inline]
     __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264
     kasan_slab_free include/linux/kasan.h:233 [inline]
     slab_free_hook mm/slub.c:2353 [inline]
     slab_free mm/slub.c:4613 [inline]
     kfree+0x196/0x430 mm/slub.c:4761
     l2cap_connect_cfm+0xcc/0x1090 net/bluetooth/l2cap_core.c:7235
     hci_connect_cfm include/net/bluetooth/hci_core.h:2057 [inline]
     hci_conn_failed+0x287/0x400 net/bluetooth/hci_conn.c:1266
     hci_abort_conn_sync+0x56c/0x11f0 net/bluetooth/hci_sync.c:5603
     hci_cmd_sync_work+0x22b/0x400 net/bluetooth/hci_sync.c:332
     process_one_work kernel/workqueue.c:3229 [inline]
     process_scheduled_works+0xa66/0x1840 kernel/workqueue.c:3310
     worker_thread+0x870/0xd30 kernel/workqueue.c:3391
     kthread+0x2f0/0x390 kernel/kthread.c:389
     ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
    
    Reported-by: syzbot+31c2f641b850a348a734@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=31c2f641b850a348a734
    Tested-by: syzbot+31c2f641b850a348a734@syzkaller.appspotmail.com
    Signed-off-by: Edward Adam Davis <eadavis@qq.com>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Bluetooth: SCO: fix sco_conn refcounting on sco_conn_ready [+ + +]
Author: Pauli Virtanen <pav@iki.fi>
Date:   Thu Feb 27 23:28:15 2025 +0200

    Bluetooth: SCO: fix sco_conn refcounting on sco_conn_ready
    
    [ Upstream commit 8d74c9106be8da051b22f0cd81e665f17d51ba5d ]
    
    sco_conn refcount shall not be incremented a second time if the sk
    already owns the refcount, so hold only when adding new chan.
    
    Add sco_conn_hold() for clarity, as refcnt is never zero here due to the
    sco_conn_add().
    
    Fixes SCO socket shutdown not actually closing the SCO connection.
    
    Fixes: ed9588554943 ("Bluetooth: SCO: remove the redundant sco_conn_put")
    Signed-off-by: Pauli Virtanen <pav@iki.fi>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
bonding: fix incorrect MAC address setting to receive NS messages [+ + +]
Author: Hangbin Liu <liuhangbin@gmail.com>
Date:   Thu Mar 6 02:39:22 2025 +0000

    bonding: fix incorrect MAC address setting to receive NS messages
    
    [ Upstream commit 0c5e145a350de3b38cd5ae77a401b12c46fb7c1d ]
    
    When validation on the backup slave is enabled, we need to validate the
    Neighbor Solicitation (NS) messages received on the backup slave. To
    receive these messages, the correct destination MAC address must be added
    to the slave. However, the target in bonding is a unicast address, which
    we cannot use directly. Instead, we should first convert it to a
    Solicited-Node Multicast Address and then derive the corresponding MAC
    address.
    
    Fix the incorrect MAC address setting on both slave_set_ns_maddr() and
    slave_set_ns_maddrs(). Since the two function names are similar. Add
    some description for the functions. Also only use one mac_addr variable
    in slave_set_ns_maddr() to save some code and logic.
    
    Fixes: 8eb36164d1a6 ("bonding: add ns target multicast address to slave device")
    Acked-by: Jay Vosburgh <jv@jvosburgh.net>
    Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20250306023923.38777-2-liuhangbin@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
btrfs: avoid starting new transaction when cleaning qgroup during subvolume drop [+ + +]
Author: Filipe Manana <fdmanana@suse.com>
Date:   Tue Jan 21 12:24:39 2025 +0000

    btrfs: avoid starting new transaction when cleaning qgroup during subvolume drop
    
    [ Upstream commit fdef89ce6fada462aef9cb90a140c93c8c209f0f ]
    
    At btrfs_qgroup_cleanup_dropped_subvolume() all we want to commit the
    current transaction in order to have all the qgroup rfer/excl numbers up
    to date. However we are using btrfs_start_transaction(), which joins the
    current transaction if there is one that is not yet committing, but also
    starts a new one if there is none or if the current one is already
    committing (its state is >= TRANS_STATE_COMMIT_START). This later case
    results in unnecessary IO, wasting time and a pointless rotation of the
    backup roots in the super block.
    
    So instead of using btrfs_start_transaction() followed by a
    btrfs_commit_transaction(), use btrfs_commit_current_transaction() which
    achieves our purpose and avoids starting and committing new transactions.
    
    Reviewed-by: Qu Wenruo <wqu@suse.com>
    Signed-off-by: Filipe Manana <fdmanana@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

btrfs: fix two misuses of folio_shift() [+ + +]
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
Date:   Tue Jan 21 05:40:51 2025 +0000

    btrfs: fix two misuses of folio_shift()
    
    [ Upstream commit 01af106a076352182b2916b143fc50272600bd81 ]
    
    It is meaningless to shift a byte count by folio_shift().  The folio index
    is in units of PAGE_SIZE, not folio_size().  We can use folio_contains()
    to make this work for arbitrary-order folios, so remove the assertion
    that the folios are of order 0.
    
    Reviewed-by: Qu Wenruo <wqu@suse.com>
    Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Reviewed-by: David Sterba <dsterba@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
cifs: Fix integer overflow while processing acdirmax mount option [+ + +]
Author: Murad Masimov <m.masimov@mt-integration.ru>
Date:   Tue Mar 11 17:22:04 2025 +0300

    cifs: Fix integer overflow while processing acdirmax mount option
    
    [ Upstream commit 5b29891f91dfb8758baf1e2217bef4b16b2b165b ]
    
    User-provided mount parameter acdirmax of type u32 is intended to have
    an upper limit, but before it is validated, the value is converted from
    seconds to jiffies which can lead to an integer overflow.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 4c9f948142a5 ("cifs: Add new mount parameter "acdirmax" to allow caching directory metadata")
    Signed-off-by: Murad Masimov <m.masimov@mt-integration.ru>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

cifs: Fix integer overflow while processing acregmax mount option [+ + +]
Author: Murad Masimov <m.masimov@mt-integration.ru>
Date:   Tue Mar 11 17:22:03 2025 +0300

    cifs: Fix integer overflow while processing acregmax mount option
    
    [ Upstream commit 7489161b1852390b4413d57f2457cd40b34da6cc ]
    
    User-provided mount parameter acregmax of type u32 is intended to have
    an upper limit, but before it is validated, the value is converted from
    seconds to jiffies which can lead to an integer overflow.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 5780464614f6 ("cifs: Add new parameter "acregmax" for distinct file and directory metadata timeout")
    Signed-off-by: Murad Masimov <m.masimov@mt-integration.ru>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

cifs: Fix integer overflow while processing actimeo mount option [+ + +]
Author: Murad Masimov <m.masimov@mt-integration.ru>
Date:   Tue Mar 11 17:22:05 2025 +0300

    cifs: Fix integer overflow while processing actimeo mount option
    
    [ Upstream commit 64f690ee22c99e16084e0e45181b2a1eed2fa149 ]
    
    User-provided mount parameter actimeo of type u32 is intended to have
    an upper limit, but before it is validated, the value is converted from
    seconds to jiffies which can lead to an integer overflow.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 6d20e8406f09 ("cifs: add attribute cache timeout (actimeo) tunable")
    Signed-off-by: Murad Masimov <m.masimov@mt-integration.ru>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

cifs: Fix integer overflow while processing closetimeo mount option [+ + +]
Author: Murad Masimov <m.masimov@mt-integration.ru>
Date:   Tue Mar 11 17:22:06 2025 +0300

    cifs: Fix integer overflow while processing closetimeo mount option
    
    [ Upstream commit d5a30fddfe2f2e540f6c43b59cf701809995faef ]
    
    User-provided mount parameter closetimeo of type u32 is intended to have
    an upper limit, but before it is validated, the value is converted from
    seconds to jiffies which can lead to an integer overflow.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: 5efdd9122eff ("smb3: allow deferred close timeout to be configurable")
    Signed-off-by: Murad Masimov <m.masimov@mt-integration.ru>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

cifs: Throw -EOPNOTSUPP error on unsupported reparse point type from parse_reparse_point() [+ + +]
Author: Pali Rohár <pali@kernel.org>
Date:   Wed Sep 18 00:16:05 2024 +0200

    cifs: Throw -EOPNOTSUPP error on unsupported reparse point type from parse_reparse_point()
    
    [ Upstream commit cad3fc0a4c8cef07b07ceddc137f582267577250 ]
    
    This would help to track and detect by caller if the reparse point type was
    processed or not.
    
    Signed-off-by: Pali Rohár <pali@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

cifs: Treat unhandled directory name surrogate reparse points as mount directory nodes [+ + +]
Author: Pali Rohár <pali@kernel.org>
Date:   Wed Sep 18 00:28:25 2024 +0200

    cifs: Treat unhandled directory name surrogate reparse points as mount directory nodes
    
    [ Upstream commit b587fd128660d48cd2122f870f720ff8e2b4abb3 ]
    
    If the reparse point was not handled (indicated by the -EOPNOTSUPP from
    ops->parse_reparse_point() call) but reparse tag is of type name surrogate
    directory type, then treat is as a new mount point.
    
    Name surrogate reparse point represents another named entity in the system.
    
    From SMB client point of view, this another entity is resolved on the SMB
    server, and server serves its content automatically. Therefore from Linux
    client point of view, this name surrogate reparse point of directory type
    crosses mount point.
    
    Signed-off-by: Pali Rohár <pali@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
clk: samsung: gs101: fix synchronous external abort in samsung_clk_save() [+ + +]
Author: Peter Griffin <peter.griffin@linaro.org>
Date:   Mon Mar 3 13:11:21 2025 +0000

    clk: samsung: gs101: fix synchronous external abort in samsung_clk_save()
    
    commit f2052a4a62465c0037aef7ea7426bffdb3531e41 upstream.
    
    EARLY_WAKEUP_SW_TRIG_*_SET and EARLY_WAKEUP_SW_TRIG_*_CLEAR
    registers are only writeable. Attempting to read these registers
    during samsung_clk_save() causes a synchronous external abort.
    
    Remove these 8 registers from cmu_top_clk_regs[] array so that
    system suspend gets further.
    
    Note: the code path can be exercised using the following command:
    echo mem > /sys/power/state
    
    Fixes: 2c597bb7d66a ("clk: samsung: clk-gs101: Add cmu_top, cmu_misc and cmu_apm support")
    Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20250303-clk-suspend-fix-v1-1-c2edaf66260f@linaro.org
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

clk: samsung: update PLL locktime for PLL142XX used on FSD platform [+ + +]
Author: Varada Pavani <v.pavani@samsung.com>
Date:   Tue Feb 25 18:49:18 2025 +0530

    clk: samsung: update PLL locktime for PLL142XX used on FSD platform
    
    commit 53517a70873c7a91675f7244768aad5006cc45de upstream.
    
    Currently PLL142XX locktime is 270. As per spec, it should be 150. Hence
    update PLL142XX controller locktime to 150.
    
    Cc: stable@vger.kernel.org
    Fixes: 4f346005aaed ("clk: samsung: fsd: Add initial clock support")
    Signed-off-by: Varada Pavani <v.pavani@samsung.com>
    Link: https://lore.kernel.org/r/20250225131918.50925-3-v.pavani@samsung.com
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
dm-flakey: Fix memory corruption in optional corrupt_bio_byte feature [+ + +]
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date:   Sat Mar 8 10:50:08 2025 -0500

    dm-flakey: Fix memory corruption in optional corrupt_bio_byte feature
    
    commit 57e9417f69839cb10f7ffca684c38acd28ceb57b upstream.
    
    Fix memory corruption due to incorrect parameter being passed to bio_init
    
    Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Cc: stable@vger.kernel.org      # v6.5+
    Fixes: 1d9a94389853 ("dm flakey: clone pages on write bio before corrupting them")
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Drivers: hv: vmbus: Don't release fb_mmio resource in vmbus_free_mmio() [+ + +]
Author: Michael Kelley <mhklinux@outlook.com>
Date:   Sun Mar 9 20:52:08 2025 -0700

    Drivers: hv: vmbus: Don't release fb_mmio resource in vmbus_free_mmio()
    
    [ Upstream commit 73fe9073c0cc28056cb9de0c8a516dac070f1d1f ]
    
    The VMBus driver manages the MMIO space it owns via the hyperv_mmio
    resource tree. Because the synthetic video framebuffer portion of the
    MMIO space is initially setup by the Hyper-V host for each guest, the
    VMBus driver does an early reserve of that portion of MMIO space in the
    hyperv_mmio resource tree. It saves a pointer to that resource in
    fb_mmio. When a VMBus driver requests MMIO space and passes "true"
    for the "fb_overlap_ok" argument, the reserved framebuffer space is
    used if possible. In that case it's not necessary to do another request
    against the "shadow" hyperv_mmio resource tree because that resource
    was already requested in the early reserve steps.
    
    However, the vmbus_free_mmio() function currently does no special
    handling for the fb_mmio resource. When a framebuffer device is
    removed, or the driver is unbound, the current code for
    vmbus_free_mmio() releases the reserved resource, leaving fb_mmio
    pointing to memory that has been freed. If the same or another
    driver is subsequently bound to the device, vmbus_allocate_mmio()
    checks against fb_mmio, and potentially gets garbage. Furthermore
    a second unbind operation produces this "nonexistent resource" error
    because of the unbalanced behavior between vmbus_allocate_mmio() and
    vmbus_free_mmio():
    
    [   55.499643] resource: Trying to free nonexistent
                            resource <0x00000000f0000000-0x00000000f07fffff>
    
    Fix this by adding logic to vmbus_free_mmio() to recognize when
    MMIO space in the fb_mmio reserved area would be released, and don't
    release it. This filtering ensures the fb_mmio resource always exists,
    and makes vmbus_free_mmio() more parallel with vmbus_allocate_mmio().
    
    Fixes: be000f93e5d7 ("drivers:hv: Track allocations of children of hv_vmbus in private resource tree")
    Signed-off-by: Michael Kelley <mhklinux@outlook.com>
    Tested-by: Saurabh Sengar <ssengar@linux.microsoft.com>
    Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
    Link: https://lore.kernel.org/r/20250310035208.275764-1-mhklinux@outlook.com
    Signed-off-by: Wei Liu <wei.liu@kernel.org>
    Message-ID: <20250310035208.275764-1-mhklinux@outlook.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/amd/amdkfd: Evict all queues even HWS remove queue failed [+ + +]
Author: Yifan Zha <Yifan.Zha@amd.com>
Date:   Wed Mar 5 13:14:55 2025 +0800

    drm/amd/amdkfd: Evict all queues even HWS remove queue failed
    
    commit 0882ca4eecfe8b0013f339144acf886a0a0de41f upstream.
    
    [Why]
    If reset is detected and kfd need to evict working queues, HWS moving queue will be failed.
    Then remaining queues are not evicted and in active state.
    
    After reset done, kfd uses HWS to termination remaining activated queues but HWS is resetted.
    So remove queue will be failed again.
    
    [How]
    Keep removing all queues even if HWS returns failed.
    It will not affect cpsch as it checks reset_domain->sem.
    
    v2: If any queue failed, evict queue returns error.
    v3: Declare err inside the if-block.
    
    Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
    Signed-off-by: Yifan Zha <Yifan.Zha@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 42c854b8fb0cce512534aa2b7141948e80c6ebb0)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/amd/display: Assign normalized_pix_clk when color depth = 14 [+ + +]
Author: Alex Hung <alex.hung@amd.com>
Date:   Thu Feb 27 16:36:25 2025 -0700

    drm/amd/display: Assign normalized_pix_clk when color depth = 14
    
    commit 79e31396fdd7037c503e6add15af7cb00633ea92 upstream.
    
    [WHY & HOW]
    A warning message "WARNING: CPU: 4 PID: 459 at ... /dc_resource.c:3397
    calculate_phy_pix_clks+0xef/0x100 [amdgpu]" occurs because the
    display_color_depth == COLOR_DEPTH_141414 is not handled. This is
    observed in Radeon RX 6600 XT.
    
    It is fixed by assigning pix_clk * (14 * 3) / 24 - same as the rests.
    
    Also fixes the indentation in get_norm_pix_clk.
    
    Reviewed-by: Harry Wentland <harry.wentland@amd.com>
    Signed-off-by: Alex Hung <alex.hung@amd.com>
    Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
    Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 274a87eb389f58eddcbc5659ab0b180b37e92775)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drm/amd/display: Disable unneeded hpd interrupts during dm_init [+ + +]
Author: Leo Li <sunpeng.li@amd.com>
Date:   Thu Feb 20 16:20:26 2025 -0500

    drm/amd/display: Disable unneeded hpd interrupts during dm_init
    
    commit 40b8c14936bd2726354c856251f6baed9869e760 upstream.
    
    [Why]
    
    It seems HPD interrupts are enabled by default for all connectors, even
    if the hpd source isn't valid. An eDP for example, does not have a valid
    hpd source (but does have a valid hpdrx source; see construct_phy()).
    Thus, eDPs should have their hpd interrupt disabled.
    
    In the past, this wasn't really an issue. Although the driver gets
    interrupted, then acks by writing to hw registers, there weren't any
    subscribed handlers that did anything meaningful (see
    register_hpd_handlers()).
    
    But things changed with the introduction of IPS. s2idle requires that
    the driver allows IPS for DMUB fw to put hw to sleep. Since register
    access requires hw to be awake, the driver will block IPS entry to do
    so. And no IPS means no hw sleep during s2idle.
    
    This was the observation on DCN35 systems with an eDP. During suspend,
    the eDP toggled its hpd pin as part of the panel power down sequence.
    The driver was then interrupted, and acked by writing to registers,
    blocking IPS entry.
    
    [How]
    
    Since DC marks eDP connections as having invalid hpd sources (see
    construct_phy()), DM should disable them at the hw level. Do so in
    amdgpu_dm_hpd_init() by disabling all hpd ints first, then selectively
    enabling ones for connectors that have valid hpd sources.
    
    Cc: Mario Limonciello <mario.limonciello@amd.com>
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Reviewed-by: Harry Wentland <harry.wentland@amd.com>
    Signed-off-by: Leo Li <sunpeng.li@amd.com>
    Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
    Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 7b1ba19eb15f88e70782642ce2d934211269337b)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drm/amd/display: fix default brightness [+ + +]
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Sat Feb 22 23:37:32 2025 -0600

    drm/amd/display: fix default brightness
    
    commit b5a981e1b34e44f94a5967f730fff4166f2101e8 upstream.
    
    [Why]
    To avoid flickering during boot default brightness level set by BIOS
    should be maintained for as much of the boot as feasible.
    commit 2fe87f54abdc ("drm/amd/display: Set default brightness according
    to ACPI") attempted to set the right levels for AC vs DC, but brightness
    still got reset to maximum level in initialization code for
    setup_backlight_device().
    
    [How]
    Remove the hardcoded initialization in setup_backlight_device() and
    instead program brightness value to match BIOS (AC or DC).  This avoids a
    brightness flicker from kernel changing the value.  Userspace may however
    still change it during boot.
    
    Fixes: 2fe87f54abdc ("drm/amd/display: Set default brightness according to ACPI")
    Acked-by: Wayne Lin <Wayne.Lin@amd.com>
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
    Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
    Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 0747acf3311229e22009bec4a9e7fc30c879e842)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drm/amd/display: fix missing .is_two_pixels_per_container [+ + +]
Author: Aliaksei Urbanski <aliaksei.urbanski@gmail.com>
Date:   Thu Mar 6 13:36:03 2025 +0300

    drm/amd/display: fix missing .is_two_pixels_per_container
    
    commit e204aab79e01bc8ff750645666993ed8b719de57 upstream.
    
    Starting from 6.11, AMDGPU driver, while being loaded with amdgpu.dc=1,
    due to lack of .is_two_pixels_per_container function in dce60_tg_funcs,
    causes a NULL pointer dereference on PCs with old GPUs, such as R9 280X.
    
    So this fix adds missing .is_two_pixels_per_container to dce60_tg_funcs.
    
    Reported-by: Rosen Penev <rosenp@gmail.com>
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3942
    Fixes: e6a901a00822 ("drm/amd/display: use even ODM slice width for two pixels per container")
    Signed-off-by: Aliaksei Urbanski <aliaksei.urbanski@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit bd4b125eb949785c6f8a53b0494e32795421209d)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drm/amd/display: Fix out-of-bound accesses [+ + +]
Author: Alex Hung <alex.hung@amd.com>
Date:   Fri Jan 17 12:37:11 2025 -0700

    drm/amd/display: Fix out-of-bound accesses
    
    [ Upstream commit 8adbb2a98b00926315fd513b5fe2596b5716b82d ]
    
    [WHAT & HOW]
    hpo_stream_to_link_encoder_mapping has size MAX_HPO_DP2_ENCODERS(=4),
    but location can have size up to 6. As a result, it is necessary to
    check location against MAX_HPO_DP2_ENCODERS.
    
    Similiarly, disp_cfg_stream_location can be used as an array index which
    should be 0..5, so the ASSERT's conditions should be less without equal.
    
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3904
    Reviewed-by: Austin Zheng <Austin.Zheng@amd.com>
    Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
    Signed-off-by: Alex Hung <alex.hung@amd.com>
    Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/amd/display: Fix slab-use-after-free on hdcp_work [+ + +]
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Fri Feb 28 13:18:14 2025 -0600

    drm/amd/display: Fix slab-use-after-free on hdcp_work
    
    commit e65e7bea220c3ce8c4c793b4ba35557f4994ab2b upstream.
    
    [Why]
    A slab-use-after-free is reported when HDCP is destroyed but the
    property_validate_dwork queue is still running.
    
    [How]
    Cancel the delayed work when destroying workqueue.
    
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4006
    Fixes: da3fd7ac0bcf ("drm/amd/display: Update CP property based on HW query")
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Reviewed-by: Alex Hung <alex.hung@amd.com>
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
    Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
    Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 725a04ba5a95e89c89633d4322430cfbca7ce128)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drm/amd/display: Restore correct backlight brightness after a GPU reset [+ + +]
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Sun Feb 23 00:04:35 2025 -0600

    drm/amd/display: Restore correct backlight brightness after a GPU reset
    
    commit 5760388d9681ac743038b846b9082b9023969551 upstream.
    
    [Why]
    GPU reset will attempt to restore cached state, but brightness doesn't
    get restored. It will come back at 100% brightness, but userspace thinks
    it's the previous value.
    
    [How]
    When running resume sequence if GPU is in reset restore brightness
    to previous value.
    
    Acked-by: Wayne Lin <Wayne.Lin@amd.com>
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
    Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
    Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 5e19e2b57b6bb640d68dfc7991e1e182922cf867)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/amdgpu/display: Allow DCC for video formats on GFX12 [+ + +]
Author: David Rosca <david.rosca@amd.com>
Date:   Thu Feb 13 15:30:37 2025 +0100

    drm/amdgpu/display: Allow DCC for video formats on GFX12
    
    commit df1e82e7acd3c50b65ca0e2e09089b78382d14ab upstream.
    
    We advertise DCC as supported for NV12/P010 formats on GFX12,
    but it would fail on this check on atomic commit.
    
    Signed-off-by: David Rosca <david.rosca@amd.com>
    Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit ba795235a2b99ba9bbef647ab003b2f3145d9bbb)
    Cc: stable@vger.kernel.org # 6.12.x
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/amdgpu/vce2: fix ip block reference [+ + +]
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Sun Mar 9 12:26:50 2025 -0400

    drm/amdgpu/vce2: fix ip block reference
    
    commit ded6ad4c6e2005e959ea09abba16c451433dd34b upstream.
    
    Need to use the correct IP block type.  VCE vs VCN.
    Fixes mclk issues on Hawaii.
    
    Suggested by selendym.
    
    Fixes: 82ae6619a450 ("drm/amdgpu: update the handle ptr in wait_for_idle")
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3997
    Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
    Cc: Sunil Khatri <sunil.khatri@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 02438acd252395628d74cfac692efbb676d21521)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/amdgpu: NULL-check BO's backing store when determining GFX12 PTE flags [+ + +]
Author: Natalie Vock <natalie.vock@gmx.de>
Date:   Mon Mar 10 18:08:05 2025 +0100

    drm/amdgpu: NULL-check BO's backing store when determining GFX12 PTE flags
    
    commit 6cc30748e17ea2a64051ceaf83a8372484e597f1 upstream.
    
    PRT BOs may not have any backing store, so bo->tbo.resource will be
    NULL. Check for that before dereferencing.
    
    Fixes: 0cce5f285d9a ("drm/amdkfd: Check correct memory types for is_system variable")
    Reviewed-by: Christian König <christian.koenig@amd.com>
    Signed-off-by: Natalie Vock <natalie.vock@gmx.de>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 3e3fcd29b505cebed659311337ea03b7698767fc)
    Cc: stable@vger.kernel.org # 6.12.x
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/atomic: Filter out redundant DPMS calls [+ + +]
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Wed Feb 19 18:02:39 2025 +0200

    drm/atomic: Filter out redundant DPMS calls
    
    commit de93ddf88088f7624b589d0ff3af9effb87e8f3b upstream.
    
    Video players (eg. mpv) do periodic XResetScreenSaver() calls to
    keep the screen on while the video playing. The modesetting ddx
    plumbs these straight through into the kernel as DPMS setproperty
    ioctls, without any filtering whatsoever. When implemented via
    atomic these end up as empty commits on the crtc (which will
    nonetheless take one full frame), which leads to a dropped
    frame every time XResetScreenSaver() is called.
    
    Let's just filter out redundant DPMS property changes in the
    kernel to avoid this issue.
    
    v2: Explain the resulting commits a bit better (Sima)
        Document the behaviour in uapi docs (Sima)
    
    Cc: stable@vger.kernel.org
    Testcase: igt/kms_flip/flip-vs-dpms-on-nop
    Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250219160239.17502-1-ville.syrjala@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/dp_mst: Fix locking when skipping CSN before topology probing [+ + +]
Author: Imre Deak <imre.deak@intel.com>
Date:   Fri Mar 7 20:31:52 2025 +0200

    drm/dp_mst: Fix locking when skipping CSN before topology probing
    
    commit 12d8f318347b1d4feac48e8ac351d3786af39599 upstream.
    
    The handling of the MST Connection Status Notify message is skipped if
    the probing of the topology is still pending. Acquiring the
    drm_dp_mst_topology_mgr::probe_lock for this in
    drm_dp_mst_handle_up_req() is problematic: the task/work this function
    is called from is also responsible for handling MST down-request replies
    (in drm_dp_mst_handle_down_rep()). Thus drm_dp_mst_link_probe_work() -
    holding already probe_lock - could be blocked waiting for an MST
    down-request reply while drm_dp_mst_handle_up_req() is waiting for
    probe_lock while processing a CSN message. This leads to the probe
    work's down-request message timing out.
    
    A scenario similar to the above leading to a down-request timeout is
    handling a CSN message in drm_dp_mst_handle_conn_stat(), holding the
    probe_lock and sending down-request messages while a second CSN message
    sent by the sink subsequently is handled by drm_dp_mst_handle_up_req().
    
    Fix the above by moving the logic to skip the CSN handling to
    drm_dp_mst_process_up_req(). This function is called from a work
    (separate from the task/work handling new up/down messages), already
    holding probe_lock. This solves the above timeout issue, since handling
    of down-request replies won't be blocked by probe_lock.
    
    Fixes: ddf983488c3e ("drm/dp_mst: Skip CSN if topology probing is not done yet")
    Cc: Wayne Lin <Wayne.Lin@amd.com>
    Cc: Lyude Paul <lyude@redhat.com>
    Cc: stable@vger.kernel.org # v6.6+
    Reviewed-by: Wayne Lin <Wayne.Lin@amd.com>
    Reviewed-by: Lyude Paul <lyude@redhat.com>
    Signed-off-by: Imre Deak <imre.deak@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250307183152.3822170-1-imre.deak@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data() [+ + +]
Author: Ivan Abramov <i.abramov@mt-integration.ru>
Date:   Thu Mar 6 14:20:45 2025 +0300

    drm/gma500: Add NULL check for pci_gfx_root in mid_get_vbt_data()
    
    [ Upstream commit 9af152dcf1a06f589f44a74da4ad67e365d4db9a ]
    
    Since pci_get_domain_bus_and_slot() can return NULL, add NULL check for
    pci_gfx_root in the mid_get_vbt_data().
    
    This change is similar to the checks implemented in mid_get_fuse_settings()
    and mid_get_pci_revID(), which were introduced by commit 0cecdd818cd7
    ("gma500: Final enables for Oaktrail") as "additional minor
    bulletproofing".
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: f910b411053f ("gma500: Add the glue to the various BIOS and firmware interfaces")
    Signed-off-by: Ivan Abramov <i.abramov@mt-integration.ru>
    Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250306112046.17144-1-i.abramov@mt-integration.ru
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/hyperv: Fix address space leak when Hyper-V DRM device is removed [+ + +]
Author: Michael Kelley <mhklinux@outlook.com>
Date:   Mon Feb 10 11:34:41 2025 -0800

    drm/hyperv: Fix address space leak when Hyper-V DRM device is removed
    
    [ Upstream commit aed709355fd05ef747e1af24a1d5d78cd7feb81e ]
    
    When a Hyper-V DRM device is probed, the driver allocates MMIO space for
    the vram, and maps it cacheable. If the device removed, or in the error
    path for device probing, the MMIO space is released but no unmap is done.
    Consequently the kernel address space for the mapping is leaked.
    
    Fix this by adding iounmap() calls in the device removal path, and in the
    error path during device probing.
    
    Fixes: f1f63cbb705d ("drm/hyperv: Fix an error handling path in hyperv_vmbus_probe()")
    Fixes: a0ab5abced55 ("drm/hyperv : Removing the restruction of VRAM allocation with PCI bar size")
    Signed-off-by: Michael Kelley <mhklinux@outlook.com>
    Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
    Tested-by: Saurabh Sengar <ssengar@linux.microsoft.com>
    Link: https://lore.kernel.org/r/20250210193441.2414-1-mhklinux@outlook.com
    Signed-off-by: Wei Liu <wei.liu@kernel.org>
    Message-ID: <20250210193441.2414-1-mhklinux@outlook.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/i915/cdclk: Do cdclk post plane programming later [+ + +]
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Feb 18 23:18:55 2025 +0200

    drm/i915/cdclk: Do cdclk post plane programming later
    
    commit 6266f4a78131c795631440ea9c7b66cdfd399484 upstream.
    
    We currently call intel_set_cdclk_post_plane_update() far
    too early. When pipes are active during the reprogramming
    the current spot only works for the cd2x divider update
    case, as that is synchronize to the pipe's vblank. Squashing
    and crawling are not synchronized in any way, so doing the
    programming while the pipes/planes are potentially still using
    the old hardware state could lead to underruns.
    
    Move the post plane reprgramming to a spot where we know
    that the pipes/planes have switched over the new hardware
    state.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250218211913.27867-2-ville.syrjala@linux.intel.com
    Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
    (cherry picked from commit fb64f5568c0e0b5730733d70a012ae26b1a55815)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/i915: Increase I915_PARAM_MMAP_GTT_VERSION version to indicate support for partial mmaps [+ + +]
Author: José Roberto de Souza <jose.souza@intel.com>
Date:   Thu Mar 6 13:08:27 2025 -0800

    drm/i915: Increase I915_PARAM_MMAP_GTT_VERSION version to indicate support for partial mmaps
    
    [ Upstream commit a8045e46c508b70fe4b30cc020fd0a2b0709b2e5 ]
    
    Commit 255fc1703e42 ("drm/i915/gem: Calculate object page offset for partial memory mapping")
    was the last patch of several patches fixing multiple partial mmaps.
    But without a bump in I915_PARAM_MMAP_GTT_VERSION there is no clean
    way for UMD to know if it can do multiple partial mmaps.
    
    Fixes: 255fc1703e42 ("drm/i915/gem: Calculate object page offset for partial memory mapping")
    Cc: Andi Shyti <andi.shyti@linux.intel.com>
    Cc: Nirmoy Das <nirmoy.das@intel.com>
    Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
    Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
    Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250306210827.171147-1-jose.souza@intel.com
    (cherry picked from commit bfef148f3680e6b9d28e7fca46d9520f80c5e50e)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/nouveau: Do not override forced connector status [+ + +]
Author: Thomas Zimmermann <tzimmermann@suse.de>
Date:   Tue Jan 14 10:57:25 2025 +0100

    drm/nouveau: Do not override forced connector status
    
    [ Upstream commit 01f1d77a2630e774ce33233c4e6723bca3ae9daa ]
    
    Keep user-forced connector status even if it cannot be programmed. Same
    behavior as for the rest of the drivers.
    
    Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
    Signed-off-by: Lyude Paul <lyude@redhat.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250114100214.195386-1-tzimmermann@suse.de
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/panic: fix overindented list items in documentation [+ + +]
Author: Miguel Ojeda <ojeda@kernel.org>
Date:   Sun Mar 2 00:16:02 2025 +0100

    drm/panic: fix overindented list items in documentation
    
    commit cba3b86974a3388b12130654809e50cd19294849 upstream.
    
    Starting with the upcoming Rust 1.86.0 (to be released 2025-04-03),
    Clippy warns:
    
        error: doc list item overindented
           --> drivers/gpu/drm/drm_panic_qr.rs:914:5
            |
        914 | ///    will be encoded as binary segment, otherwise it will be encoded
            |     ^^^ help: try using `  ` (2 spaces)
            |
            = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
    
    The overindentation is slightly hard to notice, since all the items
    start with a backquote that makes it look OK, but it is there.
    
    Thus fix it.
    
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen")
    Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs).
    Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
    Reviewed-by: Alice Ryhl <aliceryhl@google.com>
    Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250301231602.917580-2-ojeda@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drm/panic: use `div_ceil` to clean Clippy warning [+ + +]
Author: Miguel Ojeda <ojeda@kernel.org>
Date:   Sun Mar 2 00:16:01 2025 +0100

    drm/panic: use `div_ceil` to clean Clippy warning
    
    commit 986c2e9ca818b0b74cfc737517549fd0b80ff15d upstream.
    
    Starting with the upcoming Rust 1.86.0 (to be released 2025-04-03),
    Clippy warns:
    
        error: manually reimplementing `div_ceil`
           --> drivers/gpu/drm/drm_panic_qr.rs:548:26
            |
        548 |         let pad_offset = (offset + 7) / 8;
            |                          ^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `offset.div_ceil(8)`
            |
            = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
    
    And similarly for `stride`. Thus apply the suggestion to both.
    
    The behavior (and thus codegen) is not exactly equivalent [1][2], since
    `div_ceil()` returns the right value for the values that currently
    would overflow.
    
    Link: https://github.com/rust-lang/rust-clippy/issues/14333 [1]
    Link: https://godbolt.org/z/dPq6nGnv3 [2]
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Fixes: cb5164ac43d0 ("drm/panic: Add a QR code panic screen")
    Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs).
    Reviewed-by: Alice Ryhl <aliceryhl@google.com>
    Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
    Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250301231602.917580-1-ojeda@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/tests: hdmi: Fix recursive locking [+ + +]
Author: Maxime Ripard <mripard@kernel.org>
Date:   Wed Jan 29 15:21:56 2025 +0100

    drm/tests: hdmi: Fix recursive locking
    
    [ Upstream commit 5d14c08a47460e8eedf0185a28b116420ea7f29d ]
    
    The find_preferred_mode() functions takes the mode_config mutex, but due
    to the order most tests have, is called with the crtc_ww_class_mutex
    taken. This raises a warning for a circular dependency when running the
    tests with lockdep.
    
    Reorder the tests to call find_preferred_mode before the acquire context
    has been created to avoid the issue.
    
    Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250129-test-kunit-v2-4-fe59c43805d5@kernel.org
    Signed-off-by: Maxime Ripard <mripard@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/tests: hdmi: Remove redundant assignments [+ + +]
Author: Maxime Ripard <mripard@kernel.org>
Date:   Wed Jan 29 15:21:54 2025 +0100

    drm/tests: hdmi: Remove redundant assignments
    
    [ Upstream commit bb4f929a8875b4801db95b8cf3b2c527c1e475e0 ]
    
    Some tests have the drm pointer assigned multiple times to the same
    value. Drop the redundant assignments.
    
    Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250129-test-kunit-v2-2-fe59c43805d5@kernel.org
    Signed-off-by: Maxime Ripard <mripard@kernel.org>
    Stable-dep-of: 5d14c08a4746 ("drm/tests: hdmi: Fix recursive locking")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/tests: hdmi: Reorder DRM entities variables assignment [+ + +]
Author: Maxime Ripard <mripard@kernel.org>
Date:   Wed Jan 29 15:21:55 2025 +0100

    drm/tests: hdmi: Reorder DRM entities variables assignment
    
    [ Upstream commit 6b6bfd63e1626ceedc738b2a06505aa5b46c1481 ]
    
    The tests all deviate slightly in how they assign their local pointers
    to DRM entities. This makes refactoring pretty difficult, so let's just
    move the assignment as soon as the entities are allocated.
    
    Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250129-test-kunit-v2-3-fe59c43805d5@kernel.org
    Signed-off-by: Maxime Ripard <mripard@kernel.org>
    Stable-dep-of: 5d14c08a4746 ("drm/tests: hdmi: Fix recursive locking")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/vkms: Round fixp2int conversion in lerp_u16 [+ + +]
Author: Harry Wentland <harry.wentland@amd.com>
Date:   Thu Dec 19 21:33:08 2024 -0700

    drm/vkms: Round fixp2int conversion in lerp_u16
    
    [ Upstream commit 8ec43c58d3be615a71548bc09148212013fb7e5f ]
    
    fixp2int always rounds down, fixp2int_ceil rounds up. We need
    the new fixp2int_round.
    
    Signed-off-by: Alex Hung <alex.hung@amd.com>
    Signed-off-by: Harry Wentland <harry.wentland@amd.com>
    Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20241220043410.416867-3-alex.hung@amd.com
    Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/xe/guc: Fix size_t print format [+ + +]
Author: Lucas De Marchi <lucas.demarchi@intel.com>
Date:   Tue Jan 28 07:42:42 2025 -0800

    drm/xe/guc: Fix size_t print format
    
    commit 213e24250feed3bcf58d7594298df2d7e78a88ab upstream.
    
    Use %zx format to print size_t to remove the following warning when
    building for i386:
    
    >> drivers/gpu/drm/xe/xe_guc_ct.c:1727:43: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
        1727 |                         drm_printf(p, "[CTB].length: 0x%lx\n", snapshot->ctb_size);
             |                                                        ~~~     ^~~~~~~~~~~~~~~~~~
             |                                                        %zx
    
    Cc: José Roberto de Souza <jose.souza@intel.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Closes: https://lore.kernel.org/oe-kbuild-all/202501281627.H6nj184e-lkp@intel.com/
    Fixes: 643f209ba3fd ("drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump")
    Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250128154242.3371687-1-lucas.demarchi@intel.com
    Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
    (cherry picked from commit 7748289df510638ba61fed86b59ce7d2fb4a194c)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/xe/pm: Temporarily disable D3Cold on BMG [+ + +]
Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
Date:   Fri Mar 7 19:56:35 2025 -0500

    drm/xe/pm: Temporarily disable D3Cold on BMG
    
    [ Upstream commit 3e331a6715ee26f2fabc59dad6bb36d810707028 ]
    
    Currently, many instability cases related to D3Cold -> D0 transition
    on BMG are under investigation. Among them some bad cases where
    the device is lost after 1 to 3 transitions from D3Cold to D0
    on the runtime pm, with pcieport upstream bridge port link retrain
    failure.
    
    In other cases, it works fine, but with some sudden random memory
    corruptions after D3cold, that could be 0xffff missed ack on GT
    forcewake or GuC reload related failures.
    
    In some other cases though, D3Cold -> D0 works pretty reliably.
    It looks like it is a combination of GPU cards and Host boards at
    this point. So, there is no possible/available quirk at this time.
    
    This patch disables the D3Cold by default on BMG by reducing the
    vram_d3cold_threshold to 0. Users and developers who wants to enable
    it are still able to via
    $ echo 300 > /sys/bus/pci/devices/<addr>/vram_d3cold_threshold
    
    Fixes: 3adcf970dc7e ("drm/xe/bmg: Drop force_probe requirement")
    Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4037
    Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4395
    Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4396
    Cc: Karthik Poosa <karthik.poosa@intel.com>
    Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250308005636.1475420-1-rodrigo.vivi@intel.com
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    (cherry picked from commit d945cc876277851053c0cf37927c8d7bd9d0e880)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/xe/userptr: Fix an incorrect assert [+ + +]
Author: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Date:   Fri Mar 7 11:01:09 2025 +0100

    drm/xe/userptr: Fix an incorrect assert
    
    [ Upstream commit 9106713bd2ab0cacd380cda0d3f0219f2e488086 ]
    
    The assert incorrectly checks the total length processed which
    can in fact be greater than the number of pages. Fix.
    
    Fixes: 0a98219bcc96 ("drm/xe/hmm: Don't dereference struct page pointers without notifier lock")
    Cc: Matthew Auld <matthew.auld@intel.com>
    Cc: Matthew Brost <matthew.brost@intel.com>
    Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
    Reviewed-by: Matthew Auld <matthew.auld@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250307100109.21397-1-thomas.hellstrom@linux.intel.com
    (cherry picked from commit 70e5043ba85eae199b232e39921abd706b5c1fa4)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/xe: cancel pending job timer before freeing scheduler [+ + +]
Author: Tejas Upadhyay <tejas.upadhyay@intel.com>
Date:   Tue Feb 25 10:27:54 2025 +0530

    drm/xe: cancel pending job timer before freeing scheduler
    
    [ Upstream commit 12c2f962fe71f390951d9242725bc7e608f55927 ]
    
    The async call to __guc_exec_queue_fini_async frees the scheduler
    while a submission may time out and restart. To prevent this race
    condition, the pending job timer should be canceled before freeing
    the scheduler.
    
    V3(MattB):
     - Adjust position of cancel pending job
     - Remove gitlab issue# from commit message
    V2(MattB):
     - Cancel pending jobs before scheduler finish
    
    Fixes: a20c75dba192 ("drm/xe: Call __guc_exec_queue_fini_async direct for KERNEL exec_queues")
    Reviewed-by: Matthew Brost <matthew.brost@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250225045754.600905-1-tejas.upadhyay@intel.com
    Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
    (cherry picked from commit 18fbd567e75f9b97b699b2ab4f1fa76b7cf268f6)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Stable-dep-of: 10c7988418d8 ("drm/xe: Release guc ids before cancelling work")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump [+ + +]
Author: José Roberto de Souza <jose.souza@intel.com>
Date:   Thu Jan 23 12:22:04 2025 -0800

    drm/xe: Make GUC binaries dump consistent with other binaries in devcoredump
    
    [ Upstream commit 643f209ba3fdd4099416aaf9efa8266f7366d6fb ]
    
    All other(hwsp, hwctx and vmas) binaries follow this format:
    [name].length: 0x1000
    [name].data: xxxxxxx
    [name].error: errno
    
    The error one is just in case by some reason it was not able to
    capture the binary.
    
    So this GuC binaries should follow the same patern.
    
    v2:
    - renamed GUC binary to LOG
    
    Cc: John Harrison <John.C.Harrison@Intel.com>
    Cc: Lucas De Marchi <lucas.demarchi@intel.com>
    Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
    Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250123202307.95103-3-jose.souza@intel.com
    Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
    (cherry picked from commit cb1f868ca13756c0c18ba54d1591332476760d07)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/xe: Release guc ids before cancelling work [+ + +]
Author: Tejas Upadhyay <tejas.upadhyay@intel.com>
Date:   Thu Mar 6 18:42:11 2025 +0530

    drm/xe: Release guc ids before cancelling work
    
    [ Upstream commit 10c7988418d8f759ba70c4a558961e0bfa74647f ]
    
    A GT resets can be occurring in parallel while cancelling
    work in async call  which can requeue these workers.
    to avoid that, lets first release guc ids and then cancel
    work so they don't requeued.
    
    Fixes: 8ae8a2e8dd21 ("drm/xe: Long running job update")
    Fixes: 12c2f962fe71 ("drm/xe: cancel pending job timer before freeing scheduler")
    Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
    Suggested-by: Matthew Brost <matthew.brost@intel.com>
    Reviewed-by: Matthew Brost <matthew.brost@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20250306131211.975503-1-tejas.upadhyay@intel.com
    Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
    (cherry picked from commit 8e8d76f62329127b31c64a034b052fb9e30e92af)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
eth: bnxt: do not update checksum in bnxt_xdp_build_skb() [+ + +]
Author: Taehee Yoo <ap420073@gmail.com>
Date:   Sun Mar 9 13:42:15 2025 +0000

    eth: bnxt: do not update checksum in bnxt_xdp_build_skb()
    
    [ Upstream commit c03e7d05aa0e2f7e9a9ce5ad8a12471a53f941dc ]
    
    The bnxt_rx_pkt() updates ip_summed value at the end if checksum offload
    is enabled.
    When the XDP-MB program is attached and it returns XDP_PASS, the
    bnxt_xdp_build_skb() is called to update skb_shared_info.
    The main purpose of bnxt_xdp_build_skb() is to update skb_shared_info,
    but it updates ip_summed value too if checksum offload is enabled.
    This is actually duplicate work.
    
    When the bnxt_rx_pkt() updates ip_summed value, it checks if ip_summed
    is CHECKSUM_NONE or not.
    It means that ip_summed should be CHECKSUM_NONE at this moment.
    But ip_summed may already be updated to CHECKSUM_UNNECESSARY in the
    XDP-MB-PASS path.
    So the by skb_checksum_none_assert() WARNS about it.
    
    This is duplicate work and updating ip_summed in the
    bnxt_xdp_build_skb() is not needed.
    
    Splat looks like:
    WARNING: CPU: 3 PID: 5782 at ./include/linux/skbuff.h:5155 bnxt_rx_pkt+0x479b/0x7610 [bnxt_en]
    Modules linked in: bnxt_re bnxt_en rdma_ucm rdma_cm iw_cm ib_cm ib_uverbs veth xt_nat xt_tcpudp xt_conntrack nft_chain_nat xt_MASQUERADE nf_]
    CPU: 3 UID: 0 PID: 5782 Comm: socat Tainted: G        W          6.14.0-rc4+ #27
    Tainted: [W]=WARN
    Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021
    RIP: 0010:bnxt_rx_pkt+0x479b/0x7610 [bnxt_en]
    Code: 54 24 0c 4c 89 f1 4c 89 ff c1 ea 1f ff d3 0f 1f 00 49 89 c6 48 85 c0 0f 84 4c e5 ff ff 48 89 c7 e8 ca 3d a0 c8 e9 8f f4 ff ff <0f> 0b f
    RSP: 0018:ffff88881ba09928 EFLAGS: 00010202
    RAX: 0000000000000000 RBX: 00000000c7590303 RCX: 0000000000000000
    RDX: 1ffff1104e7d1610 RSI: 0000000000000001 RDI: ffff8881c91300b8
    RBP: ffff88881ba09b28 R08: ffff888273e8b0d0 R09: ffff888273e8b070
    R10: ffff888273e8b010 R11: ffff888278b0f000 R12: ffff888273e8b080
    R13: ffff8881c9130e00 R14: ffff8881505d3800 R15: ffff888273e8b000
    FS:  00007f5a2e7be080(0000) GS:ffff88881ba00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007fff2e708ff8 CR3: 000000013e3b0000 CR4: 00000000007506f0
    PKRU: 55555554
    Call Trace:
     <IRQ>
     ? __warn+0xcd/0x2f0
     ? bnxt_rx_pkt+0x479b/0x7610
     ? report_bug+0x326/0x3c0
     ? handle_bug+0x53/0xa0
     ? exc_invalid_op+0x14/0x50
     ? asm_exc_invalid_op+0x16/0x20
     ? bnxt_rx_pkt+0x479b/0x7610
     ? bnxt_rx_pkt+0x3e41/0x7610
     ? __pfx_bnxt_rx_pkt+0x10/0x10
     ? napi_complete_done+0x2cf/0x7d0
     __bnxt_poll_work+0x4e8/0x1220
     ? __pfx___bnxt_poll_work+0x10/0x10
     ? __pfx_mark_lock.part.0+0x10/0x10
     bnxt_poll_p5+0x36a/0xfa0
     ? __pfx_bnxt_poll_p5+0x10/0x10
     __napi_poll.constprop.0+0xa0/0x440
     net_rx_action+0x899/0xd00
    ...
    
    Following ping.py patch adds xdp-mb-pass case. so ping.py is going
    to be able to reproduce this issue.
    
    Fixes: 1dc4c557bfed ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff")
    Signed-off-by: Taehee Yoo <ap420073@gmail.com>
    Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
    Link: https://patch.msgid.link/20250309134219.91670-5-ap420073@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

eth: bnxt: do not use BNXT_VNIC_NTUPLE unconditionally in queue restart logic [+ + +]
Author: Taehee Yoo <ap420073@gmail.com>
Date:   Sun Mar 9 13:42:14 2025 +0000

    eth: bnxt: do not use BNXT_VNIC_NTUPLE unconditionally in queue restart logic
    
    [ Upstream commit 661958552eda5bf64bfafb4821cbdded935f1f68 ]
    
    When a queue is restarted, it sets MRU to 0 for stopping packet flow.
    MRU variable is a member of vnic_info[], the first vnic_info is default
    and the second is ntuple.
    Only when ntuple is enabled(ethtool -K eth0 ntuple on), vnic_info for
    ntuple is allocated in init logic.
    The bp->nr_vnics indicates how many vnic_info are allocated.
    However bnxt_queue_{start | stop}() accesses vnic_info[BNXT_VNIC_NTUPLE]
    regardless of ntuple state.
    
    Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
    Fixes: b9d2956e869c ("bnxt_en: stop packet flow during bnxt_queue_stop/start")
    Signed-off-by: Taehee Yoo <ap420073@gmail.com>
    Link: https://patch.msgid.link/20250309134219.91670-4-ap420073@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

eth: bnxt: fix kernel panic in the bnxt_get_queue_stats{rx | tx} [+ + +]
Author: Taehee Yoo <ap420073@gmail.com>
Date:   Sun Mar 9 13:42:16 2025 +0000

    eth: bnxt: fix kernel panic in the bnxt_get_queue_stats{rx | tx}
    
    [ Upstream commit f09af5fdfbd9b0fcee73aab1116904c53b199e97 ]
    
    When qstats-get operation is executed, callbacks of netdev_stats_ops
    are called. The bnxt_get_queue_stats{rx | tx} collect per-queue stats
    from sw_stats in the rings.
    But {rx | tx | cp}_ring are allocated when the interface is up.
    So, these rings are not allocated when the interface is down.
    
    The qstats-get is allowed even if the interface is down. However,
    the bnxt_get_queue_stats{rx | tx}() accesses cp_ring and tx_ring
    without null check.
    So, it needs to avoid accessing rings if the interface is down.
    
    Reproducer:
     ip link set $interface down
     ./cli.py --spec netdev.yaml --dump qstats-get
    OR
     ip link set $interface down
     python ./stats.py
    
    Splat looks like:
     BUG: kernel NULL pointer dereference, address: 0000000000000000
     #PF: supervisor read access in kernel mode
     #PF: error_code(0x0000) - not-present page
     PGD 1680fa067 P4D 1680fa067 PUD 16be3b067 PMD 0
     Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
     CPU: 0 UID: 0 PID: 1495 Comm: python3 Not tainted 6.14.0-rc4+ #32 5cd0f999d5a15c574ac72b3e4b907341
     Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021
     RIP: 0010:bnxt_get_queue_stats_rx+0xf/0x70 [bnxt_en]
     Code: c6 87 b5 18 00 00 02 eb a2 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 01
     RSP: 0018:ffffabef43cdb7e0 EFLAGS: 00010282
     RAX: 0000000000000000 RBX: ffffffffc04c8710 RCX: 0000000000000000
     RDX: ffffabef43cdb858 RSI: 0000000000000000 RDI: ffff8d504e850000
     RBP: ffff8d506c9f9c00 R08: 0000000000000004 R09: ffff8d506bcd901c
     R10: 0000000000000015 R11: ffff8d506bcd9000 R12: 0000000000000000
     R13: ffffabef43cdb8c0 R14: ffff8d504e850000 R15: 0000000000000000
     FS:  00007f2c5462b080(0000) GS:ffff8d575f600000(0000) knlGS:0000000000000000
     CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
     CR2: 0000000000000000 CR3: 0000000167fd0000 CR4: 00000000007506f0
     PKRU: 55555554
     Call Trace:
      <TASK>
      ? __die+0x20/0x70
      ? page_fault_oops+0x15a/0x460
      ? sched_balance_find_src_group+0x58d/0xd10
      ? exc_page_fault+0x6e/0x180
      ? asm_exc_page_fault+0x22/0x30
      ? bnxt_get_queue_stats_rx+0xf/0x70 [bnxt_en cdd546fd48563c280cfd30e9647efa420db07bf1]
      netdev_nl_stats_by_netdev+0x2b1/0x4e0
      ? xas_load+0x9/0xb0
      ? xas_find+0x183/0x1d0
      ? xa_find+0x8b/0xe0
      netdev_nl_qstats_get_dumpit+0xbf/0x1e0
      genl_dumpit+0x31/0x90
      netlink_dump+0x1a8/0x360
    
    Fixes: af7b3b4adda5 ("eth: bnxt: support per-queue statistics")
    Signed-off-by: Taehee Yoo <ap420073@gmail.com>
    Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
    Link: https://patch.msgid.link/20250309134219.91670-6-ap420073@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

eth: bnxt: fix memory leak in queue reset [+ + +]
Author: Taehee Yoo <ap420073@gmail.com>
Date:   Sun Mar 9 13:42:17 2025 +0000

    eth: bnxt: fix memory leak in queue reset
    
    [ Upstream commit 87dd2850835dd7886726b428a8ef7d73a60520c7 ]
    
    When the queue is reset, the bnxt_alloc_one_tpa_info() is called to
    allocate tpa_info for the new queue.
    And then the old queue's tpa_info should be removed by the
    bnxt_free_one_tpa_info(), but it is not called.
    So memory leak occurs.
    It adds the bnxt_free_one_tpa_info() in the bnxt_queue_mem_free().
    
    unreferenced object 0xffff888293cc0000 (size 16384):
      comm "ncdevmem", pid 2076, jiffies 4296604081
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 40 75 78 93 82 88 ff ff  ........@ux.....
        40 75 78 93 02 00 00 00 00 00 00 00 00 00 00 00  @ux.............
      backtrace (crc 5d7d4798):
        ___kmalloc_large_node+0x10d/0x1b0
        __kmalloc_large_node_noprof+0x17/0x60
        __kmalloc_noprof+0x3f6/0x520
        bnxt_alloc_one_tpa_info+0x5f/0x300 [bnxt_en]
        bnxt_queue_mem_alloc+0x8e8/0x14f0 [bnxt_en]
        netdev_rx_queue_restart+0x233/0x620
        net_devmem_bind_dmabuf_to_queue+0x2a3/0x600
        netdev_nl_bind_rx_doit+0xc00/0x10a0
        genl_family_rcv_msg_doit+0x1d4/0x2b0
        genl_rcv_msg+0x3fb/0x6c0
        netlink_rcv_skb+0x12c/0x360
        genl_rcv+0x24/0x40
        netlink_unicast+0x447/0x710
        netlink_sendmsg+0x712/0xbc0
        __sys_sendto+0x3fd/0x4d0
        __x64_sys_sendto+0xdc/0x1b0
    
    Fixes: 2d694c27d32e ("bnxt_en: implement netdev_queue_mgmt_ops")
    Signed-off-by: Taehee Yoo <ap420073@gmail.com>
    Link: https://patch.msgid.link/20250309134219.91670-7-ap420073@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

eth: bnxt: fix truesize for mb-xdp-pass case [+ + +]
Author: Taehee Yoo <ap420073@gmail.com>
Date:   Sun Mar 9 13:42:12 2025 +0000

    eth: bnxt: fix truesize for mb-xdp-pass case
    
    [ Upstream commit 9f7b2aa5034e24d3c49db73d5f760c0435fe31c2 ]
    
    When mb-xdp is set and return is XDP_PASS, packet is converted from
    xdp_buff to sk_buff with xdp_update_skb_shared_info() in
    bnxt_xdp_build_skb().
    bnxt_xdp_build_skb() passes incorrect truesize argument to
    xdp_update_skb_shared_info().
    The truesize is calculated as BNXT_RX_PAGE_SIZE * sinfo->nr_frags but
    the skb_shared_info was wiped by napi_build_skb() before.
    So it stores sinfo->nr_frags before bnxt_xdp_build_skb() and use it
    instead of getting skb_shared_info from xdp_get_shared_info_from_buff().
    
    Splat looks like:
     ------------[ cut here ]------------
     WARNING: CPU: 2 PID: 0 at net/core/skbuff.c:6072 skb_try_coalesce+0x504/0x590
     Modules linked in: xt_nat xt_tcpudp veth af_packet xt_conntrack nft_chain_nat xt_MASQUERADE nf_conntrack_netlink xfrm_user xt_addrtype nft_coms
     CPU: 2 UID: 0 PID: 0 Comm: swapper/2 Not tainted 6.14.0-rc2+ #3
     RIP: 0010:skb_try_coalesce+0x504/0x590
     Code: 4b fd ff ff 49 8b 34 24 40 80 e6 40 0f 84 3d fd ff ff 49 8b 74 24 48 40 f6 c6 01 0f 84 2e fd ff ff 48 8d 4e ff e9 25 fd ff ff <0f> 0b e99
     RSP: 0018:ffffb62c4120caa8 EFLAGS: 00010287
     RAX: 0000000000000003 RBX: ffffb62c4120cb14 RCX: 0000000000000ec0
     RDX: 0000000000001000 RSI: ffffa06e5d7dc000 RDI: 0000000000000003
     RBP: ffffa06e5d7ddec0 R08: ffffa06e6120a800 R09: ffffa06e7a119900
     R10: 0000000000002310 R11: ffffa06e5d7dcec0 R12: ffffe4360575f740
     R13: ffffe43600000000 R14: 0000000000000002 R15: 0000000000000002
     FS:  0000000000000000(0000) GS:ffffa0755f700000(0000) knlGS:0000000000000000
     CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
     CR2: 00007f147b76b0f8 CR3: 00000001615d4000 CR4: 00000000007506f0
     PKRU: 55555554
     Call Trace:
      <IRQ>
      ? __warn+0x84/0x130
      ? skb_try_coalesce+0x504/0x590
      ? report_bug+0x18a/0x1a0
      ? handle_bug+0x53/0x90
      ? exc_invalid_op+0x14/0x70
      ? asm_exc_invalid_op+0x16/0x20
      ? skb_try_coalesce+0x504/0x590
      inet_frag_reasm_finish+0x11f/0x2e0
      ip_defrag+0x37a/0x900
      ip_local_deliver+0x51/0x120
      ip_sublist_rcv_finish+0x64/0x70
      ip_sublist_rcv+0x179/0x210
      ip_list_rcv+0xf9/0x130
    
    How to reproduce:
    <Node A>
    ip link set $interface1 xdp obj xdp_pass.o
    ip link set $interface1 mtu 9000 up
    ip a a 10.0.0.1/24 dev $interface1
    <Node B>
    ip link set $interfac2 mtu 9000 up
    ip a a 10.0.0.2/24 dev $interface2
    ping 10.0.0.1 -s 65000
    
    Following ping.py patch adds xdp-mb-pass case. so ping.py is going to be
    able to reproduce this issue.
    
    Fixes: 1dc4c557bfed ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff")
    Signed-off-by: Taehee Yoo <ap420073@gmail.com>
    Link: https://patch.msgid.link/20250309134219.91670-2-ap420073@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

eth: bnxt: return fail if interface is down in bnxt_queue_mem_alloc() [+ + +]
Author: Taehee Yoo <ap420073@gmail.com>
Date:   Sun Mar 9 13:42:13 2025 +0000

    eth: bnxt: return fail if interface is down in bnxt_queue_mem_alloc()
    
    [ Upstream commit ca2456e073957781e1184de68551c65161b2bd30 ]
    
    The bnxt_queue_mem_alloc() is called to allocate new queue memory when
    a queue is restarted.
    It internally accesses rx buffer descriptor corresponding to the index.
    The rx buffer descriptor is allocated and set when the interface is up
    and it's freed when the interface is down.
    So, if queue is restarted if interface is down, kernel panic occurs.
    
    Splat looks like:
     BUG: unable to handle page fault for address: 000000000000b240
     #PF: supervisor read access in kernel mode
     #PF: error_code(0x0000) - not-present page
     PGD 0 P4D 0
     Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
     CPU: 3 UID: 0 PID: 1563 Comm: ncdevmem2 Not tainted 6.14.0-rc2+ #9 844ddba6e7c459cafd0bf4db9a3198e
     Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021
     RIP: 0010:bnxt_queue_mem_alloc+0x3f/0x4e0 [bnxt_en]
     Code: 41 54 4d 89 c4 4d 69 c0 c0 05 00 00 55 48 89 f5 53 48 89 fb 4c 8d b5 40 05 00 00 48 83 ec 15
     RSP: 0018:ffff9dcc83fef9e8 EFLAGS: 00010202
     RAX: ffffffffc0457720 RBX: ffff934ed8d40000 RCX: 0000000000000000
     RDX: 000000000000001f RSI: ffff934ea508f800 RDI: ffff934ea508f808
     RBP: ffff934ea508f800 R08: 000000000000b240 R09: ffff934e84f4b000
     R10: ffff9dcc83fefa30 R11: ffff934e84f4b000 R12: 000000000000001f
     R13: ffff934ed8d40ac0 R14: ffff934ea508fd40 R15: ffff934e84f4b000
     FS:  00007fa73888c740(0000) GS:ffff93559f780000(0000) knlGS:0000000000000000
     CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
     CR2: 000000000000b240 CR3: 0000000145a2e000 CR4: 00000000007506f0
     PKRU: 55555554
     Call Trace:
      <TASK>
      ? __die+0x20/0x70
      ? page_fault_oops+0x15a/0x460
      ? exc_page_fault+0x6e/0x180
      ? asm_exc_page_fault+0x22/0x30
      ? __pfx_bnxt_queue_mem_alloc+0x10/0x10 [bnxt_en 7f85e76f4d724ba07471d7e39d9e773aea6597b7]
      ? bnxt_queue_mem_alloc+0x3f/0x4e0 [bnxt_en 7f85e76f4d724ba07471d7e39d9e773aea6597b7]
      netdev_rx_queue_restart+0xc5/0x240
      net_devmem_bind_dmabuf_to_queue+0xf8/0x200
      netdev_nl_bind_rx_doit+0x3a7/0x450
      genl_family_rcv_msg_doit+0xd9/0x130
      genl_rcv_msg+0x184/0x2b0
      ? __pfx_netdev_nl_bind_rx_doit+0x10/0x10
      ? __pfx_genl_rcv_msg+0x10/0x10
      netlink_rcv_skb+0x54/0x100
      genl_rcv+0x24/0x40
    ...
    
    Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
    Reviewed-by: Jakub Kicinski <kuba@kernel.org>
    Fixes: 2d694c27d32e ("bnxt_en: implement netdev_queue_mgmt_ops")
    Signed-off-by: Taehee Yoo <ap420073@gmail.com>
    Reviewed-by: Mina Almasry <almasrymina@google.com>
    Link: https://patch.msgid.link/20250309134219.91670-3-ap420073@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
fbdev: hyperv_fb: Allow graceful removal of framebuffer [+ + +]
Author: Saurabh Sengar <ssengar@linux.microsoft.com>
Date:   Sat Mar 1 08:16:31 2025 -0800

    fbdev: hyperv_fb: Allow graceful removal of framebuffer
    
    [ Upstream commit ea2f45ab0e53b255f72c85ccd99e2b394fc5fceb ]
    
    When a Hyper-V framebuffer device is unbind, hyperv_fb driver tries to
    release the framebuffer forcefully. If this framebuffer is in use it
    produce the following WARN and hence this framebuffer is never released.
    
    [   44.111220] WARNING: CPU: 35 PID: 1882 at drivers/video/fbdev/core/fb_info.c:70 framebuffer_release+0x2c/0x40
    < snip >
    [   44.111289] Call Trace:
    [   44.111290]  <TASK>
    [   44.111291]  ? show_regs+0x6c/0x80
    [   44.111295]  ? __warn+0x8d/0x150
    [   44.111298]  ? framebuffer_release+0x2c/0x40
    [   44.111300]  ? report_bug+0x182/0x1b0
    [   44.111303]  ? handle_bug+0x6e/0xb0
    [   44.111306]  ? exc_invalid_op+0x18/0x80
    [   44.111308]  ? asm_exc_invalid_op+0x1b/0x20
    [   44.111311]  ? framebuffer_release+0x2c/0x40
    [   44.111313]  ? hvfb_remove+0x86/0xa0 [hyperv_fb]
    [   44.111315]  vmbus_remove+0x24/0x40 [hv_vmbus]
    [   44.111323]  device_remove+0x40/0x80
    [   44.111325]  device_release_driver_internal+0x20b/0x270
    [   44.111327]  ? bus_find_device+0xb3/0xf0
    
    Fix this by moving the release of framebuffer and assosiated memory
    to fb_ops.fb_destroy function, so that framebuffer framework handles
    it gracefully.
    
    While we fix this, also replace manual registrations/unregistration of
    framebuffer with devm_register_framebuffer.
    
    Fixes: 68a2d20b79b1 ("drivers/video: add Hyper-V Synthetic Video Frame Buffer Driver")
    
    Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
    Reviewed-by: Michael Kelley <mhklinux@outlook.com>
    Tested-by: Michael Kelley <mhklinux@outlook.com>
    Link: https://lore.kernel.org/r/1740845791-19977-3-git-send-email-ssengar@linux.microsoft.com
    Signed-off-by: Wei Liu <wei.liu@kernel.org>
    Message-ID: <1740845791-19977-3-git-send-email-ssengar@linux.microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

fbdev: hyperv_fb: Fix hang in kdump kernel when on Hyper-V Gen 2 VMs [+ + +]
Author: Michael Kelley <mhklinux@outlook.com>
Date:   Tue Feb 18 15:01:30 2025 -0800

    fbdev: hyperv_fb: Fix hang in kdump kernel when on Hyper-V Gen 2 VMs
    
    [ Upstream commit 304386373007aaca9236a3f36afac0bbedcd2bf0 ]
    
    Gen 2 Hyper-V VMs boot via EFI and have a standard EFI framebuffer
    device. When the kdump kernel runs in such a VM, loading the efifb
    driver may hang because of accessing the framebuffer at the wrong
    memory address.
    
    The scenario occurs when the hyperv_fb driver in the original kernel
    moves the framebuffer to a different MMIO address because of conflicts
    with an already-running efifb or simplefb driver. The hyperv_fb driver
    then informs Hyper-V of the change, which is allowed by the Hyper-V FB
    VMBus device protocol. However, when the kexec command loads the kdump
    kernel into crash memory via the kexec_file_load() system call, the
    system call doesn't know the framebuffer has moved, and it sets up the
    kdump screen_info using the original framebuffer address. The transition
    to the kdump kernel does not go through the Hyper-V host, so Hyper-V
    does not reset the framebuffer address like it would do on a reboot.
    When efifb tries to run, it accesses a non-existent framebuffer
    address, which traps to the Hyper-V host. After many such accesses,
    the Hyper-V host thinks the guest is being malicious, and throttles
    the guest to the point that it runs very slowly or appears to have hung.
    
    When the kdump kernel is loaded into crash memory via the kexec_load()
    system call, the problem does not occur. In this case, the kexec command
    builds the screen_info table itself in user space from data returned
    by the FBIOGET_FSCREENINFO ioctl against /dev/fb0, which gives it the
    new framebuffer location.
    
    This problem was originally reported in 2020 [1], resulting in commit
    3cb73bc3fa2a ("hyperv_fb: Update screen_info after removing old
    framebuffer"). This commit solved the problem by setting orig_video_isVGA
    to 0, so the kdump kernel was unaware of the EFI framebuffer. The efifb
    driver did not try to load, and no hang occurred. But in 2024, commit
    c25a19afb81c ("fbdev/hyperv_fb: Do not clear global screen_info")
    effectively reverted 3cb73bc3fa2a. Commit c25a19afb81c has no reference
    to 3cb73bc3fa2a, so perhaps it was done without knowing the implications
    that were reported with 3cb73bc3fa2a. In any case, as of commit
    c25a19afb81c, the original problem came back again.
    
    Interestingly, the hyperv_drm driver does not have this problem because
    it never moves the framebuffer. The difference is that the hyperv_drm
    driver removes any conflicting framebuffers *before* allocating an MMIO
    address, while the hyperv_fb drivers removes conflicting framebuffers
    *after* allocating an MMIO address. With the "after" ordering, hyperv_fb
    may encounter a conflict and move the framebuffer to a different MMIO
    address. But the conflict is essentially bogus because it is removed
    a few lines of code later.
    
    Rather than fix the problem with the approach from 2020 in commit
    3cb73bc3fa2a, instead slightly reorder the steps in hyperv_fb so
    conflicting framebuffers are removed before allocating an MMIO address.
    Then the default framebuffer MMIO address should always be available, and
    there's never any confusion about which framebuffer address the kdump
    kernel should use -- it's always the original address provided by
    the Hyper-V host. This approach is already used by the hyperv_drm
    driver, and is consistent with the usage guidelines at the head of
    the module with the function aperture_remove_conflicting_devices().
    
    This approach also solves a related minor problem when kexec_load()
    is used to load the kdump kernel. With current code, unbinding and
    rebinding the hyperv_fb driver could result in the framebuffer moving
    back to the default framebuffer address, because on the rebind there
    are no conflicts. If such a move is done after the kdump kernel is
    loaded with the new framebuffer address, at kdump time it could again
    have the wrong address.
    
    This problem and fix are described in terms of the kdump kernel, but
    it can also occur with any kernel started via kexec.
    
    See extensive discussion of the problem and solution at [2].
    
    [1] https://lore.kernel.org/linux-hyperv/20201014092429.1415040-1-kasong@redhat.com/
    [2] https://lore.kernel.org/linux-hyperv/BLAPR10MB521793485093FDB448F7B2E5FDE92@BLAPR10MB5217.namprd10.prod.outlook.com/
    
    Reported-by: Thomas Tai <thomas.tai@oracle.com>
    Fixes: c25a19afb81c ("fbdev/hyperv_fb: Do not clear global screen_info")
    Signed-off-by: Michael Kelley <mhklinux@outlook.com>
    Link: https://lore.kernel.org/r/20250218230130.3207-1-mhklinux@outlook.com
    Signed-off-by: Wei Liu <wei.liu@kernel.org>
    Message-ID: <20250218230130.3207-1-mhklinux@outlook.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

fbdev: hyperv_fb: iounmap() the correct memory when removing a device [+ + +]
Author: Michael Kelley <mhklinux@outlook.com>
Date:   Sun Feb 9 15:52:52 2025 -0800

    fbdev: hyperv_fb: iounmap() the correct memory when removing a device
    
    [ Upstream commit 7241c886a71797cc51efc6fadec7076fcf6435c2 ]
    
    When a Hyper-V framebuffer device is removed, or the driver is unbound
    from a device, any allocated and/or mapped memory must be released. In
    particular, MMIO address space that was mapped to the framebuffer must
    be unmapped. Current code unmaps the wrong address, resulting in an
    error like:
    
    [ 4093.980597] iounmap: bad address 00000000c936c05c
    
    followed by a stack dump.
    
    Commit d21987d709e8 ("video: hyperv: hyperv_fb: Support deferred IO for
    Hyper-V frame buffer driver") changed the kind of address stored in
    info->screen_base, and the iounmap() call in hvfb_putmem() was not
    updated accordingly.
    
    Fix this by updating hvfb_putmem() to unmap the correct address.
    
    Fixes: d21987d709e8 ("video: hyperv: hyperv_fb: Support deferred IO for Hyper-V frame buffer driver")
    Signed-off-by: Michael Kelley <mhklinux@outlook.com>
    Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com>
    Link: https://lore.kernel.org/r/20250209235252.2987-1-mhklinux@outlook.com
    Signed-off-by: Wei Liu <wei.liu@kernel.org>
    Message-ID: <20250209235252.2987-1-mhklinux@outlook.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

fbdev: hyperv_fb: Simplify hvfb_putmem [+ + +]
Author: Saurabh Sengar <ssengar@linux.microsoft.com>
Date:   Sat Mar 1 08:16:30 2025 -0800

    fbdev: hyperv_fb: Simplify hvfb_putmem
    
    [ Upstream commit f5e728a50bb17336a20803dde488515b833ecd1d ]
    
    The device object required in 'hvfb_release_phymem' function
    for 'dma_free_coherent' can also be obtained from the 'info'
    pointer, making 'hdev' parameter in 'hvfb_putmem' redundant.
    Remove the unnecessary 'hdev' argument from 'hvfb_putmem'.
    
    Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
    Reviewed-by: Michael Kelley <mhklinux@outlook.com>
    Tested-by: Michael Kelley <mhklinux@outlook.com>
    Link: https://lore.kernel.org/r/1740845791-19977-2-git-send-email-ssengar@linux.microsoft.com
    Signed-off-by: Wei Liu <wei.liu@kernel.org>
    Message-ID: <1740845791-19977-2-git-send-email-ssengar@linux.microsoft.com>
    Stable-dep-of: ea2f45ab0e53 ("fbdev: hyperv_fb: Allow graceful removal of framebuffer")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Linux: Fix mmu notifiers for range-based invalidates [+ + +]
Author: Piotr Jaroszynski <pjaroszynski@nvidia.com>
Date:   Tue Mar 4 00:51:27 2025 -0800

    Fix mmu notifiers for range-based invalidates
    
    commit f7edb07ad7c66eab3dce57384f33b9799d579133 upstream.
    
    Update the __flush_tlb_range_op macro not to modify its parameters as
    these are unexepcted semantics. In practice, this fixes the call to
    mmu_notifier_arch_invalidate_secondary_tlbs() in
    __flush_tlb_range_nosync() to use the correct range instead of an empty
    range with start=end. The empty range was (un)lucky as it results in
    taking the invalidate-all path that doesn't cause correctness issues,
    but can certainly result in suboptimal perf.
    
    This has been broken since commit 6bbd42e2df8f ("mmu_notifiers: call
    invalidate_range() when invalidating TLBs") when the call to the
    notifiers was added to __flush_tlb_range(). It predates the addition of
    the __flush_tlb_range_op() macro from commit 360839027a6e ("arm64: tlb:
    Refactor the core flush algorithm of __flush_tlb_range") that made the
    bug hard to spot.
    
    Fixes: 6bbd42e2df8f ("mmu_notifiers: call invalidate_range() when invalidating TLBs")
    
    Signed-off-by: Piotr Jaroszynski <pjaroszynski@nvidia.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: Robin Murphy <robin.murphy@arm.com>
    Cc: Alistair Popple <apopple@nvidia.com>
    Cc: Raghavendra Rao Ananta <rananta@google.com>
    Cc: SeongJae Park <sj@kernel.org>
    Cc: Jason Gunthorpe <jgg@nvidia.com>
    Cc: John Hubbard <jhubbard@nvidia.com>
    Cc: Nicolin Chen <nicolinc@nvidia.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: iommu@lists.linux.dev
    Cc: linux-mm@kvack.org
    Cc: linux-kernel@vger.kernel.org
    Cc: stable@vger.kernel.org
    Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
    Reviewed-by: Alistair Popple <apopple@nvidia.com>
    Link: https://lore.kernel.org/r/20250304085127.2238030-1-pjaroszynski@nvidia.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
fs/netfs/read_collect: add to next->prev_donated [+ + +]
Author: Max Kellermann <max.kellermann@ionos.com>
Date:   Thu Feb 20 16:24:50 2025 +0100

    fs/netfs/read_collect: add to next->prev_donated
    
    If multiple subrequests donate data to the same "next" request
    (depending on the subrequest completion order), each of them would
    overwrite the `prev_donated` field, causing data corruption and a
    BUG() crash ("Can't donate prior to front").
    
    Fixes: ee4cdf7ba857 ("netfs: Speed up buffered reading")
    Closes: https://lore.kernel.org/netfs/CAKPOu+_4mUwYgQtRTbXCmi+-k3PGvLysnPadkmHOyB7Gz0iSMA@mail.gmail.com/
    Cc: stable@vger.kernel.org
    Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
    Signed-off-by: David Howells <dhowells@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
fuse: don't truncate cached, mutated symlink [+ + +]
Author: Miklos Szeredi <mszeredi@redhat.com>
Date:   Thu Feb 20 11:02:58 2025 +0100

    fuse: don't truncate cached, mutated symlink
    
    [ Upstream commit b4c173dfbb6c78568578ff18f9e8822d7bd0e31b ]
    
    Fuse allows the value of a symlink to change and this property is exploited
    by some filesystems (e.g. CVMFS).
    
    It has been observed, that sometimes after changing the symlink contents,
    the value is truncated to the old size.
    
    This is caused by fuse_getattr() racing with fuse_reverse_inval_inode().
    fuse_reverse_inval_inode() updates the fuse_inode's attr_version, which
    results in fuse_change_attributes() exiting before updating the cached
    attributes
    
    This is okay, as the cached attributes remain invalid and the next call to
    fuse_change_attributes() will likely update the inode with the correct
    values.
    
    The reason this causes problems is that cached symlinks will be
    returned through page_get_link(), which truncates the symlink to
    inode->i_size.  This is correct for filesystems that don't mutate
    symlinks, but in this case it causes bad behavior.
    
    The solution is to just remove this truncation.  This can cause a
    regression in a filesystem that relies on supplying a symlink larger than
    the file size, but this is unlikely.  If that happens we'd need to make
    this behavior conditional.
    
    Reported-by: Laura Promberger <laura.promberger@cern.ch>
    Tested-by: Sam Lewis <samclewis@google.com>
    Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
    Link: https://lore.kernel.org/r/20250220100258.793363-1-mszeredi@redhat.com
    Reviewed-by: Bernd Schubert <bschubert@ddn.com>
    Signed-off-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
futex: Pass in task to futex_queue() [+ + +]
Author: Jens Axboe <axboe@kernel.dk>
Date:   Wed Jan 15 09:05:15 2025 -0700

    futex: Pass in task to futex_queue()
    
    [ Upstream commit 5e0e02f0d7e52cfc8b1adfc778dd02181d8b47b4 ]
    
    futex_queue() -> __futex_queue() uses 'current' as the task to store in
    the struct futex_q->task field. This is fine for synchronous usage of
    the futex infrastructure, but it's not always correct when used by
    io_uring where the task doing the initial futex_queue() might not be
    available later on. This doesn't lead to any issues currently, as the
    io_uring side doesn't support PI futexes, but it does leave a
    potentially dangling pointer which is never a good idea.
    
    Have futex_queue() take a task_struct argument, and have the regular
    callers pass in 'current' for that. Meanwhile io_uring can just pass in
    NULL, as the task should never be used off that path. In theory
    req->tctx->task could be used here, but there's no point populating it
    with a task field that will never be used anyway.
    
    Reported-by: Jann Horn <jannh@google.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/all/22484a23-542c-4003-b721-400688a0d055@kernel.dk
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
gpio: cdev: use raw notifier for line state events [+ + +]
Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Date:   Tue Mar 11 15:31:43 2025 +0100

    gpio: cdev: use raw notifier for line state events
    
    [ Upstream commit dcb73cbaaeb39c9fd00bf2e019f911725945e2fe ]
    
    We use a notifier to implement the mechanism of informing the user-space
    about changes in GPIO line status. We register with the notifier when
    the GPIO character device file is opened and unregister when the last
    reference to the associated file descriptor is dropped.
    
    Since commit fcc8b637c542 ("gpiolib: switch the line state notifier to
    atomic") we use the atomic notifier variant. Atomic notifiers call
    rcu_synchronize in atomic_notifier_chain_unregister() which caused a
    significant performance regression in some circumstances, observed by
    user-space when calling close() on the GPIO device file descriptor.
    
    Replace the atomic notifier with the raw variant and provide
    synchronization with a read-write spinlock.
    
    Fixes: fcc8b637c542 ("gpiolib: switch the line state notifier to atomic")
    Reported-by: David Jander <david@protonic.nl>
    Closes: https://lore.kernel.org/all/20250311110034.53959031@erd003.prtnl/
    Tested-by: David Jander <david@protonic.nl>
    Tested-by: Kent Gibson <warthog618@gmail.com>
    Link: https://lore.kernel.org/r/20250311-gpiolib-line-state-raw-notifier-v2-1-138374581e1e@linaro.org
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
gre: Fix IPv6 link-local address generation. [+ + +]
Author: Guillaume Nault <gnault@redhat.com>
Date:   Fri Mar 7 20:28:53 2025 +0100

    gre: Fix IPv6 link-local address generation.
    
    [ Upstream commit 183185a18ff96751db52a46ccf93fff3a1f42815 ]
    
    Use addrconf_addr_gen() to generate IPv6 link-local addresses on GRE
    devices in most cases and fall back to using add_v4_addrs() only in
    case the GRE configuration is incompatible with addrconf_addr_gen().
    
    GRE used to use addrconf_addr_gen() until commit e5dd729460ca
    ("ip/ip6_gre: use the same logic as SIT interfaces when computing v6LL
    address") restricted this use to gretap and ip6gretap devices, and
    created add_v4_addrs() (borrowed from SIT) for non-Ethernet GRE ones.
    
    The original problem came when commit 9af28511be10 ("addrconf: refuse
    isatap eui64 for INADDR_ANY") made __ipv6_isatap_ifid() fail when its
    addr parameter was 0. The commit says that this would create an invalid
    address, however, I couldn't find any RFC saying that the generated
    interface identifier would be wrong. Anyway, since gre over IPv4
    devices pass their local tunnel address to __ipv6_isatap_ifid(), that
    commit broke their IPv6 link-local address generation when the local
    address was unspecified.
    
    Then commit e5dd729460ca ("ip/ip6_gre: use the same logic as SIT
    interfaces when computing v6LL address") tried to fix that case by
    defining add_v4_addrs() and calling it to generate the IPv6 link-local
    address instead of using addrconf_addr_gen() (apart for gretap and
    ip6gretap devices, which would still use the regular
    addrconf_addr_gen(), since they have a MAC address).
    
    That broke several use cases because add_v4_addrs() isn't properly
    integrated into the rest of IPv6 Neighbor Discovery code. Several of
    these shortcomings have been fixed over time, but add_v4_addrs()
    remains broken on several aspects. In particular, it doesn't send any
    Router Sollicitations, so the SLAAC process doesn't start until the
    interface receives a Router Advertisement. Also, add_v4_addrs() mostly
    ignores the address generation mode of the interface
    (/proc/sys/net/ipv6/conf/*/addr_gen_mode), thus breaking the
    IN6_ADDR_GEN_MODE_RANDOM and IN6_ADDR_GEN_MODE_STABLE_PRIVACY cases.
    
    Fix the situation by using add_v4_addrs() only in the specific scenario
    where the normal method would fail. That is, for interfaces that have
    all of the following characteristics:
    
      * run over IPv4,
      * transport IP packets directly, not Ethernet (that is, not gretap
        interfaces),
      * tunnel endpoint is INADDR_ANY (that is, 0),
      * device address generation mode is EUI64.
    
    In all other cases, revert back to the regular addrconf_addr_gen().
    
    Also, remove the special case for ip6gre interfaces in add_v4_addrs(),
    since ip6gre devices now always use addrconf_addr_gen() instead.
    
    Fixes: e5dd729460ca ("ip/ip6_gre: use the same logic as SIT interfaces when computing v6LL address")
    Signed-off-by: Guillaume Nault <gnault@redhat.com>
    Reviewed-by: Ido Schimmel <idosch@nvidia.com>
    Link: https://patch.msgid.link/559c32ce5c9976b269e6337ac9abb6a96abe5096.1741375285.git.gnault@redhat.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
HID: apple: disable Fn key handling on the Omoton KB066 [+ + +]
Author: Alex Henrie <alexhenrie24@gmail.com>
Date:   Sun Feb 23 22:36:30 2025 -0700

    HID: apple: disable Fn key handling on the Omoton KB066
    
    commit 221cea1003d8a412e5ec64a58df7ab19b654f490 upstream.
    
    Remove the fixup to make the Omoton KB066's F6 key F6 when not holding
    Fn. That was really just a hack to allow typing F6 in fnmode>0, and it
    didn't fix any of the other F keys that were likewise untypable in
    fnmode>0. Instead, because the Omoton's Fn key is entirely internal to
    the keyboard, completely disable Fn key translation when an Omoton is
    detected, which will prevent the hid-apple driver from interfering with
    the keyboard's built-in Fn key handling. All of the F keys, including
    F6, are then typable when Fn is held.
    
    The Omoton KB066 and the Apple A1255 both have HID product code
    05ac:022c. The self-reported name of every original A1255 when they left
    the factory was "Apple Wireless Keyboard". By default, Mac OS changes
    the name to "<username>'s keyboard" when pairing with the keyboard, but
    Mac OS allows the user to set the internal name of Apple keyboards to
    anything they like. The Omoton KB066's name, on the other hand, is not
    configurable: It is always "Bluetooth Keyboard". Because that name is so
    generic that a user might conceivably use the same name for a real Apple
    keyboard, detect Omoton keyboards based on both having that exact name
    and having HID product code 022c.
    
    Fixes: 819083cb6eed ("HID: apple: fix up the F6 key on the Omoton KB066 keyboard")
    Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
    Reviewed-by: Aditya Garg <gargaditya08@live.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

HID: apple: fix up the F6 key on the Omoton KB066 keyboard [+ + +]
Author: Alex Henrie <alexhenrie24@gmail.com>
Date:   Thu Jan 16 23:12:17 2025 -0700

    HID: apple: fix up the F6 key on the Omoton KB066 keyboard
    
    [ Upstream commit 819083cb6eedcc8495cbf84845877bcc741b93b3 ]
    
    The Omoton KB066 is an Apple A1255 keyboard clone (HID product code
    05ac:022c). On both keyboards, the F6 key becomes Num Lock when the Fn
    key is held. But unlike its Apple exemplar, when the Omoton's F6 key is
    pressed without Fn, it sends the usage code 0xC0301 from the reserved
    section of the consumer page instead of the standard F6 usage code
    0x7003F from the keyboard page. The nonstandard code is translated to
    KEY_UNKNOWN and becomes useless on Linux. The Omoton KB066 is a pretty
    popular keyboard, judging from its 29,058 reviews on Amazon at time of
    writing, so let's account for its quirk to make it more usable.
    
    By the way, it would be nice if we could automatically set fnmode to 0
    for Omoton keyboards because they handle the Fn key internally and the
    kernel's Fn key handling creates undesirable side effects such as making
    F1 and F2 always Brightness Up and Brightness Down in fnmode=1 (the
    default) or always F1 and F2 in fnmode=2. Unfortunately I don't think
    there's a way to identify Bluetooth keyboards more specifically than the
    HID product code which is obviously inaccurate. Users of Omoton
    keyboards will just have to set fnmode to 0 manually to get full Fn key
    functionality.
    
    Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: hid-apple: Apple Magic Keyboard a3203 USB-C support [+ + +]
Author: Ievgen Vovk <YevgenVovk@ukr.net>
Date:   Sun Jan 12 13:13:14 2025 +0900

    HID: hid-apple: Apple Magic Keyboard a3203 USB-C support
    
    [ Upstream commit 2813e00dcd748cef47d2bffaa04071de93fddf00 ]
    
    Add Apple Magic Keyboard 2024 model (with USB-C port) device ID (0320)
    to those recognized by the hid-apple driver. Keyboard is otherwise
    compatible with the existing implementation for its earlier 2021 model.
    
    Signed-off-by: Ievgen Vovk <YevgenVovk@ukr.net>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: hid-steam: Fix issues with disabling both gamepad mode and lizard mode [+ + +]
Author: Vicki Pfau <vi@endrift.com>
Date:   Wed Jan 15 17:28:16 2025 -0800

    HID: hid-steam: Fix issues with disabling both gamepad mode and lizard mode
    
    [ Upstream commit 05c4ede6951b5d8e083b6bb237950cac59bdeb92 ]
    
    When lizard mode is disabled, there were two issues:
    
    1. Switching between gamepad mode and desktop mode still functioned, even
    though desktop mode did not. This lead to the ability to "break" gamepad mode
    by holding down the Options key even while lizard mode is disabled
    
    2. If you were in desktop mode when lizard mode is disabled, you would
    immediately enter this faulty mode.
    
    This patch properly disables the ability to switch between gamepad mode and the
    faulty desktop mode by holding the Options key, as well as effectively removing
    the faulty mode by bypassing the early returns if lizard mode is disabled.
    
    Reported-by: Eugeny Shcheglov <eugenyshcheglov@gmail.com>
    Signed-off-by: Vicki Pfau <vi@endrift.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: ignore non-functional sensor in HP 5MP Camera [+ + +]
Author: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Date:   Wed Jan 15 15:00:20 2025 +0800

    HID: ignore non-functional sensor in HP 5MP Camera
    
    [ Upstream commit 363236d709e75610b628c2a4337ccbe42e454b6d ]
    
    The HP 5MP Camera (USB ID 0408:5473) reports a HID sensor interface that
    is not actually implemented. Attempting to access this non-functional
    sensor via iio_info causes system hangs as runtime PM tries to wake up
    an unresponsive sensor.
    
      [453] hid-sensor-hub 0003:0408:5473.0003: Report latency attributes: ffffffff:ffffffff
      [453] hid-sensor-hub 0003:0408:5473.0003: common attributes: 5:1, 2:1, 3:1 ffffffff:ffffffff
    
    Add this device to the HID ignore list since the sensor interface is
    non-functional by design and should not be exposed to userspace.
    
    Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
    Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: intel-ish-hid: fix the length of MNG_SYNC_FW_CLOCK in doorbell [+ + +]
Author: Zhang Lixu <lixu.zhang@intel.com>
Date:   Wed Jan 22 09:29:00 2025 +0800

    HID: intel-ish-hid: fix the length of MNG_SYNC_FW_CLOCK in doorbell
    
    [ Upstream commit 4b54ae69197b9f416baa0fceadff7e89075f8454 ]
    
    The timestamps in the Firmware log and HID sensor samples are incorrect.
    They show 1970-01-01 because the current IPC driver only uses the first
    8 bytes of bootup time when synchronizing time with the firmware. The
    firmware converts the bootup time to UTC time, which results in the
    display of 1970-01-01.
    
    In write_ipc_from_queue(), when sending the MNG_SYNC_FW_CLOCK message,
    the clock is updated according to the definition of ipc_time_update_msg.
    However, in _ish_sync_fw_clock(), the message length is specified as the
    size of uint64_t when building the doorbell. As a result, the firmware
    only receives the first 8 bytes of struct ipc_time_update_msg.
    This patch corrects the length in the doorbell to ensure the entire
    ipc_time_update_msg is sent, fixing the timestamp issue.
    
    Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
    Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: intel-ish-hid: ipc: Add Panther Lake PCI device IDs [+ + +]
Author: Zhang Lixu <lixu.zhang@intel.com>
Date:   Thu Jan 23 09:30:44 2025 +0800

    HID: intel-ish-hid: ipc: Add Panther Lake PCI device IDs
    
    [ Upstream commit 18c966b62819b9d3b99eac8fb8cdc8950826e0c2 ]
    
    Add device IDs of Panther Lake-H and Panther Lake-P into ishtp support
    list.
    
    Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
    Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: intel-ish-hid: Send clock sync message immediately after reset [+ + +]
Author: Zhang Lixu <lixu.zhang@intel.com>
Date:   Wed Jan 22 09:29:01 2025 +0800

    HID: intel-ish-hid: Send clock sync message immediately after reset
    
    [ Upstream commit 7e0d1cff12b895f44f4ddc8cf50311bc1f775201 ]
    
    The ISH driver performs a clock sync with the firmware once at system
    startup and then every 20 seconds. If a firmware reset occurs right
    after a clock sync, the driver would wait 20 seconds before performing
    another clock sync with the firmware. This is particularly problematic
    with the introduction of the "load firmware from host" feature, where
    the driver performs a clock sync with the bootloader and then has to
    wait 20 seconds before syncing with the main firmware.
    
    This patch clears prev_sync immediately upon receiving an IPC reset,
    so that the main firmware and driver will perform a clock sync
    immediately after completing the IPC handshake.
    
    Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
    Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: topre: Fix n-key rollover on Realforce R3S TKL boards [+ + +]
Author: Daniel Brackenbury <daniel.brackenbury@gmail.com>
Date:   Tue Jan 28 20:08:49 2025 -0500

    HID: topre: Fix n-key rollover on Realforce R3S TKL boards
    
    [ Upstream commit 9271af9d846c7e49c8709b58d5853cb73c00b193 ]
    
    Newer model R3* Topre Realforce keyboards share an issue with their older
    R2 cousins where a report descriptor fixup is needed in order for n-key
    rollover to work correctly, otherwise only 6-key rollover is available.
    This patch adds some new hardware IDs for the R3S 87-key keyboard and
    makes amendments to the existing hid-topre driver in order to change the
    correct byte in the new model.
    
    Signed-off-by: Daniel Brackenbury <daniel.brackenbury@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
hrtimers: Mark is_migration_base() with __always_inline [+ + +]
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date:   Thu Jan 16 18:07:45 2025 +0200

    hrtimers: Mark is_migration_base() with __always_inline
    
    [ Upstream commit 27af31e44949fa85550176520ef7086a0d00fd7b ]
    
    When is_migration_base() is unused, it prevents kernel builds
    with clang, `make W=1` and CONFIG_WERROR=y:
    
    kernel/time/hrtimer.c:156:20: error: unused function 'is_migration_base' [-Werror,-Wunused-function]
      156 | static inline bool is_migration_base(struct hrtimer_clock_base *base)
          |                    ^~~~~~~~~~~~~~~~~
    
    Fix this by marking it with __always_inline.
    
    [ tglx: Use __always_inline instead of __maybe_unused and move it into the
            usage sites conditional ]
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/all/20250116160745.243358-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
i2c: ali1535: Fix an error handling path in ali1535_probe() [+ + +]
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date:   Mon Mar 3 20:53:08 2025 +0100

    i2c: ali1535: Fix an error handling path in ali1535_probe()
    
    [ Upstream commit 9b5463f349d019a261f1e80803447efca3126151 ]
    
    If i2c_add_adapter() fails, the request_region() call in ali1535_setup()
    must be undone by a corresponding release_region() call, as done in the
    remove function.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
    Link: https://lore.kernel.org/r/0daf63d7a2ce74c02e2664ba805bbfadab7d25e5.1741031571.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Sasha Levin <sashal@kernel.org>

i2c: ali15x3: Fix an error handling path in ali15x3_probe() [+ + +]
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date:   Mon Mar 3 20:58:06 2025 +0100

    i2c: ali15x3: Fix an error handling path in ali15x3_probe()
    
    [ Upstream commit 6e55caaf30c88209d097e575a169b1dface1ab69 ]
    
    If i2c_add_adapter() fails, the request_region() call in ali15x3_setup()
    must be undone by a corresponding release_region() call, as done in the
    remove function.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
    Link: https://lore.kernel.org/r/9b2090cbcc02659f425188ea05f2e02745c4e67b.1741031878.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Sasha Levin <sashal@kernel.org>

i2c: sis630: Fix an error handling path in sis630_probe() [+ + +]
Author: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date:   Mon Mar 3 21:26:54 2025 +0100

    i2c: sis630: Fix an error handling path in sis630_probe()
    
    [ Upstream commit 2b22459792fcb4def9f0936d64575ac11a95a58d ]
    
    If i2c_add_adapter() fails, the request_region() call in sis630_setup()
    must be undone by a corresponding release_region() call, as done in the
    remove function.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Link: https://lore.kernel.org/r/3d607601f2c38e896b10207963c6ab499ca5c307.1741033587.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ice: do not configure destination override for switchdev [+ + +]
Author: Larysa Zaremba <larysa.zaremba@intel.com>
Date:   Mon Dec 9 15:08:53 2024 +0100

    ice: do not configure destination override for switchdev
    
    [ Upstream commit 3be83ee9de0298f8321aa0b148d8f9995102e40f ]
    
    After switchdev is enabled and disabled later, LLDP packets sending stops,
    despite working perfectly fine before and during switchdev state.
    To reproduce (creating/destroying VF is what triggers the reconfiguration):
    
    devlink dev eswitch set pci/<address> mode switchdev
    echo '2' > /sys/class/net/<ifname>/device/sriov_numvfs
    echo '0' > /sys/class/net/<ifname>/device/sriov_numvfs
    
    This happens because LLDP relies on the destination override functionality.
    It needs to 1) set a flag in the descriptor, 2) set the VSI permission to
    make it valid. The permissions are set when the PF VSI is first configured,
    but switchdev then enables it for the uplink VSI (which is always the PF)
    once more when configured and disables when deconfigured, which leads to
    software-generated LLDP packets being blocked.
    
    Do not modify the destination override permissions when configuring
    switchdev, as the enabled state is the default configuration that is never
    modified.
    
    Fixes: 1a1c40df2e80 ("ice: set and release switchdev environment")
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
    Signed-off-by: Larysa Zaremba <larysa.zaremba@intel.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ice: fix memory leak in aRFS after reset [+ + +]
Author: Grzegorz Nitka <grzegorz.nitka@intel.com>
Date:   Thu Jan 23 09:15:39 2025 +0100

    ice: fix memory leak in aRFS after reset
    
    [ Upstream commit 23d97f18901ef5e4e264e3b1777fe65c760186b5 ]
    
    Fix aRFS (accelerated Receive Flow Steering) structures memory leak by
    adding a checker to verify if aRFS memory is already allocated while
    configuring VSI. aRFS objects are allocated in two cases:
    - as part of VSI initialization (at probe), and
    - as part of reset handling
    
    However, VSI reconfiguration executed during reset involves memory
    allocation one more time, without prior releasing already allocated
    resources. This led to the memory leak with the following signature:
    
    [root@os-delivery ~]# cat /sys/kernel/debug/kmemleak
    unreferenced object 0xff3c1ca7252e6000 (size 8192):
      comm "kworker/0:0", pid 8, jiffies 4296833052
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace (crc 0):
        [<ffffffff991ec485>] __kmalloc_cache_noprof+0x275/0x340
        [<ffffffffc0a6e06a>] ice_init_arfs+0x3a/0xe0 [ice]
        [<ffffffffc09f1027>] ice_vsi_cfg_def+0x607/0x850 [ice]
        [<ffffffffc09f244b>] ice_vsi_setup+0x5b/0x130 [ice]
        [<ffffffffc09c2131>] ice_init+0x1c1/0x460 [ice]
        [<ffffffffc09c64af>] ice_probe+0x2af/0x520 [ice]
        [<ffffffff994fbcd3>] local_pci_probe+0x43/0xa0
        [<ffffffff98f07103>] work_for_cpu_fn+0x13/0x20
        [<ffffffff98f0b6d9>] process_one_work+0x179/0x390
        [<ffffffff98f0c1e9>] worker_thread+0x239/0x340
        [<ffffffff98f14abc>] kthread+0xcc/0x100
        [<ffffffff98e45a6d>] ret_from_fork+0x2d/0x50
        [<ffffffff98e083ba>] ret_from_fork_asm+0x1a/0x30
        ...
    
    Fixes: 28bf26724fdb ("ice: Implement aRFS")
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
    Signed-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ice: Fix switchdev slow-path in LAG [+ + +]
Author: Marcin Szycik <marcin.szycik@linux.intel.com>
Date:   Thu Jan 2 20:07:52 2025 +0100

    ice: Fix switchdev slow-path in LAG
    
    [ Upstream commit dce97cb0a3e34204c0b99345418a714eac85953f ]
    
    Ever since removing switchdev control VSI and using PF for port
    representor Tx/Rx, switchdev slow-path has been working improperly after
    failover in SR-IOV LAG. LAG assumes that the first uplink to be added to
    the aggregate will own VFs and have switchdev configured. After
    failing-over to the other uplink, representors are still configured to
    Tx through the uplink they are set up on, which fails because that
    uplink is now down.
    
    On failover, update all PRs on primary uplink to use the currently
    active uplink for Tx. Call netif_keep_dst(), as the secondary uplink
    might not be in switchdev mode. Also make sure to call
    ice_eswitch_set_target_vsi() if uplink is in LAG.
    
    On the Rx path, representors are already working properly, because
    default Tx from VFs is set to PF owning the eswitch. After failover the
    same PF is receiving traffic from VFs, even though link is down.
    
    Fixes: defd52455aee ("ice: do Tx through PF netdev in slow-path")
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
    Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
    Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Input: ads7846 - fix gpiod allocation [+ + +]
Author: H. Nikolaus Schaller <hns@goldelico.com>
Date:   Sat Feb 1 12:43:24 2025 +0100

    Input: ads7846 - fix gpiod allocation
    
    commit c9ccb88f534ca760d06590b67571c353a2f0cbcd upstream.
    
    commit 767d83361aaa ("Input: ads7846 - Convert to use software nodes")
    
    has simplified the code but accidentially converted a devm_gpiod_get()
    to gpiod_get(). This leaves the gpio reserved on module remove and the
    driver can no longer be loaded again.
    
    Fixes: 767d83361aaa ("Input: ads7846 - Convert to use software nodes")
    Cc: stable@vger.kernel.org
    Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
    Link: https://lore.kernel.org/r/6e9b143f19cdfda835711a8a7a3966e5a2494cff.1738410204.git.hns@goldelico.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: goodix-berlin - fix vddio regulator references [+ + +]
Author: Luca Weiss <luca.weiss@fairphone.com>
Date:   Fri Jan 3 10:21:36 2025 +0100

    Input: goodix-berlin - fix vddio regulator references
    
    commit 3b0011059334a1cf554c2c1f67d7a7b822d8238a upstream.
    
    As per dt-bindings the property is called vddio-supply, so use the
    correct name in the driver instead of iovdd. The datasheet also calls
    the supply 'VDDIO'.
    
    Fixes: 44362279bdd4 ("Input: add core support for Goodix Berlin Touchscreen IC")
    Cc: stable@vger.kernel.org
    Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
    Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
    Link: https://lore.kernel.org/r/20250103-goodix-berlin-fixes-v1-2-b014737b08b2@fairphone.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: i8042 - add required quirks for missing old boardnames [+ + +]
Author: Werner Sembach <wse@tuxedocomputers.com>
Date:   Sat Feb 22 00:01:23 2025 +0100

    Input: i8042 - add required quirks for missing old boardnames
    
    commit 9ed468e17d5b80e7116fd35842df3648e808ae47 upstream.
    
    Some older Clevo barebones have problems like no or laggy keyboard after
    resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE
    quirk.
    
    The PB71RD keyboard is sometimes laggy after resume and the PC70DR, PB51RF,
    P640RE, and PCX0DX_GN20 keyboard is sometimes unresponsive after resume.
    This quirk fixes that.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
    Link: https://lore.kernel.org/r/20250221230137.70292-2-wse@tuxedocomputers.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: i8042 - swap old quirk combination with new quirk for more devices [+ + +]
Author: Werner Sembach <wse@tuxedocomputers.com>
Date:   Sat Feb 22 00:01:25 2025 +0100

    Input: i8042 - swap old quirk combination with new quirk for more devices
    
    commit d85862ccca452eeb19329e9f4f9a6ce1d1e53561 upstream.
    
    Some older Clevo barebones have problems like no or laggy keyboard after
    resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE
    quirk.
    
    We could not activly retest these devices because we no longer have them in
    our archive, but based on the other old Clevo barebones we tested where the
    new quirk had the same or a better behaviour I think it would be good to
    apply it on these too.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
    Link: https://lore.kernel.org/r/20250221230137.70292-4-wse@tuxedocomputers.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: i8042 - swap old quirk combination with new quirk for NHxxRZQ [+ + +]
Author: Werner Sembach <wse@tuxedocomputers.com>
Date:   Sat Feb 22 00:01:22 2025 +0100

    Input: i8042 - swap old quirk combination with new quirk for NHxxRZQ
    
    commit 729d163232971672d0f41b93c02092fb91f0e758 upstream.
    
    Some older Clevo barebones have problems like no or laggy keyboard after
    resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE
    quirk.
    
    With the old i8042 quirks this devices keyboard is sometimes laggy after
    resume. With the new quirk this issue doesn't happen.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
    Link: https://lore.kernel.org/r/20250221230137.70292-1-wse@tuxedocomputers.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: i8042 - swap old quirk combination with new quirk for several devices [+ + +]
Author: Werner Sembach <wse@tuxedocomputers.com>
Date:   Sat Feb 22 00:01:24 2025 +0100

    Input: i8042 - swap old quirk combination with new quirk for several devices
    
    commit 75ee4ebebbbe8dc4b55ba37f388924fa96bf1564 upstream.
    
    Some older Clevo barebones have problems like no or laggy keyboard after
    resume or boot which can be fixed with the SERIO_QUIRK_FORCENORESTORE
    quirk.
    
    While the old quirk combination did not show negative effects on these
    devices specifically, the new quirk works just as well and seems more
    stable in general.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
    Link: https://lore.kernel.org/r/20250221230137.70292-3-wse@tuxedocomputers.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: iqs7222 - preserve system status register [+ + +]
Author: Jeff LaBundy <jeff@labundy.com>
Date:   Sun Mar 9 20:29:59 2025 -0500

    Input: iqs7222 - preserve system status register
    
    commit a2add513311b48cc924a699a8174db2c61ed5e8a upstream.
    
    Some register groups reserve a byte at the end of their continuous
    address space. Depending on the variant of silicon, this field may
    share the same memory space as the lower byte of the system status
    register (0x10).
    
    In these cases, caching the reserved byte and writing it later may
    effectively reset the device depending on what happened in between
    the read and write operations.
    
    Solve this problem by avoiding any access to this last byte within
    offending register groups. This method replaces a workaround which
    attempted to write the reserved byte with up-to-date contents, but
    left a small window in which updates by the device could have been
    clobbered.
    
    Now that the driver does not touch these reserved bytes, the order
    in which the device's registers are written no longer matters, and
    they can be written in their natural order. The new method is also
    much more generic, and can be more easily extended to new variants
    of silicon with different register maps.
    
    As part of this change, the register read and write functions must
    be gently updated to support byte access instead of word access.
    
    Fixes: 2e70ef525b73 ("Input: iqs7222 - acknowledge reset before writing registers")
    Signed-off-by: Jeff LaBundy <jeff@labundy.com>
    Link: https://lore.kernel.org/r/Z85Alw+d9EHKXx2e@nixie71
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: xpad - add 8BitDo SN30 Pro, Hyperkin X91 and Gamesir G7 SE controllers [+ + +]
Author: Nilton Perim Neto <niltonperimneto@gmail.com>
Date:   Mon Feb 3 07:13:09 2025 -0800

    Input: xpad - add 8BitDo SN30 Pro, Hyperkin X91 and Gamesir G7 SE controllers
    
    commit 36e093c8dcc585d0a9e79a005f721f01f3365eba upstream.
    
    Add 8BitDo SN30 Pro, Hyperkin X91 and Gamesir G7 SE to the list of
    recognized controllers, and update vendor comments to match.
    
    Signed-off-by: Nilton Perim Neto <niltonperimneto@gmail.com>
    Link: https://lore.kernel.org/r/20250122214814.102311-2-niltonperimneto@gmail.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: xpad - add multiple supported devices [+ + +]
Author: Pavel Rojtberg <rojtberg@gmail.com>
Date:   Mon Feb 3 07:22:27 2025 -0800

    Input: xpad - add multiple supported devices
    
    commit 3492321e2e60ddfe91aa438bb9ac209016f48f7a upstream.
    
    This is based on multiple commits at https://github.com/paroj/xpad
    that had bouncing email addresses and were not signed off.
    
    Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
    Link: https://lore.kernel.org/r/20250123175404.23254-1-rojtberg@gmail.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: xpad - add support for TECNO Pocket Go [+ + +]
Author: Antheas Kapenekakis <lkml@antheas.dev>
Date:   Mon Feb 24 23:00:29 2025 -0800

    Input: xpad - add support for TECNO Pocket Go
    
    commit 95a54a96f657fd069d2a9922b6c2d293a72a001f upstream.
    
    TECNO Pocket Go is a kickstarter handheld by manufacturer TECNO Mobile.
    It poses a unique feature: it does not have a display. Instead, the
    handheld is essentially a pc in a controller. As customary, it has an
    xpad endpoint, a keyboard endpoint, and a vendor endpoint for its
    vendor software.
    
    Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
    Link: https://lore.kernel.org/r/20250222170010.188761-3-lkml@antheas.dev
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: xpad - add support for ZOTAC Gaming Zone [+ + +]
Author: Antheas Kapenekakis <lkml@antheas.dev>
Date:   Mon Feb 24 22:59:34 2025 -0800

    Input: xpad - add support for ZOTAC Gaming Zone
    
    commit 709329c48214ad2acf12eed1b5c0eb798e40a64c upstream.
    
    ZOTAC Gaming Zone is ZOTAC's 2024 handheld release. As it is common
    with these handhelds, it uses a hybrid USB device with an xpad
    endpoint, a keyboard endpoint, and a vendor-specific endpoint for
    RGB control et al.
    
    Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
    Link: https://lore.kernel.org/r/20250222170010.188761-2-lkml@antheas.dev
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Input: xpad - rename QH controller to Legion Go S [+ + +]
Author: Antheas Kapenekakis <lkml@antheas.dev>
Date:   Mon Feb 24 23:01:55 2025 -0800

    Input: xpad - rename QH controller to Legion Go S
    
    commit 659a7614dd72e2835ac0b220c2fa68fabd8d1df9 upstream.
    
    The QH controller is actually the controller of the Legion Go S, with
    the manufacturer string wch.cn and product name Legion Go S in its
    USB descriptor. A cursory lookup of the VID reveals the same.
    
    Therefore, rename the xpad entries to match.
    
    Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
    Link: https://lore.kernel.org/r/20250222170010.188761-4-lkml@antheas.dev
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
io-wq: backoff when retrying worker creation [+ + +]
Author: Uday Shankar <ushankar@purestorage.com>
Date:   Sat Feb 8 13:42:13 2025 -0700

    io-wq: backoff when retrying worker creation
    
    [ Upstream commit 13918315c5dc5a515926c8799042ea6885c2b734 ]
    
    When io_uring submission goes async for the first time on a given task,
    we'll try to create a worker thread to handle the submission. Creating
    this worker thread can fail due to various transient conditions, such as
    an outstanding signal in the forking thread, so we have retry logic with
    a limit of 3 retries. However, this retry logic appears to be too
    aggressive/fast - we've observed a thread blowing through the retry
    limit while having the same outstanding signal the whole time. Here's an
    excerpt of some tracing that demonstrates the issue:
    
    First, signal 26 is generated for the process. It ends up getting routed
    to thread 92942.
    
     0)   cbd-92284    /* signal_generate: sig=26 errno=0 code=-2 comm=psblkdASD pid=92934 grp=1 res=0 */
    
    This causes create_io_thread in the signalled thread to fail with
    ERESTARTNOINTR, and thus a retry is queued.
    
    13) task_th-92942  /* io_uring_queue_async_work: ring 000000007325c9ae, request 0000000080c96d8e, user_data 0x0, opcode URING_CMD, flags 0x8240001, normal queue, work 000000006e96dd3f */
    13) task_th-92942  io_wq_enqueue() {
    13) task_th-92942    _raw_spin_lock();
    13) task_th-92942    io_wq_activate_free_worker();
    13) task_th-92942    _raw_spin_lock();
    13) task_th-92942    create_io_worker() {
    13) task_th-92942      __kmalloc_cache_noprof();
    13) task_th-92942      __init_swait_queue_head();
    13) task_th-92942      kprobe_ftrace_handler() {
    13) task_th-92942        get_kprobe();
    13) task_th-92942        aggr_pre_handler() {
    13) task_th-92942          pre_handler_kretprobe();
    13) task_th-92942          /* create_enter: (create_io_thread+0x0/0x50) fn=0xffffffff8172c0e0 arg=0xffff888996bb69c0 node=-1 */
    13) task_th-92942        } /* aggr_pre_handler */
    ...
    13) task_th-92942        } /* copy_process */
    13) task_th-92942      } /* create_io_thread */
    13) task_th-92942      kretprobe_rethook_handler() {
    13) task_th-92942        /* create_exit: (create_io_worker+0x8a/0x1a0 <- create_io_thread) arg1=0xfffffffffffffdff */
    13) task_th-92942      } /* kretprobe_rethook_handler */
    13) task_th-92942    queue_work_on() {
    ...
    
    The CPU is then handed to a kworker to process the queued retry:
    
    ------------------------------------------
     13) task_th-92942  => kworker-54154
    ------------------------------------------
    13) kworker-54154  io_workqueue_create() {
    13) kworker-54154    io_queue_worker_create() {
    13) kworker-54154      task_work_add() {
    13) kworker-54154        wake_up_state() {
    13) kworker-54154          try_to_wake_up() {
    13) kworker-54154            _raw_spin_lock_irqsave();
    13) kworker-54154            _raw_spin_unlock_irqrestore();
    13) kworker-54154          } /* try_to_wake_up */
    13) kworker-54154        } /* wake_up_state */
    13) kworker-54154        kick_process();
    13) kworker-54154      } /* task_work_add */
    13) kworker-54154    } /* io_queue_worker_create */
    13) kworker-54154  } /* io_workqueue_create */
    
    And then we immediately switch back to the original task to try creating
    a worker again. This fails, because the original task still hasn't
    handled its signal.
    
    -----------------------------------------
     13) kworker-54154  => task_th-92942
    ------------------------------------------
    13) task_th-92942  create_worker_cont() {
    13) task_th-92942    kprobe_ftrace_handler() {
    13) task_th-92942      get_kprobe();
    13) task_th-92942      aggr_pre_handler() {
    13) task_th-92942        pre_handler_kretprobe();
    13) task_th-92942        /* create_enter: (create_io_thread+0x0/0x50) fn=0xffffffff8172c0e0 arg=0xffff888996bb69c0 node=-1 */
    13) task_th-92942      } /* aggr_pre_handler */
    13) task_th-92942    } /* kprobe_ftrace_handler */
    13) task_th-92942    create_io_thread() {
    13) task_th-92942      copy_process() {
    13) task_th-92942        task_active_pid_ns();
    13) task_th-92942        _raw_spin_lock_irq();
    13) task_th-92942        recalc_sigpending();
    13) task_th-92942        _raw_spin_lock_irq();
    13) task_th-92942      } /* copy_process */
    13) task_th-92942    } /* create_io_thread */
    13) task_th-92942    kretprobe_rethook_handler() {
    13) task_th-92942      /* create_exit: (create_worker_cont+0x35/0x1b0 <- create_io_thread) arg1=0xfffffffffffffdff */
    13) task_th-92942    } /* kretprobe_rethook_handler */
    13) task_th-92942    io_worker_release();
    13) task_th-92942    queue_work_on() {
    13) task_th-92942      clear_pending_if_disabled();
    13) task_th-92942      __queue_work() {
    13) task_th-92942      } /* __queue_work */
    13) task_th-92942    } /* queue_work_on */
    13) task_th-92942  } /* create_worker_cont */
    
    The pattern repeats another couple times until we blow through the retry
    counter, at which point we give up. All outstanding work is canceled,
    and the io_uring command which triggered all this is failed with
    ECANCELED:
    
    13) task_th-92942  io_acct_cancel_pending_work() {
    ...
    13) task_th-92942  /* io_uring_complete: ring 000000007325c9ae, req 0000000080c96d8e, user_data 0x0, result -125, cflags 0x0 extra1 0 extra2 0  */
    
    Finally, the task gets around to processing its outstanding signal 26,
    but it's too late.
    
    13) task_th-92942  /* signal_deliver: sig=26 errno=0 code=-2 sa_handler=59566a0 sa_flags=14000000 */
    
    Try to address this issue by adding a small scaling delay when retrying
    worker creation. This should give the forking thread time to handle its
    signal in the above case. This isn't a particularly satisfying solution,
    as sufficiently paradoxical scheduling would still have us hitting the
    same issue, and I'm open to suggestions for something better. But this
    is likely to prevent this (already rare) issue from hitting in practice.
    
    Signed-off-by: Uday Shankar <ushankar@purestorage.com>
    Link: https://lore.kernel.org/r/20250208-wq_retry-v2-1-4f6f5041d303@purestorage.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ipvs: prevent integer overflow in do_ip_vs_get_ctl() [+ + +]
Author: Dan Carpenter <dan.carpenter@linaro.org>
Date:   Mon Mar 10 10:45:53 2025 +0300

    ipvs: prevent integer overflow in do_ip_vs_get_ctl()
    
    [ Upstream commit 80b78c39eb86e6b55f56363b709eb817527da5aa ]
    
    The get->num_services variable is an unsigned int which is controlled by
    the user.  The struct_size() function ensures that the size calculation
    does not overflow an unsigned long, however, we are saving the result to
    an int so the calculation can overflow.
    
    Both "len" and "get->num_services" come from the user.  This check is
    just a sanity check to help the user and ensure they are using the API
    correctly.  An integer overflow here is not a big deal.  This has no
    security impact.
    
    Save the result from struct_size() type size_t to fix this integer
    overflow bug.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
    Acked-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
irqchip/riscv: Ensure ordering of memory writes and IPI writes [+ + +]
Author: Xu Lu <luxu.kernel@bytedance.com>
Date:   Mon Jan 27 17:38:46 2025 +0800

    irqchip/riscv: Ensure ordering of memory writes and IPI writes
    
    [ Upstream commit 825c78e6a60c309a59d18d5ac5968aa79cef0bd6 ]
    
    RISC-V distinguishes between memory accesses and device I/O and uses FENCE
    instruction to order them as viewed by other RISC-V harts and external
    devices or coprocessors. The FENCE instruction can order any combination of
    device input(I), device output(O), memory reads(R) and memory
    writes(W). For example, 'fence w, o' is used to ensure all memory writes
    from instructions preceding the FENCE instruction appear earlier in the
    global memory order than device output writes from instructions after the
    FENCE instruction.
    
    RISC-V issues IPIs by writing to the IMSIC/ACLINT MMIO registers, which is
    regarded as device output operation. However, the existing implementation
    of the IMSIC/ACLINT drivers issue the IPI via writel_relaxed(), which does
    not guarantee the order of device output operation and preceding memory
    writes. As a consequence the hart receiving the IPI might not observe the
    IPI related data.
    
    Fix this by replacing writel_relaxed() with writel() when issuing IPIs,
    which uses 'fence w, o' to ensure all previous writes made by the current
    hart are visible to other harts before they receive the IPI.
    
    Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/all/20250127093846.98625-1-luxu.kernel@bytedance.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic() [+ + +]
Author: Chengen Du <chengen.du@canonical.com>
Date:   Tue Jan 14 12:12:34 2025 +0800

    iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic()
    
    [ Upstream commit 07e0d99a2f701123ad3104c0f1a1e66bce74d6e5 ]
    
    When performing an iSCSI boot using IPv6, iscsistart still reads the
    /sys/firmware/ibft/ethernetX/subnet-mask entry. Since the IPv6 prefix
    length is 64, this causes the shift exponent to become negative,
    triggering a UBSAN warning. As the concept of a subnet mask does not
    apply to IPv6, the value is set to ~0 to suppress the warning message.
    
    Signed-off-by: Chengen Du <chengen.du@canonical.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
kbuild: keep symbols for symbol_get() even with CONFIG_TRIM_UNUSED_KSYMS [+ + +]
Author: Masahiro Yamada <masahiroy@kernel.org>
Date:   Sun Feb 2 03:51:41 2025 +0900

    kbuild: keep symbols for symbol_get() even with CONFIG_TRIM_UNUSED_KSYMS
    
    [ Upstream commit 4c56eb33e603c3b9eb4bd24efbfdd0283c1c37e4 ]
    
    Linus observed that the symbol_request(utf8_data_table) call fails when
    CONFIG_UNICODE=y and CONFIG_TRIM_UNUSED_KSYMS=y.
    
    symbol_get() relies on the symbol data being present in the ksymtab for
    symbol lookups. However, EXPORT_SYMBOL_GPL(utf8_data_table) is dropped
    due to CONFIG_TRIM_UNUSED_KSYMS, as no module references it in this case.
    
    Probably, this has been broken since commit dbacb0ef670d ("kconfig option
    for TRIM_UNUSED_KSYMS").
    
    This commit addresses the issue by leveraging modpost. Symbol names
    passed to symbol_get() are recorded in the special .no_trim_symbol
    section, which is then parsed by modpost to forcibly keep such symbols.
    The .no_trim_symbol section is discarded by the linker scripts, so there
    is no impact on the size of the final vmlinux or modules.
    
    This commit cannot resolve the issue for direct calls to __symbol_get()
    because the symbol name is not known at compile-time.
    
    Although symbol_get() may eventually be deprecated, this workaround
    should be good enough meanwhile.
    
    Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
    Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ksmbd: fix use-after-free in ksmbd_free_work_struct [+ + +]
Author: Namjae Jeon <linkinjeon@kernel.org>
Date:   Wed Mar 5 21:21:43 2025 +0900

    ksmbd: fix use-after-free in ksmbd_free_work_struct
    
    commit bb39ed47065455604729404729d9116868638d31 upstream.
    
    ->interim_entry of ksmbd_work could be deleted after oplock is freed.
    We don't need to manage it with linked list. The interim request could be
    immediately sent whenever a oplock break wait is needed.
    
    Cc: stable@vger.kernel.org
    Reported-by: Norbert Szetei <norbert@doyensec.com>
    Tested-by: Norbert Szetei <norbert@doyensec.com>
    Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ksmbd: prevent connection release during oplock break notification [+ + +]
Author: Namjae Jeon <linkinjeon@kernel.org>
Date:   Thu Mar 6 14:14:58 2025 +0900

    ksmbd: prevent connection release during oplock break notification
    
    commit 3aa660c059240e0c795217182cf7df32909dd917 upstream.
    
    ksmbd_work could be freed when after connection release.
    Increment r_count of ksmbd_conn to indicate that requests
    are not finished yet and to not release the connection.
    
    Cc: stable@vger.kernel.org
    Reported-by: Norbert Szetei <norbert@doyensec.com>
    Tested-by: Norbert Szetei <norbert@doyensec.com>
    Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Linux: Linux 6.13.8 [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Sat Mar 22 12:56:59 2025 -0700

    Linux 6.13.8
    
    Link: https://lore.kernel.org/r/20250319143027.685727358@linuxfoundation.org
    Tested-by: SeongJae Park <sj@kernel.org>
    Tested-by: Jon Hunter <jonathanh@nvidia.com>
    Tested-by: Salvatore Bonaccorso <carnil@debian.org>
    Tested-by: Ron Economos <re@w6rz.net>
    Tested-by: Miguel Ojeda <ojeda@kernel.org>
    Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
    Tested-by: Mark Brown <broonie@kernel.org>
    Tested-by: Luna Jernberg <droidbittin@gmail.com>
    Tested-by: Hardik Garg <hargar@linux.microsoft.com>
    Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
    Tested-by: Peter Schneider <pschneider1968@googlemail.com>
    Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
LoongArch: Fix kernel_page_present() for KPRANGE/XKPRANGE [+ + +]
Author: Huacai Chen <chenhuacai@kernel.org>
Date:   Thu Feb 13 12:02:35 2025 +0800

    LoongArch: Fix kernel_page_present() for KPRANGE/XKPRANGE
    
    [ Upstream commit 619b52777a4972bdb6ddf86ac54c6f68a47b51c4 ]
    
    Now kernel_page_present() always return true for KPRANGE/XKPRANGE
    addresses, this isn't correct because hibernation (ACPI S4) use it
    to distinguish whether a page is saveable. If all KPRANGE/XKPRANGE
    addresses are considered as saveable, then reserved memory such as
    EFI_RUNTIME_SERVICES_CODE / EFI_RUNTIME_SERVICES_DATA will also be
    saved and restored.
    
    Fix this by returning true only if the KPRANGE/XKPRANGE address is in
    memblock.memory.
    
    Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

LoongArch: KVM: Set host with kernel mode when switch to VM mode [+ + +]
Author: Bibo Mao <maobibo@loongson.cn>
Date:   Thu Feb 13 12:02:56 2025 +0800

    LoongArch: KVM: Set host with kernel mode when switch to VM mode
    
    [ Upstream commit 3011b29ec5a33ec16502e687c4264d57416a8b1f ]
    
    PRMD register is only meaningful on the beginning stage of exception
    entry, and it is overwritten with nested irq or exception.
    
    When CPU runs in VM mode, interrupt need be enabled on host. And the
    mode for host had better be kernel mode rather than random or user mode.
    
    When VM is running, the running mode with top command comes from CRMD
    register, and running mode should be kernel mode since kernel function
    is executing with perf command. It needs be consistent with both top and
    perf command.
    
    Signed-off-by: Bibo Mao <maobibo@loongson.cn>
    Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
mm/hugetlb: wait for hugetlb folios to be freed [+ + +]
Author: Ge Yang <yangge1116@126.com>
Date:   Wed Feb 19 11:46:44 2025 +0800

    mm/hugetlb: wait for hugetlb folios to be freed
    
    [ Upstream commit 67bab13307c83fb742c2556b06cdc39dbad27f07 ]
    
    Since the introduction of commit c77c0a8ac4c52 ("mm/hugetlb: defer freeing
    of huge pages if in non-task context"), which supports deferring the
    freeing of hugetlb pages, the allocation of contiguous memory through
    cma_alloc() may fail probabilistically.
    
    In the CMA allocation process, if it is found that the CMA area is
    occupied by in-use hugetlb folios, these in-use hugetlb folios need to be
    migrated to another location.  When there are no available hugetlb folios
    in the free hugetlb pool during the migration of in-use hugetlb folios,
    new folios are allocated from the buddy system.  A temporary state is set
    on the newly allocated folio.  Upon completion of the hugetlb folio
    migration, the temporary state is transferred from the new folios to the
    old folios.  Normally, when the old folios with the temporary state are
    freed, it is directly released back to the buddy system.  However, due to
    the deferred freeing of hugetlb pages, the PageBuddy() check fails,
    ultimately leading to the failure of cma_alloc().
    
    Here is a simplified call trace illustrating the process:
    cma_alloc()
        ->__alloc_contig_migrate_range() // Migrate in-use hugetlb folios
            ->unmap_and_move_huge_page()
                ->folio_putback_hugetlb() // Free old folios
        ->test_pages_isolated()
            ->__test_page_isolated_in_pageblock()
                 ->PageBuddy(page) // Check if the page is in buddy
    
    To resolve this issue, we have implemented a function named
    wait_for_freed_hugetlb_folios().  This function ensures that the hugetlb
    folios are properly released back to the buddy system after their
    migration is completed.  By invoking wait_for_freed_hugetlb_folios()
    before calling PageBuddy(), we ensure that PageBuddy() will succeed.
    
    Link: https://lkml.kernel.org/r/1739936804-18199-1-git-send-email-yangge1116@126.com
    Fixes: c77c0a8ac4c5 ("mm/hugetlb: defer freeing of huge pages if in non-task context")
    Signed-off-by: Ge Yang <yangge1116@126.com>
    Reviewed-by: Muchun Song <muchun.song@linux.dev>
    Acked-by: David Hildenbrand <david@redhat.com>
    Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
    Cc: Barry Song <21cnbao@gmail.com>
    Cc: Oscar Salvador <osalvador@suse.de>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
mm/slab/kvfree_rcu: Switch to WQ_MEM_RECLAIM wq [+ + +]
Author: Uladzislau Rezki (Sony) <urezki@gmail.com>
Date:   Fri Feb 28 13:13:56 2025 +0100

    mm/slab/kvfree_rcu: Switch to WQ_MEM_RECLAIM wq
    
    commit dfd3df31c9db752234d7d2e09bef2aeabb643ce4 upstream.
    
    Currently kvfree_rcu() APIs use a system workqueue which is
    "system_unbound_wq" to driver RCU machinery to reclaim a memory.
    
    Recently, it has been noted that the following kernel warning can
    be observed:
    
    <snip>
    workqueue: WQ_MEM_RECLAIM nvme-wq:nvme_scan_work is flushing !WQ_MEM_RECLAIM events_unbound:kfree_rcu_work
      WARNING: CPU: 21 PID: 330 at kernel/workqueue.c:3719 check_flush_dependency+0x112/0x120
      Modules linked in: intel_uncore_frequency(E) intel_uncore_frequency_common(E) skx_edac(E) ...
      CPU: 21 UID: 0 PID: 330 Comm: kworker/u144:6 Tainted: G            E      6.13.2-0_g925d379822da #1
      Hardware name: Wiwynn Twin Lakes MP/Twin Lakes Passive MP, BIOS YMM20 02/01/2023
      Workqueue: nvme-wq nvme_scan_work
      RIP: 0010:check_flush_dependency+0x112/0x120
      Code: 05 9a 40 14 02 01 48 81 c6 c0 00 00 00 48 8b 50 18 48 81 c7 c0 00 00 00 48 89 f9 48 ...
      RSP: 0018:ffffc90000df7bd8 EFLAGS: 00010082
      RAX: 000000000000006a RBX: ffffffff81622390 RCX: 0000000000000027
      RDX: 00000000fffeffff RSI: 000000000057ffa8 RDI: ffff88907f960c88
      RBP: 0000000000000000 R08: ffffffff83068e50 R09: 000000000002fffd
      R10: 0000000000000004 R11: 0000000000000000 R12: ffff8881001a4400
      R13: 0000000000000000 R14: ffff88907f420fb8 R15: 0000000000000000
      FS:  0000000000000000(0000) GS:ffff88907f940000(0000) knlGS:0000000000000000
      CR2: 00007f60c3001000 CR3: 000000107d010005 CR4: 00000000007726f0
      PKRU: 55555554
      Call Trace:
       <TASK>
       ? __warn+0xa4/0x140
       ? check_flush_dependency+0x112/0x120
       ? report_bug+0xe1/0x140
       ? check_flush_dependency+0x112/0x120
       ? handle_bug+0x5e/0x90
       ? exc_invalid_op+0x16/0x40
       ? asm_exc_invalid_op+0x16/0x20
       ? timer_recalc_next_expiry+0x190/0x190
       ? check_flush_dependency+0x112/0x120
       ? check_flush_dependency+0x112/0x120
       __flush_work.llvm.1643880146586177030+0x174/0x2c0
       flush_rcu_work+0x28/0x30
       kvfree_rcu_barrier+0x12f/0x160
       kmem_cache_destroy+0x18/0x120
       bioset_exit+0x10c/0x150
       disk_release.llvm.6740012984264378178+0x61/0xd0
       device_release+0x4f/0x90
       kobject_put+0x95/0x180
       nvme_put_ns+0x23/0xc0
       nvme_remove_invalid_namespaces+0xb3/0xd0
       nvme_scan_work+0x342/0x490
       process_scheduled_works+0x1a2/0x370
       worker_thread+0x2ff/0x390
       ? pwq_release_workfn+0x1e0/0x1e0
       kthread+0xb1/0xe0
       ? __kthread_parkme+0x70/0x70
       ret_from_fork+0x30/0x40
       ? __kthread_parkme+0x70/0x70
       ret_from_fork_asm+0x11/0x20
       </TASK>
      ---[ end trace 0000000000000000 ]---
    <snip>
    
    To address this switch to use of independent WQ_MEM_RECLAIM
    workqueue, so the rules are not violated from workqueue framework
    point of view.
    
    Apart of that, since kvfree_rcu() does reclaim memory it is worth
    to go with WQ_MEM_RECLAIM type of wq because it is designed for
    this purpose.
    
    Fixes: 6c6c47b063b5 ("mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()"),
    Reported-by: Keith Busch <kbusch@kernel.org>
    Closes: https://lore.kernel.org/all/Z7iqJtCjHKfo8Kho@kbusch-mbp/
    Cc: stable@vger.kernel.org
    Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
    Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
mm: fix kernel BUG when userfaultfd_move encounters swapcache [+ + +]
Author: Barry Song <baohua@kernel.org>
Date:   Wed Feb 26 13:14:00 2025 +1300

    mm: fix kernel BUG when userfaultfd_move encounters swapcache
    
    commit c50f8e6053b0503375c2975bf47f182445aebb4c upstream.
    
    userfaultfd_move() checks whether the PTE entry is present or a
    swap entry.
    
    - If the PTE entry is present, move_present_pte() handles folio
      migration by setting:
    
      src_folio->index = linear_page_index(dst_vma, dst_addr);
    
    - If the PTE entry is a swap entry, move_swap_pte() simply copies
      the PTE to the new dst_addr.
    
    This approach is incorrect because, even if the PTE is a swap entry,
    it can still reference a folio that remains in the swap cache.
    
    This creates a race window between steps 2 and 4.
     1. add_to_swap: The folio is added to the swapcache.
     2. try_to_unmap: PTEs are converted to swap entries.
     3. pageout: The folio is written back.
     4. Swapcache is cleared.
    If userfaultfd_move() occurs in the window between steps 2 and 4,
    after the swap PTE has been moved to the destination, accessing the
    destination triggers do_swap_page(), which may locate the folio in
    the swapcache. However, since the folio's index has not been updated
    to match the destination VMA, do_swap_page() will detect a mismatch.
    
    This can result in two critical issues depending on the system
    configuration.
    
    If KSM is disabled, both small and large folios can trigger a BUG
    during the add_rmap operation due to:
    
     page_pgoff(folio, page) != linear_page_index(vma, address)
    
    [   13.336953] page: refcount:6 mapcount:1 mapping:00000000f43db19c index:0xffffaf150 pfn:0x4667c
    [   13.337520] head: order:2 mapcount:1 entire_mapcount:0 nr_pages_mapped:1 pincount:0
    [   13.337716] memcg:ffff00000405f000
    [   13.337849] anon flags: 0x3fffc0000020459(locked|uptodate|dirty|owner_priv_1|head|swapbacked|node=0|zone=0|lastcpupid=0xffff)
    [   13.338630] raw: 03fffc0000020459 ffff80008507b538 ffff80008507b538 ffff000006260361
    [   13.338831] raw: 0000000ffffaf150 0000000000004000 0000000600000000 ffff00000405f000
    [   13.339031] head: 03fffc0000020459 ffff80008507b538 ffff80008507b538 ffff000006260361
    [   13.339204] head: 0000000ffffaf150 0000000000004000 0000000600000000 ffff00000405f000
    [   13.339375] head: 03fffc0000000202 fffffdffc0199f01 ffffffff00000000 0000000000000001
    [   13.339546] head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000
    [   13.339736] page dumped because: VM_BUG_ON_PAGE(page_pgoff(folio, page) != linear_page_index(vma, address))
    [   13.340190] ------------[ cut here ]------------
    [   13.340316] kernel BUG at mm/rmap.c:1380!
    [   13.340683] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
    [   13.340969] Modules linked in:
    [   13.341257] CPU: 1 UID: 0 PID: 107 Comm: a.out Not tainted 6.14.0-rc3-gcf42737e247a-dirty #299
    [   13.341470] Hardware name: linux,dummy-virt (DT)
    [   13.341671] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [   13.341815] pc : __page_check_anon_rmap+0xa0/0xb0
    [   13.341920] lr : __page_check_anon_rmap+0xa0/0xb0
    [   13.342018] sp : ffff80008752bb20
    [   13.342093] x29: ffff80008752bb20 x28: fffffdffc0199f00 x27: 0000000000000001
    [   13.342404] x26: 0000000000000000 x25: 0000000000000001 x24: 0000000000000001
    [   13.342575] x23: 0000ffffaf0d0000 x22: 0000ffffaf0d0000 x21: fffffdffc0199f00
    [   13.342731] x20: fffffdffc0199f00 x19: ffff000006210700 x18: 00000000ffffffff
    [   13.342881] x17: 6c203d2120296567 x16: 6170202c6f696c6f x15: 662866666f67705f
    [   13.343033] x14: 6567617028454741 x13: 2929737365726464 x12: ffff800083728ab0
    [   13.343183] x11: ffff800082996bf8 x10: 0000000000000fd7 x9 : ffff80008011bc40
    [   13.343351] x8 : 0000000000017fe8 x7 : 00000000fffff000 x6 : ffff8000829eebf8
    [   13.343498] x5 : c0000000fffff000 x4 : 0000000000000000 x3 : 0000000000000000
    [   13.343645] x2 : 0000000000000000 x1 : ffff0000062db980 x0 : 000000000000005f
    [   13.343876] Call trace:
    [   13.344045]  __page_check_anon_rmap+0xa0/0xb0 (P)
    [   13.344234]  folio_add_anon_rmap_ptes+0x22c/0x320
    [   13.344333]  do_swap_page+0x1060/0x1400
    [   13.344417]  __handle_mm_fault+0x61c/0xbc8
    [   13.344504]  handle_mm_fault+0xd8/0x2e8
    [   13.344586]  do_page_fault+0x20c/0x770
    [   13.344673]  do_translation_fault+0xb4/0xf0
    [   13.344759]  do_mem_abort+0x48/0xa0
    [   13.344842]  el0_da+0x58/0x130
    [   13.344914]  el0t_64_sync_handler+0xc4/0x138
    [   13.345002]  el0t_64_sync+0x1ac/0x1b0
    [   13.345208] Code: aa1503e0 f000f801 910f6021 97ff5779 (d4210000)
    [   13.345504] ---[ end trace 0000000000000000 ]---
    [   13.345715] note: a.out[107] exited with irqs disabled
    [   13.345954] note: a.out[107] exited with preempt_count 2
    
    If KSM is enabled, Peter Xu also discovered that do_swap_page() may
    trigger an unexpected CoW operation for small folios because
    ksm_might_need_to_copy() allocates a new folio when the folio index
    does not match linear_page_index(vma, addr).
    
    This patch also checks the swapcache when handling swap entries. If a
    match is found in the swapcache, it processes it similarly to a present
    PTE.
    However, there are some differences. For example, the folio is no longer
    exclusive because folio_try_share_anon_rmap_pte() is performed during
    unmapping.
    Furthermore, in the case of swapcache, the folio has already been
    unmapped, eliminating the risk of concurrent rmap walks and removing the
    need to acquire src_folio's anon_vma or lock.
    
    Note that for large folios, in the swapcache handling path, we directly
    return -EBUSY since split_folio() will return -EBUSY regardless if
    the folio is under writeback or unmapped. This is not an urgent issue,
    so a follow-up patch may address it separately.
    
    [v-songbaohua@oppo.com: minor cleanup according to Peter Xu]
      Link: https://lkml.kernel.org/r/20250226024411.47092-1-21cnbao@gmail.com
    Link: https://lkml.kernel.org/r/20250226001400.9129-1-21cnbao@gmail.com
    Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
    Signed-off-by: Barry Song <v-songbaohua@oppo.com>
    Acked-by: Peter Xu <peterx@redhat.com>
    Reviewed-by: Suren Baghdasaryan <surenb@google.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Axel Rasmussen <axelrasmussen@google.com>
    Cc: Brian Geffon <bgeffon@google.com>
    Cc: Christian Brauner <brauner@kernel.org>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Jann Horn <jannh@google.com>
    Cc: Kalesh Singh <kaleshsingh@google.com>
    Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
    Cc: Lokesh Gidra <lokeshgidra@google.com>
    Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Mike Rapoport (IBM) <rppt@kernel.org>
    Cc: Nicolas Geoffray <ngeoffray@google.com>
    Cc: Ryan Roberts <ryan.roberts@arm.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Cc: ZhangPeng <zhangpeng362@huawei.com>
    Cc: Tangquan Zheng <zhengtangquan@oppo.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    [ surenb: resolved merged conflict caused by the difference in
      move_swap_pte() arguments]
    Signed-off-by: Suren Baghdasaryan <surenb@google.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
mptcp: safety check before fallback [+ + +]
Author: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Date:   Mon Feb 24 19:11:52 2025 +0100

    mptcp: safety check before fallback
    
    [ Upstream commit db75a16813aabae3b78c06b1b99f5e314c1f55d3 ]
    
    Recently, some fallback have been initiated, while the connection was
    not supposed to fallback.
    
    Add a safety check with a warning to detect when an wrong attempt to
    fallback is being done. This should help detecting any future issues
    quicker.
    
    Acked-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://patch.msgid.link/20250224-net-mptcp-misc-fixes-v1-3-f550f636b435@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net/mlx5: Bridge, fix the crash caused by LAG state check [+ + +]
Author: Jianbo Liu <jianbol@nvidia.com>
Date:   Tue Mar 11 00:01:43 2025 +0200

    net/mlx5: Bridge, fix the crash caused by LAG state check
    
    [ Upstream commit 4b8eeed4fb105770ce6dc84a2c6ef953c7b71cbb ]
    
    When removing LAG device from bridge, NETDEV_CHANGEUPPER event is
    triggered. Driver finds the lower devices (PFs) to flush all the
    offloaded entries. And mlx5_lag_is_shared_fdb is checked, it returns
    false if one of PF is unloaded. In such case,
    mlx5_esw_bridge_lag_rep_get() and its caller return NULL, instead of
    the alive PF, and the flush is skipped.
    
    Besides, the bridge fdb entry's lastuse is updated in mlx5 bridge
    event handler. But this SWITCHDEV_FDB_ADD_TO_BRIDGE event can be
    ignored in this case because the upper interface for bond is deleted,
    and the entry will never be aged because lastuse is never updated.
    
    To make things worse, as the entry is alive, mlx5 bridge workqueue
    keeps sending that event, which is then handled by kernel bridge
    notifier. It causes the following crash when accessing the passed bond
    netdev which is already destroyed.
    
    To fix this issue, remove such checks. LAG state is already checked in
    commit 15f8f168952f ("net/mlx5: Bridge, verify LAG state when adding
    bond to bridge"), driver still need to skip offload if LAG becomes
    invalid state after initialization.
    
     Oops: stack segment: 0000 [#1] SMP
     CPU: 3 UID: 0 PID: 23695 Comm: kworker/u40:3 Tainted: G           OE      6.11.0_mlnx #1
     Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
     Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
     Workqueue: mlx5_bridge_wq mlx5_esw_bridge_update_work [mlx5_core]
     RIP: 0010:br_switchdev_event+0x2c/0x110 [bridge]
     Code: 44 00 00 48 8b 02 48 f7 00 00 02 00 00 74 69 41 54 55 53 48 83 ec 08 48 8b a8 08 01 00 00 48 85 ed 74 4a 48 83 fe 02 48 89 d3 <4c> 8b 65 00 74 23 76 49 48 83 fe 05 74 7e 48 83 fe 06 75 2f 0f b7
     RSP: 0018:ffffc900092cfda0 EFLAGS: 00010297
     RAX: ffff888123bfe000 RBX: ffffc900092cfe08 RCX: 00000000ffffffff
     RDX: ffffc900092cfe08 RSI: 0000000000000001 RDI: ffffffffa0c585f0
     RBP: 6669746f6e690a30 R08: 0000000000000000 R09: ffff888123ae92c8
     R10: 0000000000000000 R11: fefefefefefefeff R12: ffff888123ae9c60
     R13: 0000000000000001 R14: ffffc900092cfe08 R15: 0000000000000000
     FS:  0000000000000000(0000) GS:ffff88852c980000(0000) knlGS:0000000000000000
     CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
     CR2: 00007f15914c8734 CR3: 0000000002830005 CR4: 0000000000770ef0
     DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
     DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
     PKRU: 55555554
     Call Trace:
      <TASK>
      ? __die_body+0x1a/0x60
      ? die+0x38/0x60
      ? do_trap+0x10b/0x120
      ? do_error_trap+0x64/0xa0
      ? exc_stack_segment+0x33/0x50
      ? asm_exc_stack_segment+0x22/0x30
      ? br_switchdev_event+0x2c/0x110 [bridge]
      ? sched_balance_newidle.isra.149+0x248/0x390
      notifier_call_chain+0x4b/0xa0
      atomic_notifier_call_chain+0x16/0x20
      mlx5_esw_bridge_update+0xec/0x170 [mlx5_core]
      mlx5_esw_bridge_update_work+0x19/0x40 [mlx5_core]
      process_scheduled_works+0x81/0x390
      worker_thread+0x106/0x250
      ? bh_worker+0x110/0x110
      kthread+0xb7/0xe0
      ? kthread_park+0x80/0x80
      ret_from_fork+0x2d/0x50
      ? kthread_park+0x80/0x80
      ret_from_fork_asm+0x11/0x20
      </TASK>
    
    Fixes: ff9b7521468b ("net/mlx5: Bridge, support LAG")
    Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
    Reviewed-by: Vlad Buslov <vladbu@nvidia.com>
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
    Link: https://patch.msgid.link/1741644104-97767-6-git-send-email-tariqt@nvidia.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: Fill out devlink dev info only for PFs [+ + +]
Author: Jiri Pirko <jiri@resnulli.us>
Date:   Thu Mar 6 23:25:29 2025 +0200

    net/mlx5: Fill out devlink dev info only for PFs
    
    [ Upstream commit d749d901b2168389f060b654fdaa08acf6b367d2 ]
    
    Firmware version query is supported on the PFs. Due to this
    following kernel warning log is observed:
    
    [  188.590344] mlx5_core 0000:08:00.2: mlx5_fw_version_query:816:(pid 1453): fw query isn't supported by the FW
    
    Fix it by restricting the query and devlink info to the PF.
    
    Fixes: 8338d9378895 ("net/mlx5: Added devlink info callback")
    Signed-off-by: Jiri Pirko <jiri@nvidia.com>
    Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Reviewed-by: Parav Pandit <parav@nvidia.com>
    Link: https://patch.msgid.link/20250306212529.429329-1-tariqt@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: Fix incorrect IRQ pool usage when releasing IRQs [+ + +]
Author: Shay Drory <shayd@nvidia.com>
Date:   Tue Mar 11 00:01:41 2025 +0200

    net/mlx5: Fix incorrect IRQ pool usage when releasing IRQs
    
    [ Upstream commit 32d2724db5b2361ab293427ccd5c24f4f2bcca14 ]
    
    mlx5_irq_pool_get() is a getter for completion IRQ pool only.
    However, after the cited commit, mlx5_irq_pool_get() is called during
    ctrl IRQ release flow to retrieve the pool, resulting in the use of an
    incorrect IRQ pool.
    
    Hence, use the newly introduced mlx5_irq_get_pool() getter to retrieve
    the correct IRQ pool based on the IRQ itself. While at it, rename
    mlx5_irq_pool_get() to mlx5_irq_table_get_comp_irq_pool() which
    accurately reflects its purpose and improves code readability.
    
    Fixes: 0477d5168bbb ("net/mlx5: Expose SFs IRQs")
    Signed-off-by: Shay Drory <shayd@nvidia.com>
    Reviewed-by: Maher Sanalla <msanalla@nvidia.com>
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
    Link: https://patch.msgid.link/1741644104-97767-4-git-send-email-tariqt@nvidia.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: handle errors in mlx5_chains_create_table() [+ + +]
Author: Wentao Liang <vulab@iscas.ac.cn>
Date:   Fri Mar 7 10:18:20 2025 +0800

    net/mlx5: handle errors in mlx5_chains_create_table()
    
    [ Upstream commit eab0396353be1c778eba1c0b5180176f04dd21ce ]
    
    In mlx5_chains_create_table(), the return value of mlx5_get_fdb_sub_ns()
    and mlx5_get_flow_namespace() must be checked to prevent NULL pointer
    dereferences. If either function fails, the function should log error
    message with mlx5_core_warn() and return error pointer.
    
    Fixes: 39ac237ce009 ("net/mlx5: E-Switch, Refactor chains and priorities")
    Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Link: https://patch.msgid.link/20250307021820.2646-1-vulab@iscas.ac.cn
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: HWS, Rightsize bwc matcher priority [+ + +]
Author: Vlad Dogaru <vdogaru@nvidia.com>
Date:   Tue Mar 11 00:01:40 2025 +0200

    net/mlx5: HWS, Rightsize bwc matcher priority
    
    [ Upstream commit 521992337f67f71ce4436b98bc32563ddb1a5ce3 ]
    
    The bwc layer was clamping the matcher priority from 32 bits to 16 bits.
    This didn't show up until a matcher was resized, since the initial
    native matcher was created using the correct 32 bit value.
    
    The fix also reorders fields to avoid some padding.
    
    Fixes: 2111bb970c78 ("net/mlx5: HWS, added backward-compatible API handling")
    Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com>
    Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
    Reviewed-by: Mark Bloch <mbloch@nvidia.com>
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Link: https://patch.msgid.link/1741644104-97767-3-git-send-email-tariqt@nvidia.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: Lag, Check shared fdb before creating MultiPort E-Switch [+ + +]
Author: Shay Drory <shayd@nvidia.com>
Date:   Tue Mar 11 00:01:42 2025 +0200

    net/mlx5: Lag, Check shared fdb before creating MultiPort E-Switch
    
    [ Upstream commit 32966984bee1defd9f5a8f9be274d7c32f911ba1 ]
    
    Currently, MultiPort E-Switch is requesting to create a LAG with shared
    FDB without checking the LAG is supporting shared FDB.
    Add the check.
    
    Fixes: a32327a3a02c ("net/mlx5: Lag, Control MultiPort E-Switch single FDB mode")
    Signed-off-by: Shay Drory <shayd@nvidia.com>
    Reviewed-by: Mark Bloch <mbloch@nvidia.com>
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
    Link: https://patch.msgid.link/1741644104-97767-5-git-send-email-tariqt@nvidia.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net/mlx5e: Prevent bridge link show failure for non-eswitch-allowed devices [+ + +]
Author: Carolina Jubran <cjubran@nvidia.com>
Date:   Tue Mar 11 00:01:44 2025 +0200

    net/mlx5e: Prevent bridge link show failure for non-eswitch-allowed devices
    
    [ Upstream commit e92df790d07a8eea873efcb84776e7b71f81c7d5 ]
    
    mlx5_eswitch_get_vepa returns -EPERM if the device lacks
    eswitch_manager capability, blocking mlx5e_bridge_getlink from
    retrieving VEPA mode. Since mlx5e_bridge_getlink implements
    ndo_bridge_getlink, returning -EPERM causes bridge link show to fail
    instead of skipping devices without this capability.
    
    To avoid this, return -EOPNOTSUPP from mlx5e_bridge_getlink when
    mlx5_eswitch_get_vepa fails, ensuring the command continues processing
    other devices while ignoring those without the necessary capability.
    
    Fixes: 4b89251de024 ("net/mlx5: Support ndo bridge_setlink and getlink")
    Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
    Reviewed-by: Jianbo Liu <jianbol@nvidia.com>
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
    Link: https://patch.msgid.link/1741644104-97767-7-git-send-email-tariqt@nvidia.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net: dsa: mv88e6xxx: Verify after ATU Load ops [+ + +]
Author: Joseph Huang <Joseph.Huang@garmin.com>
Date:   Thu Mar 6 12:23:05 2025 -0500

    net: dsa: mv88e6xxx: Verify after ATU Load ops
    
    [ Upstream commit dc5340c3133a3ebe54853fd299116149e528cfaa ]
    
    ATU Load operations could fail silently if there's not enough space
    on the device to hold the new entry. When this happens, the symptom
    depends on the unknown flood settings. If unknown multicast flood is
    disabled, the multicast packets are dropped when the ATU table is
    full. If unknown multicast flood is enabled, the multicast packets
    will be flooded to all ports. Either way, IGMP snooping is broken
    when the ATU Load operation fails silently.
    
    Do a Read-After-Write verification after each fdb/mdb add operation
    to make sure that the operation was really successful, and return
    -ENOSPC otherwise.
    
    Fixes: defb05b9b9b4 ("net: dsa: mv88e6xxx: Add support for fdb_add, fdb_del, and fdb_getnext")
    Signed-off-by: Joseph Huang <Joseph.Huang@garmin.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Link: https://patch.msgid.link/20250306172306.3859214-1-Joseph.Huang@garmin.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: Handle napi_schedule() calls from non-interrupt [+ + +]
Author: Frederic Weisbecker <frederic@kernel.org>
Date:   Sun Feb 23 23:17:08 2025 +0100

    net: Handle napi_schedule() calls from non-interrupt
    
    [ Upstream commit 77e45145e3039a0fb212556ab3f8c87f54771757 ]
    
    napi_schedule() is expected to be called either:
    
    * From an interrupt, where raised softirqs are handled on IRQ exit
    
    * From a softirq disabled section, where raised softirqs are handled on
      the next call to local_bh_enable().
    
    * From a softirq handler, where raised softirqs are handled on the next
      round in do_softirq(), or further deferred to a dedicated kthread.
    
    Other bare tasks context may end up ignoring the raised NET_RX vector
    until the next random softirq handling opportunity, which may not
    happen before a while if the CPU goes idle afterwards with the tick
    stopped.
    
    Such "misuses" have been detected on several places thanks to messages
    of the kind:
    
            "NOHZ tick-stop error: local softirq work is pending, handler #08!!!"
    
    For example:
    
           __raise_softirq_irqoff
            __napi_schedule
            rtl8152_runtime_resume.isra.0
            rtl8152_resume
            usb_resume_interface.isra.0
            usb_resume_both
            __rpm_callback
            rpm_callback
            rpm_resume
            __pm_runtime_resume
            usb_autoresume_device
            usb_remote_wakeup
            hub_event
            process_one_work
            worker_thread
            kthread
            ret_from_fork
            ret_from_fork_asm
    
    And also:
    
    * drivers/net/usb/r8152.c::rtl_work_func_t
    * drivers/net/netdevsim/netdev.c::nsim_start_xmit
    
    There is a long history of issues of this kind:
    
            019edd01d174 ("ath10k: sdio: Add missing BH locking around napi_schdule()")
            330068589389 ("idpf: disable local BH when scheduling napi for marker packets")
            e3d5d70cb483 ("net: lan78xx: fix "softirq work is pending" error")
            e55c27ed9ccf ("mt76: mt7615: add missing bh-disable around rx napi schedule")
            c0182aa98570 ("mt76: mt7915: add missing bh-disable around tx napi enable/schedule")
            970be1dff26d ("mt76: disable BH around napi_schedule() calls")
            019edd01d174 ("ath10k: sdio: Add missing BH locking around napi_schdule()")
            30bfec4fec59 ("can: rx-offload: can_rx_offload_threaded_irq_finish(): add new  function to be called from threaded interrupt")
            e63052a5dd3c ("mlx5e: add add missing BH locking around napi_schdule()")
            83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule")
            bd4ce941c8d5 ("mlx4: Invoke softirqs after napi_reschedule")
            8cf699ec849f ("mlx4: do not call napi_schedule() without care")
            ec13ee80145c ("virtio_net: invoke softirqs after __napi_schedule")
    
    This shows that relying on the caller to arrange a proper context for
    the softirqs to be handled while calling napi_schedule() is very fragile
    and error prone. Also fixing them can also prove challenging if the
    caller may be called from different kinds of contexts.
    
    Therefore fix this from napi_schedule() itself with waking up ksoftirqd
    when softirqs are raised from task contexts.
    
    Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
    Reported-by: Jakub Kicinski <kuba@kernel.org>
    Reported-by: Francois Romieu <romieu@fr.zoreil.com>
    Closes: https://lore.kernel.org/lkml/354a2690-9bbf-4ccb-8769-fa94707a9340@molgen.mpg.de/
    Cc: Breno Leitao <leitao@debian.org>
    Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://patch.msgid.link/20250223221708.27130-1-frederic@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: mana: cleanup mana struct after debugfs_remove() [+ + +]
Author: Shradha Gupta <shradhagupta@linux.microsoft.com>
Date:   Tue Mar 11 03:17:40 2025 -0700

    net: mana: cleanup mana struct after debugfs_remove()
    
    commit 3e64bb2ae7d9f2b3a8259d4d6b86ed1984d5460a upstream.
    
    When on a MANA VM hibernation is triggered, as part of hibernate_snapshot(),
    mana_gd_suspend() and mana_gd_resume() are called. If during this
    mana_gd_resume(), a failure occurs with HWC creation, mana_port_debugfs
    pointer does not get reinitialized and ends up pointing to older,
    cleaned-up dentry.
    Further in the hibernation path, as part of power_down(), mana_gd_shutdown()
    is triggered. This call, unaware of the failures in resume, tries to cleanup
    the already cleaned up  mana_port_debugfs value and hits the following bug:
    
    [  191.359296] mana 7870:00:00.0: Shutdown was called
    [  191.359918] BUG: kernel NULL pointer dereference, address: 0000000000000098
    [  191.360584] #PF: supervisor write access in kernel mode
    [  191.361125] #PF: error_code(0x0002) - not-present page
    [  191.361727] PGD 1080ea067 P4D 0
    [  191.362172] Oops: Oops: 0002 [#1] SMP NOPTI
    [  191.362606] CPU: 11 UID: 0 PID: 1674 Comm: bash Not tainted 6.14.0-rc5+ #2
    [  191.363292] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 11/21/2024
    [  191.364124] RIP: 0010:down_write+0x19/0x50
    [  191.364537] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb e8 de cd ff ff 31 c0 ba 01 00 00 00 <f0> 48 0f b1 13 75 16 65 48 8b 05 88 24 4c 6a 48 89 43 08 48 8b 5d
    [  191.365867] RSP: 0000:ff45fbe0c1c037b8 EFLAGS: 00010246
    [  191.366350] RAX: 0000000000000000 RBX: 0000000000000098 RCX: ffffff8100000000
    [  191.366951] RDX: 0000000000000001 RSI: 0000000000000064 RDI: 0000000000000098
    [  191.367600] RBP: ff45fbe0c1c037c0 R08: 0000000000000000 R09: 0000000000000001
    [  191.368225] R10: ff45fbe0d2b01000 R11: 0000000000000008 R12: 0000000000000000
    [  191.368874] R13: 000000000000000b R14: ff43dc27509d67c0 R15: 0000000000000020
    [  191.369549] FS:  00007dbc5001e740(0000) GS:ff43dc663f380000(0000) knlGS:0000000000000000
    [  191.370213] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  191.370830] CR2: 0000000000000098 CR3: 0000000168e8e002 CR4: 0000000000b73ef0
    [  191.371557] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [  191.372192] DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400
    [  191.372906] Call Trace:
    [  191.373262]  <TASK>
    [  191.373621]  ? show_regs+0x64/0x70
    [  191.374040]  ? __die+0x24/0x70
    [  191.374468]  ? page_fault_oops+0x290/0x5b0
    [  191.374875]  ? do_user_addr_fault+0x448/0x800
    [  191.375357]  ? exc_page_fault+0x7a/0x160
    [  191.375971]  ? asm_exc_page_fault+0x27/0x30
    [  191.376416]  ? down_write+0x19/0x50
    [  191.376832]  ? down_write+0x12/0x50
    [  191.377232]  simple_recursive_removal+0x4a/0x2a0
    [  191.377679]  ? __pfx_remove_one+0x10/0x10
    [  191.378088]  debugfs_remove+0x44/0x70
    [  191.378530]  mana_detach+0x17c/0x4f0
    [  191.378950]  ? __flush_work+0x1e2/0x3b0
    [  191.379362]  ? __cond_resched+0x1a/0x50
    [  191.379787]  mana_remove+0xf2/0x1a0
    [  191.380193]  mana_gd_shutdown+0x3b/0x70
    [  191.380642]  pci_device_shutdown+0x3a/0x80
    [  191.381063]  device_shutdown+0x13e/0x230
    [  191.381480]  kernel_power_off+0x35/0x80
    [  191.381890]  hibernate+0x3c6/0x470
    [  191.382312]  state_store+0xcb/0xd0
    [  191.382734]  kobj_attr_store+0x12/0x30
    [  191.383211]  sysfs_kf_write+0x3e/0x50
    [  191.383640]  kernfs_fop_write_iter+0x140/0x1d0
    [  191.384106]  vfs_write+0x271/0x440
    [  191.384521]  ksys_write+0x72/0xf0
    [  191.384924]  __x64_sys_write+0x19/0x20
    [  191.385313]  x64_sys_call+0x2b0/0x20b0
    [  191.385736]  do_syscall_64+0x79/0x150
    [  191.386146]  ? __mod_memcg_lruvec_state+0xe7/0x240
    [  191.386676]  ? __lruvec_stat_mod_folio+0x79/0xb0
    [  191.387124]  ? __pfx_lru_add+0x10/0x10
    [  191.387515]  ? queued_spin_unlock+0x9/0x10
    [  191.387937]  ? do_anonymous_page+0x33c/0xa00
    [  191.388374]  ? __handle_mm_fault+0xcf3/0x1210
    [  191.388805]  ? __count_memcg_events+0xbe/0x180
    [  191.389235]  ? handle_mm_fault+0xae/0x300
    [  191.389588]  ? do_user_addr_fault+0x559/0x800
    [  191.390027]  ? irqentry_exit_to_user_mode+0x43/0x230
    [  191.390525]  ? irqentry_exit+0x1d/0x30
    [  191.390879]  ? exc_page_fault+0x86/0x160
    [  191.391235]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
    [  191.391745] RIP: 0033:0x7dbc4ff1c574
    [  191.392111] Code: c7 00 16 00 00 00 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 80 3d d5 ea 0e 00 00 74 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 55 48 89 e5 48 83 ec 20 48 89
    [  191.393412] RSP: 002b:00007ffd95a23ab8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
    [  191.393990] RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007dbc4ff1c574
    [  191.394594] RDX: 0000000000000005 RSI: 00005a6eeadb0ce0 RDI: 0000000000000001
    [  191.395215] RBP: 00007ffd95a23ae0 R08: 00007dbc50003b20 R09: 0000000000000000
    [  191.395805] R10: 0000000000000001 R11: 0000000000000202 R12: 0000000000000005
    [  191.396404] R13: 00005a6eeadb0ce0 R14: 00007dbc500045c0 R15: 00007dbc50001ee0
    [  191.396987]  </TASK>
    
    To fix this, we explicitly set such mana debugfs variables to NULL after
    debugfs_remove() is called.
    
    Fixes: 6607c17c6c5e ("net: mana: Enable debugfs files for MANA device")
    Cc: stable@vger.kernel.org
    Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
    Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
    Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
    Link: https://patch.msgid.link/1741688260-28922-1-git-send-email-shradhagupta@linux.microsoft.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

net: mctp i2c: Copy headers if cloned [+ + +]
Author: Matt Johnston <matt@codeconstruct.com.au>
Date:   Thu Mar 6 10:33:20 2025 +0800

    net: mctp i2c: Copy headers if cloned
    
    [ Upstream commit df8ce77ba8b7c012a3edd1ca7368b46831341466 ]
    
    Use skb_cow_head() prior to modifying the TX SKB. This is necessary
    when the SKB has been cloned, to avoid modifying other shared clones.
    
    Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
    Fixes: f5b8abf9fc3d ("mctp i2c: MCTP I2C binding driver")
    Link: https://patch.msgid.link/20250306-matt-mctp-i2c-cow-v1-1-293827212681@codeconstruct.com.au
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: mctp i3c: Copy headers if cloned [+ + +]
Author: Matt Johnston <matt@codeconstruct.com.au>
Date:   Thu Mar 6 18:24:18 2025 +0800

    net: mctp i3c: Copy headers if cloned
    
    [ Upstream commit 26db9c9ee19c36a97dbb1cfef007a3c189c4c874 ]
    
    Use skb_cow_head() prior to modifying the tx skb. This is necessary
    when the skb has been cloned, to avoid modifying other shared clones.
    
    Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
    Fixes: c8755b29b58e ("mctp i3c: MCTP I3C driver")
    Link: https://patch.msgid.link/20250306-matt-i3c-cow-head-v1-1-d5e6a5495227@codeconstruct.com.au
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: mctp: unshare packets when reassembling [+ + +]
Author: Matt Johnston <matt@codeconstruct.com.au>
Date:   Thu Mar 6 10:32:45 2025 +0800

    net: mctp: unshare packets when reassembling
    
    [ Upstream commit f5d83cf0eeb90fade4d5c4d17d24b8bee9ceeecc ]
    
    Ensure that the frag_list used for reassembly isn't shared with other
    packets. This avoids incorrect reassembly when packets are cloned, and
    prevents a memory leak due to circular references between fragments and
    their skb_shared_info.
    
    The upcoming MCTP-over-USB driver uses skb_clone which can trigger the
    problem - other MCTP drivers don't share SKBs.
    
    A kunit test is added to reproduce the issue.
    
    Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
    Fixes: 4a992bbd3650 ("mctp: Implement message fragmentation & reassembly")
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20250306-matt-mctp-usb-v1-1-085502b3dd28@codeconstruct.com.au
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: openvswitch: remove misbehaving actions length check [+ + +]
Author: Ilya Maximets <i.maximets@ovn.org>
Date:   Sat Mar 8 01:45:59 2025 +0100

    net: openvswitch: remove misbehaving actions length check
    
    [ Upstream commit a1e64addf3ff9257b45b78bc7d743781c3f41340 ]
    
    The actions length check is unreliable and produces different results
    depending on the initial length of the provided netlink attribute and
    the composition of the actual actions inside of it.  For example, a
    user can add 4088 empty clone() actions without triggering -EMSGSIZE,
    on attempt to add 4089 such actions the operation will fail with the
    -EMSGSIZE verdict.  However, if another 16 KB of other actions will
    be *appended* to the previous 4089 clone() actions, the check passes
    and the flow is successfully installed into the openvswitch datapath.
    
    The reason for a such a weird behavior is the way memory is allocated.
    When ovs_flow_cmd_new() is invoked, it calls ovs_nla_copy_actions(),
    that in turn calls nla_alloc_flow_actions() with either the actual
    length of the user-provided actions or the MAX_ACTIONS_BUFSIZE.  The
    function adds the size of the sw_flow_actions structure and then the
    actually allocated memory is rounded up to the closest power of two.
    
    So, if the user-provided actions are larger than MAX_ACTIONS_BUFSIZE,
    then MAX_ACTIONS_BUFSIZE + sizeof(*sfa) rounded up is 32K + 24 -> 64K.
    Later, while copying individual actions, we look at ksize(), which is
    64K, so this way the MAX_ACTIONS_BUFSIZE check is not actually
    triggered and the user can easily allocate almost 64 KB of actions.
    
    However, when the initial size is less than MAX_ACTIONS_BUFSIZE, but
    the actions contain ones that require size increase while copying
    (such as clone() or sample()), then the limit check will be performed
    during the reserve_sfa_size() and the user will not be allowed to
    create actions that yield more than 32 KB internally.
    
    This is one part of the problem.  The other part is that it's not
    actually possible for the userspace application to know beforehand
    if the particular set of actions will be rejected or not.
    
    Certain actions require more space in the internal representation,
    e.g. an empty clone() takes 4 bytes in the action list passed in by
    the user, but it takes 12 bytes in the internal representation due
    to an extra nested attribute, and some actions require less space in
    the internal representations, e.g. set(tunnel(..)) normally takes
    64+ bytes in the action list provided by the user, but only needs to
    store a single pointer in the internal implementation, since all the
    data is stored in the tunnel_info structure instead.
    
    And the action size limit is applied to the internal representation,
    not to the action list passed by the user.  So, it's not possible for
    the userpsace application to predict if the certain combination of
    actions will be rejected or not, because it is not possible for it to
    calculate how much space these actions will take in the internal
    representation without knowing kernel internals.
    
    All that is causing random failures in ovs-vswitchd in userspace and
    inability to handle certain traffic patterns as a result.  For example,
    it is reported that adding a bit more than a 1100 VMs in an OpenStack
    setup breaks the network due to OVS not being able to handle ARP
    traffic anymore in some cases (it tries to install a proper datapath
    flow, but the kernel rejects it with -EMSGSIZE, even though the action
    list isn't actually that large.)
    
    Kernel behavior must be consistent and predictable in order for the
    userspace application to use it in a reasonable way.  ovs-vswitchd has
    a mechanism to re-direct parts of the traffic and partially handle it
    in userspace if the required action list is oversized, but that doesn't
    work properly if we can't actually tell if the action list is oversized
    or not.
    
    Solution for this is to check the size of the user-provided actions
    instead of the internal representation.  This commit just removes the
    check from the internal part because there is already an implicit size
    check imposed by the netlink protocol.  The attribute can't be larger
    than 64 KB.  Realistically, we could reduce the limit to 32 KB, but
    we'll be risking to break some existing setups that rely on the fact
    that it's possible to create nearly 64 KB action lists today.
    
    Vast majority of flows in real setups are below 100-ish bytes.  So
    removal of the limit will not change real memory consumption on the
    system.  The absolutely worst case scenario is if someone adds a flow
    with 64 KB of empty clone() actions.  That will yield a 192 KB in the
    internal representation consuming 256 KB block of memory.  However,
    that list of actions is not meaningful and also a no-op.  Real world
    very large action lists (that can occur for a rare cases of BUM
    traffic handling) are unlikely to contain a large number of clones and
    will likely have a lot of tunnel attributes making the internal
    representation comparable in size to the original action list.
    So, it should be fine to just remove the limit.
    
    Commit in the 'Fixes' tag is the first one that introduced the
    difference between internal representation and the user-provided action
    lists, but there were many more afterwards that lead to the situation
    we have today.
    
    Fixes: 7d5437c709de ("openvswitch: Add tunneling interface.")
    Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
    Reviewed-by: Aaron Conole <aconole@redhat.com>
    Link: https://patch.msgid.link/20250308004609.2881861-1-i.maximets@ovn.org
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: phy: nxp-c45-tja11xx: add TJA112X PHY configuration errata [+ + +]
Author: Andrei Botila <andrei.botila@oss.nxp.com>
Date:   Tue Mar 4 18:06:13 2025 +0200

    net: phy: nxp-c45-tja11xx: add TJA112X PHY configuration errata
    
    commit a07364b394697d2e0baffeb517f41385259aa484 upstream.
    
    The most recent sillicon versions of TJA1120 and TJA1121 can achieve
    full silicon performance by putting the PHY in managed mode.
    
    It is necessary to apply these PHY writes before link gets established.
    Application of this fix is required after restart of device and wakeup
    from sleep.
    
    Cc: stable@vger.kernel.org
    Fixes: f1fe5dff2b8a ("net: phy: nxp-c45-tja11xx: add TJA1120 support")
    Signed-off-by: Andrei Botila <andrei.botila@oss.nxp.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Link: https://patch.msgid.link/20250304160619.181046-2-andrei.botila@oss.nxp.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

net: phy: nxp-c45-tja11xx: add TJA112XB SGMII PCS restart errata [+ + +]
Author: Andrei Botila <andrei.botila@oss.nxp.com>
Date:   Tue Mar 4 18:06:14 2025 +0200

    net: phy: nxp-c45-tja11xx: add TJA112XB SGMII PCS restart errata
    
    commit 48939523843e4813e78920f54937944a8787134b upstream.
    
    TJA1120B/TJA1121B can achieve a stable operation of SGMII after
    a startup event by putting the SGMII PCS into power down mode and
    restart afterwards.
    
    It is necessary to put the SGMII PCS into power down mode and back up.
    
    Cc: stable@vger.kernel.org
    Fixes: f1fe5dff2b8a ("net: phy: nxp-c45-tja11xx: add TJA1120 support")
    Signed-off-by: Andrei Botila <andrei.botila@oss.nxp.com>
    Link: https://patch.msgid.link/20250304160619.181046-3-andrei.botila@oss.nxp.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

net: switchdev: Convert blocking notification chain to a raw one [+ + +]
Author: Amit Cohen <amcohen@nvidia.com>
Date:   Wed Mar 5 14:15:09 2025 +0200

    net: switchdev: Convert blocking notification chain to a raw one
    
    [ Upstream commit 62531a1effa87bdab12d5104015af72e60d926ff ]
    
    A blocking notification chain uses a read-write semaphore to protect the
    integrity of the chain. The semaphore is acquired for writing when
    adding / removing notifiers to / from the chain and acquired for reading
    when traversing the chain and informing notifiers about an event.
    
    In case of the blocking switchdev notification chain, recursive
    notifications are possible which leads to the semaphore being acquired
    twice for reading and to lockdep warnings being generated [1].
    
    Specifically, this can happen when the bridge driver processes a
    SWITCHDEV_BRPORT_UNOFFLOADED event which causes it to emit notifications
    about deferred events when calling switchdev_deferred_process().
    
    Fix this by converting the notification chain to a raw notification
    chain in a similar fashion to the netdev notification chain. Protect
    the chain using the RTNL mutex by acquiring it when modifying the chain.
    Events are always informed under the RTNL mutex, but add an assertion in
    call_switchdev_blocking_notifiers() to make sure this is not violated in
    the future.
    
    Maintain the "blocking" prefix as events are always emitted from process
    context and listeners are allowed to block.
    
    [1]:
    WARNING: possible recursive locking detected
    6.14.0-rc4-custom-g079270089484 #1 Not tainted
    --------------------------------------------
    ip/52731 is trying to acquire lock:
    ffffffff850918d8 ((switchdev_blocking_notif_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x58/0xa0
    
    but task is already holding lock:
    ffffffff850918d8 ((switchdev_blocking_notif_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x58/0xa0
    
    other info that might help us debug this:
    Possible unsafe locking scenario:
    CPU0
    ----
    lock((switchdev_blocking_notif_chain).rwsem);
    lock((switchdev_blocking_notif_chain).rwsem);
    
    *** DEADLOCK ***
    May be due to missing lock nesting notation
    3 locks held by ip/52731:
     #0: ffffffff84f795b0 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x727/0x1dc0
     #1: ffffffff8731f628 (&net->rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x790/0x1dc0
     #2: ffffffff850918d8 ((switchdev_blocking_notif_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x58/0xa0
    
    stack backtrace:
    ...
    ? __pfx_down_read+0x10/0x10
    ? __pfx_mark_lock+0x10/0x10
    ? __pfx_switchdev_port_attr_set_deferred+0x10/0x10
    blocking_notifier_call_chain+0x58/0xa0
    switchdev_port_attr_notify.constprop.0+0xb3/0x1b0
    ? __pfx_switchdev_port_attr_notify.constprop.0+0x10/0x10
    ? mark_held_locks+0x94/0xe0
    ? switchdev_deferred_process+0x11a/0x340
    switchdev_port_attr_set_deferred+0x27/0xd0
    switchdev_deferred_process+0x164/0x340
    br_switchdev_port_unoffload+0xc8/0x100 [bridge]
    br_switchdev_blocking_event+0x29f/0x580 [bridge]
    notifier_call_chain+0xa2/0x440
    blocking_notifier_call_chain+0x6e/0xa0
    switchdev_bridge_port_unoffload+0xde/0x1a0
    ...
    
    Fixes: f7a70d650b0b6 ("net: bridge: switchdev: Ensure deferred event delivery on unoffload")
    Signed-off-by: Amit Cohen <amcohen@nvidia.com>
    Reviewed-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
    Tested-by: Vladimir Oltean <olteanv@gmail.com>
    Link: https://patch.msgid.link/20250305121509.631207-1-amcohen@nvidia.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: wwan: mhi_wwan_mbim: Silence sequence number glitch errors [+ + +]
Author: Stephan Gerhold <stephan.gerhold@linaro.org>
Date:   Wed Feb 12 12:15:35 2025 +0100

    net: wwan: mhi_wwan_mbim: Silence sequence number glitch errors
    
    [ Upstream commit 0d1fac6d26aff5df21bb4ec980d9b7a11c410b96 ]
    
    When using the Qualcomm X55 modem on the ThinkPad X13s, the kernel log is
    constantly being filled with errors related to a "sequence number glitch",
    e.g.:
    
            [ 1903.284538] sequence number glitch prev=16 curr=0
            [ 1913.812205] sequence number glitch prev=50 curr=0
            [ 1923.698219] sequence number glitch prev=142 curr=0
            [ 2029.248276] sequence number glitch prev=1555 curr=0
            [ 2046.333059] sequence number glitch prev=70 curr=0
            [ 2076.520067] sequence number glitch prev=272 curr=0
            [ 2158.704202] sequence number glitch prev=2655 curr=0
            [ 2218.530776] sequence number glitch prev=2349 curr=0
            [ 2225.579092] sequence number glitch prev=6 curr=0
    
    Internet connectivity is working fine, so this error seems harmless. It
    looks like modem does not preserve the sequence number when entering low
    power state; the amount of errors depends on how actively the modem is
    being used.
    
    A similar issue has also been seen on USB-based MBIM modems [1]. However,
    in cdc_ncm.c the "sequence number glitch" message is a debug message
    instead of an error. Apply the same to the mhi_wwan_mbim.c driver to
    silence these errors when using the modem.
    
    [1]: https://lists.freedesktop.org/archives/libmbim-devel/2016-November/000781.html
    
    Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
    Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
    Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Link: https://patch.msgid.link/20250212-mhi-wwan-mbim-sequence-glitch-v1-1-503735977cbd@linaro.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net_sched: Prevent creation of classes with TC_H_ROOT [+ + +]
Author: Cong Wang <xiyou.wangcong@gmail.com>
Date:   Thu Mar 6 15:23:54 2025 -0800

    net_sched: Prevent creation of classes with TC_H_ROOT
    
    [ Upstream commit 0c3057a5a04d07120b3d0ec9c79568fceb9c921e ]
    
    The function qdisc_tree_reduce_backlog() uses TC_H_ROOT as a termination
    condition when traversing up the qdisc tree to update parent backlog
    counters. However, if a class is created with classid TC_H_ROOT, the
    traversal terminates prematurely at this class instead of reaching the
    actual root qdisc, causing parent statistics to be incorrectly maintained.
    In case of DRR, this could lead to a crash as reported by Mingi Cho.
    
    Prevent the creation of any Qdisc class with classid TC_H_ROOT
    (0xFFFFFFFF) across all qdisc types, as suggested by Jamal.
    
    Reported-by: Mingi Cho <mincho@theori.io>
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Fixes: 066a3b5b2346 ("[NET_SCHED] sch_api: fix qdisc_tree_decrease_qlen() loop")
    Link: https://patch.msgid.link/20250306232355.93864-2-xiyou.wangcong@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree() [+ + +]
Author: Kohei Enju <enjuk@amazon.com>
Date:   Sun Mar 9 17:07:38 2025 +0900

    netfilter: nf_conncount: Fully initialize struct nf_conncount_tuple in insert_tree()
    
    [ Upstream commit d653bfeb07ebb3499c403404c21ac58a16531607 ]
    
    Since commit b36e4523d4d5 ("netfilter: nf_conncount: fix garbage
    collection confirm race"), `cpu` and `jiffies32` were introduced to
    the struct nf_conncount_tuple.
    
    The commit made nf_conncount_add() initialize `conn->cpu` and
    `conn->jiffies32` when allocating the struct.
    In contrast, count_tree() was not changed to initialize them.
    
    By commit 34848d5c896e ("netfilter: nf_conncount: Split insert and
    traversal"), count_tree() was split and the relevant allocation
    code now resides in insert_tree().
    Initialize `conn->cpu` and `conn->jiffies32` in insert_tree().
    
    BUG: KMSAN: uninit-value in find_or_evict net/netfilter/nf_conncount.c:117 [inline]
    BUG: KMSAN: uninit-value in __nf_conncount_add+0xd9c/0x2850 net/netfilter/nf_conncount.c:143
     find_or_evict net/netfilter/nf_conncount.c:117 [inline]
     __nf_conncount_add+0xd9c/0x2850 net/netfilter/nf_conncount.c:143
     count_tree net/netfilter/nf_conncount.c:438 [inline]
     nf_conncount_count+0x82f/0x1e80 net/netfilter/nf_conncount.c:521
     connlimit_mt+0x7f6/0xbd0 net/netfilter/xt_connlimit.c:72
     __nft_match_eval net/netfilter/nft_compat.c:403 [inline]
     nft_match_eval+0x1a5/0x300 net/netfilter/nft_compat.c:433
     expr_call_ops_eval net/netfilter/nf_tables_core.c:240 [inline]
     nft_do_chain+0x426/0x2290 net/netfilter/nf_tables_core.c:288
     nft_do_chain_ipv4+0x1a5/0x230 net/netfilter/nft_chain_filter.c:23
     nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
     nf_hook_slow+0xf4/0x400 net/netfilter/core.c:626
     nf_hook_slow_list+0x24d/0x860 net/netfilter/core.c:663
     NF_HOOK_LIST include/linux/netfilter.h:350 [inline]
     ip_sublist_rcv+0x17b7/0x17f0 net/ipv4/ip_input.c:633
     ip_list_rcv+0x9ef/0xa40 net/ipv4/ip_input.c:669
     __netif_receive_skb_list_ptype net/core/dev.c:5936 [inline]
     __netif_receive_skb_list_core+0x15c5/0x1670 net/core/dev.c:5983
     __netif_receive_skb_list net/core/dev.c:6035 [inline]
     netif_receive_skb_list_internal+0x1085/0x1700 net/core/dev.c:6126
     netif_receive_skb_list+0x5a/0x460 net/core/dev.c:6178
     xdp_recv_frames net/bpf/test_run.c:280 [inline]
     xdp_test_run_batch net/bpf/test_run.c:361 [inline]
     bpf_test_run_xdp_live+0x2e86/0x3480 net/bpf/test_run.c:390
     bpf_prog_test_run_xdp+0xf1d/0x1ae0 net/bpf/test_run.c:1316
     bpf_prog_test_run+0x5e5/0xa30 kernel/bpf/syscall.c:4407
     __sys_bpf+0x6aa/0xd90 kernel/bpf/syscall.c:5813
     __do_sys_bpf kernel/bpf/syscall.c:5902 [inline]
     __se_sys_bpf kernel/bpf/syscall.c:5900 [inline]
     __ia32_sys_bpf+0xa0/0xe0 kernel/bpf/syscall.c:5900
     ia32_sys_call+0x394d/0x4180 arch/x86/include/generated/asm/syscalls_32.h:358
     do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
     __do_fast_syscall_32+0xb0/0x110 arch/x86/entry/common.c:387
     do_fast_syscall_32+0x38/0x80 arch/x86/entry/common.c:412
     do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:450
     entry_SYSENTER_compat_after_hwframe+0x84/0x8e
    
    Uninit was created at:
     slab_post_alloc_hook mm/slub.c:4121 [inline]
     slab_alloc_node mm/slub.c:4164 [inline]
     kmem_cache_alloc_noprof+0x915/0xe10 mm/slub.c:4171
     insert_tree net/netfilter/nf_conncount.c:372 [inline]
     count_tree net/netfilter/nf_conncount.c:450 [inline]
     nf_conncount_count+0x1415/0x1e80 net/netfilter/nf_conncount.c:521
     connlimit_mt+0x7f6/0xbd0 net/netfilter/xt_connlimit.c:72
     __nft_match_eval net/netfilter/nft_compat.c:403 [inline]
     nft_match_eval+0x1a5/0x300 net/netfilter/nft_compat.c:433
     expr_call_ops_eval net/netfilter/nf_tables_core.c:240 [inline]
     nft_do_chain+0x426/0x2290 net/netfilter/nf_tables_core.c:288
     nft_do_chain_ipv4+0x1a5/0x230 net/netfilter/nft_chain_filter.c:23
     nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
     nf_hook_slow+0xf4/0x400 net/netfilter/core.c:626
     nf_hook_slow_list+0x24d/0x860 net/netfilter/core.c:663
     NF_HOOK_LIST include/linux/netfilter.h:350 [inline]
     ip_sublist_rcv+0x17b7/0x17f0 net/ipv4/ip_input.c:633
     ip_list_rcv+0x9ef/0xa40 net/ipv4/ip_input.c:669
     __netif_receive_skb_list_ptype net/core/dev.c:5936 [inline]
     __netif_receive_skb_list_core+0x15c5/0x1670 net/core/dev.c:5983
     __netif_receive_skb_list net/core/dev.c:6035 [inline]
     netif_receive_skb_list_internal+0x1085/0x1700 net/core/dev.c:6126
     netif_receive_skb_list+0x5a/0x460 net/core/dev.c:6178
     xdp_recv_frames net/bpf/test_run.c:280 [inline]
     xdp_test_run_batch net/bpf/test_run.c:361 [inline]
     bpf_test_run_xdp_live+0x2e86/0x3480 net/bpf/test_run.c:390
     bpf_prog_test_run_xdp+0xf1d/0x1ae0 net/bpf/test_run.c:1316
     bpf_prog_test_run+0x5e5/0xa30 kernel/bpf/syscall.c:4407
     __sys_bpf+0x6aa/0xd90 kernel/bpf/syscall.c:5813
     __do_sys_bpf kernel/bpf/syscall.c:5902 [inline]
     __se_sys_bpf kernel/bpf/syscall.c:5900 [inline]
     __ia32_sys_bpf+0xa0/0xe0 kernel/bpf/syscall.c:5900
     ia32_sys_call+0x394d/0x4180 arch/x86/include/generated/asm/syscalls_32.h:358
     do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
     __do_fast_syscall_32+0xb0/0x110 arch/x86/entry/common.c:387
     do_fast_syscall_32+0x38/0x80 arch/x86/entry/common.c:412
     do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:450
     entry_SYSENTER_compat_after_hwframe+0x84/0x8e
    
    Reported-by: syzbot+83fed965338b573115f7@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=83fed965338b573115f7
    Fixes: b36e4523d4d5 ("netfilter: nf_conncount: fix garbage collection confirm race")
    Signed-off-by: Kohei Enju <enjuk@amazon.com>
    Reviewed-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netfilter: nf_conncount: garbage collection is not skipped when jiffies wrap around [+ + +]
Author: Nicklas Bo Jensen <njensen@akamai.com>
Date:   Thu Feb 27 13:32:34 2025 +0000

    netfilter: nf_conncount: garbage collection is not skipped when jiffies wrap around
    
    [ Upstream commit df08c94baafb001de6cf44bb7098bb557f36c335 ]
    
    nf_conncount is supposed to skip garbage collection if it has already
    run garbage collection in the same jiffy. Unfortunately, this is broken
    when jiffies wrap around which this patch fixes.
    
    The problem is that last_gc in the nf_conncount_list struct is an u32,
    but jiffies is an unsigned long which is 8 bytes on my systems. When
    those two are compared it only works until last_gc wraps around.
    
    See bug report: https://bugzilla.netfilter.org/show_bug.cgi?id=1778
    for more details.
    
    Fixes: d265929930e2 ("netfilter: nf_conncount: reduce unnecessary GC")
    Signed-off-by: Nicklas Bo Jensen <njensen@akamai.com>
    Reviewed-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netfilter: nf_tables: make destruction work queue pernet [+ + +]
Author: Florian Westphal <fw@strlen.de>
Date:   Thu Mar 6 04:05:26 2025 +0100

    netfilter: nf_tables: make destruction work queue pernet
    
    [ Upstream commit fb8286562ecfb585e26b033c5e32e6fb85efb0b3 ]
    
    The call to flush_work before tearing down a table from the netlink
    notifier was supposed to make sure that all earlier updates (e.g. rule
    add) that might reference that table have been processed.
    
    Unfortunately, flush_work() waits for the last queued instance.
    This could be an instance that is different from the one that we must
    wait for.
    
    This is because transactions are protected with a pernet mutex, but the
    work item is global, so holding the transaction mutex doesn't prevent
    another netns from queueing more work.
    
    Make the work item pernet so that flush_work() will wait for all
    transactions queued from this netns.
    
    A welcome side effect is that we no longer need to wait for transaction
    objects from foreign netns.
    
    The gc work queue is still global.  This seems to be ok because nft_set
    structures are reference counted and each container structure owns a
    reference on the net namespace.
    
    The destroy_list is still protected by a global spinlock rather than
    pernet one but the hold time is very short anyway.
    
    v2: call cancel_work_sync before reaping the remaining tables (Pablo).
    
    Fixes: 9f6958ba2e90 ("netfilter: nf_tables: unconditionally flush pending work before notifier")
    Reported-by: syzbot+5d8c5789c8cb076b2c25@syzkaller.appspotmail.com
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netfilter: nft_ct: Use __refcount_inc() for per-CPU nft_ct_pcpu_template. [+ + +]
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date:   Mon Feb 17 17:02:42 2025 +0100

    netfilter: nft_ct: Use __refcount_inc() for per-CPU nft_ct_pcpu_template.
    
    [ Upstream commit 5cfe5612ca9590db69b9be29dc83041dbf001108 ]
    
    nft_ct_pcpu_template is a per-CPU variable and relies on disabled BH for its
    locking. The refcounter is read and if its value is set to one then the
    refcounter is incremented and variable is used - otherwise it is already
    in use and left untouched.
    
    Without per-CPU locking in local_bh_disable() on PREEMPT_RT the
    read-then-increment operation is not atomic and therefore racy.
    
    This can be avoided by using unconditionally __refcount_inc() which will
    increment counter and return the old value as an atomic operation.
    In case the returned counter is not one, the variable is in use and we
    need to decrement counter. Otherwise we can use it.
    
    Use __refcount_inc() instead of read and a conditional increment.
    
    Fixes: edee4f1e9245 ("netfilter: nft_ct: add zone id set support")
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Reviewed-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

netfilter: nft_exthdr: fix offset with ipv4_find_option() [+ + +]
Author: Alexey Kashavkin <akashavkin@gmail.com>
Date:   Sun Mar 2 00:14:36 2025 +0300

    netfilter: nft_exthdr: fix offset with ipv4_find_option()
    
    [ Upstream commit 6edd78af9506bb182518da7f6feebd75655d9a0e ]
    
    There is an incorrect calculation in the offset variable which causes
    the nft_skb_copy_to_reg() function to always return -EFAULT. Adding the
    start variable is redundant. In the __ip_options_compile() function the
    correct offset is specified when finding the function. There is no need
    to add the size of the iphdr structure to the offset.
    
    Fixes: dbb5281a1f84 ("netfilter: nf_tables: add support for matching IPv4 options")
    Signed-off-by: Alexey Kashavkin <akashavkin@gmail.com>
    Reviewed-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
netmem: prevent TX of unreadable skbs [+ + +]
Author: Mina Almasry <almasrymina@google.com>
Date:   Thu Mar 6 21:55:20 2025 +0000

    netmem: prevent TX of unreadable skbs
    
    commit f3600c867c99a2cc8038680ecf211089c50e7971 upstream.
    
    Currently on stable trees we have support for netmem/devmem RX but not
    TX. It is not safe to forward/redirect an RX unreadable netmem packet
    into the device's TX path, as the device may call dma-mapping APIs on
    dma addrs that should not be passed to it.
    
    Fix this by preventing the xmit of unreadable skbs.
    
    Tested by configuring tc redirect:
    
    sudo tc qdisc add dev eth1 ingress
    sudo tc filter add dev eth1 ingress protocol ip prio 1 flower ip_proto \
            tcp src_ip 192.168.1.12 action mirred egress redirect dev eth1
    
    Before, I see unreadable skbs in the driver's TX path passed to dma
    mapping APIs.
    
    After, I don't see unreadable skbs in the driver's TX path passed to dma
    mapping APIs.
    
    Fixes: 65249feb6b3d ("net: add support for skbs with unreadable frags")
    Suggested-by: Jakub Kicinski <kuba@kernel.org>
    Cc: stable@vger.kernel.org
    Signed-off-by: Mina Almasry <almasrymina@google.com>
    Link: https://patch.msgid.link/20250306215520.1415465-1-almasrymina@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
netpoll: hold rcu read lock in __netpoll_send_skb() [+ + +]
Author: Breno Leitao <leitao@debian.org>
Date:   Thu Mar 6 05:16:18 2025 -0800

    netpoll: hold rcu read lock in __netpoll_send_skb()
    
    [ Upstream commit 505ead7ab77f289f12d8a68ac83da068e4d4408b ]
    
    The function __netpoll_send_skb() is being invoked without holding the
    RCU read lock. This oversight triggers a warning message when
    CONFIG_PROVE_RCU_LIST is enabled:
    
            net/core/netpoll.c:330 suspicious rcu_dereference_check() usage!
    
             netpoll_send_skb
             netpoll_send_udp
             write_ext_msg
             console_flush_all
             console_unlock
             vprintk_emit
    
    To prevent npinfo from disappearing unexpectedly, ensure that
    __netpoll_send_skb() is protected with the RCU read lock.
    
    Fixes: 2899656b494dcd1 ("netpoll: take rcu_read_lock_bh() in netpoll_send_skb_on_dev()")
    Signed-off-by: Breno Leitao <leitao@debian.org>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20250306-netpoll_rcu_v2-v2-1-bc4f5c51742a@debian.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
nvme-fc: do not ignore connectivity loss during connecting [+ + +]
Author: Daniel Wagner <wagi@kernel.org>
Date:   Thu Jan 9 14:30:49 2025 +0100

    nvme-fc: do not ignore connectivity loss during connecting
    
    [ Upstream commit ee59e3820ca92a9f4307ae23dfc7229dc8b8d400 ]
    
    When a connectivity loss occurs while nvme_fc_create_assocation is
    being executed, it's possible that the ctrl ends up stuck in the LIVE
    state:
    
      1) nvme nvme10: NVME-FC{10}: create association : ...
      2) nvme nvme10: NVME-FC{10}: controller connectivity lost.
                      Awaiting Reconnect
         nvme nvme10: queue_size 128 > ctrl maxcmd 32, reducing to maxcmd
      3) nvme nvme10: Could not set queue count (880)
         nvme nvme10: Failed to configure AEN (cfg 900)
      4) nvme nvme10: NVME-FC{10}: controller connect complete
      5) nvme nvme10: failed nvme_keep_alive_end_io error=4
    
    A connection attempt starts 1) and the ctrl is in state CONNECTING.
    Shortly after the LLDD driver detects a connection lost event and calls
    nvme_fc_ctrl_connectivity_loss 2). Because we are still in CONNECTING
    state, this event is ignored.
    
    nvme_fc_create_association continues to run in parallel and tries to
    communicate with the controller and these commands will fail. Though
    these errors are filtered out, e.g in 3) setting the I/O queues numbers
    fails which leads to an early exit in nvme_fc_create_io_queues. Because
    the number of IO queues is 0 at this point, there is nothing left in
    nvme_fc_create_association which could detected the connection drop.
    Thus the ctrl enters LIVE state 4).
    
    Eventually the keep alive handler times out 5) but because nothing is
    being done, the ctrl stays in LIVE state.
    
    There is already the ASSOC_FAILED flag to track connectivity loss event
    but this bit is set too late in the recovery code path. Move this into
    the connectivity loss event handler and synchronize it with the state
    change. This ensures that the ASSOC_FAILED flag is seen by
    nvme_fc_create_io_queues and it does not enter the LIVE state after a
    connectivity loss event. If the connectivity loss event happens after we
    entered the LIVE state the normal error recovery path is executed.
    
    Signed-off-by: Daniel Wagner <wagi@kernel.org>
    Reviewed-by: Hannes Reinecke <hare@suse.de>
    Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

nvme-fc: go straight to connecting state when initializing [+ + +]
Author: Daniel Wagner <wagi@kernel.org>
Date:   Thu Jan 9 14:30:47 2025 +0100

    nvme-fc: go straight to connecting state when initializing
    
    [ Upstream commit d3d380eded7ee5fc2fc53b3b0e72365ded025c4a ]
    
    The initial controller initialization mimiks the reconnect loop
    behavior by switching from NEW to RESETTING and then to CONNECTING.
    
    The transition from NEW to CONNECTING is a valid transition, so there is
    no point entering the RESETTING state. TCP and RDMA also transition
    directly to CONNECTING state.
    
    Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
    Reviewed-by: Hannes Reinecke <hare@suse.de>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Daniel Wagner <wagi@kernel.org>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

nvme-fc: rely on state transitions to handle connectivity loss [+ + +]
Author: Daniel Wagner <wagi@kernel.org>
Date:   Fri Feb 14 09:02:04 2025 +0100

    nvme-fc: rely on state transitions to handle connectivity loss
    
    commit f13409bb3f9140dad7256febcb478f0c9600312c upstream.
    
    It's not possible to call nvme_state_ctrl_state with holding a spin
    lock, because nvme_state_ctrl_state calls cancel_delayed_work_sync
    when fastfail is enabled.
    
    Instead syncing the ASSOC_FLAG and state transitions using a lock, it's
    possible to only rely on the state machine transitions. That means
    nvme_fc_ctrl_connectivity_loss should unconditionally call
    nvme_reset_ctrl which avoids the read race on the ctrl state variable.
    Actually, it's not necessary to test in which state the ctrl is, the
    reset work will only scheduled when the state machine is in LIVE state.
    
    In nvme_fc_create_association, the LIVE state can only be entered if it
    was previously CONNECTING. If this is not possible then the reset
    handler got triggered. Thus just error out here.
    
    Fixes: ee59e3820ca9 ("nvme-fc: do not ignore connectivity loss during connecting")
    Closes: https://lore.kernel.org/all/denqwui6sl5erqmz2gvrwueyxakl5txzbbiu3fgebryzrfxunm@iwxuthct377m/
    Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
    Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
    Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
    Signed-off-by: Daniel Wagner <wagi@kernel.org>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
nvme-pci: quirk Acer FA100 for non-uniqueue identifiers [+ + +]
Author: Christopher Lentocha <christopherericlentocha@gmail.com>
Date:   Tue Feb 18 08:59:29 2025 -0500

    nvme-pci: quirk Acer FA100 for non-uniqueue identifiers
    
    [ Upstream commit fcd875445866a5219cf2be3101e276b21fc843f3 ]
    
    In order for two Acer FA100 SSDs to work in one PC (in the case of
    myself, a Lenovo Legion T5 28IMB05), and not show one drive and not
    the other, and sometimes mix up what drive shows up (randomly), these
    two lines of code need to be added, and then both of the SSDs will
    show up and not conflict when booting off of one of them. If you boot
    up your computer with both SSDs installed without this patch, you may
    also randomly get into a kernel panic (if the initrd is not set up) or
    stuck in the initrd "/init" process, it is set up, however, if you do
    apply this patch, there should not be problems with booting or seeing
    both contents of the drive. Tested with the btrfs filesystem with a
    RAID configuration of having the root drive '/' combined to make two
    256GB Acer FA100 SSDs become 512GB in total storage.
    
    Kernel Logs with patch applied (`dmesg -t | grep -i nvm`):
    
    ```
    ...
    nvme 0000:04:00.0: platform quirk: setting simple suspend
    nvme nvme0: pci function 0000:04:00.0
    nvme 0000:05:00.0: platform quirk: setting simple suspend
    nvme nvme1: pci function 0000:05:00.0
    nvme nvme1: missing or invalid SUBNQN field.
    nvme nvme1: allocated 64 MiB host memory buffer.
    nvme nvme0: missing or invalid SUBNQN field.
    nvme nvme0: allocated 64 MiB host memory buffer.
    nvme nvme1: 8/0/0 default/read/poll queues
    nvme nvme1: Ignoring bogus Namespace Identifiers
    nvme nvme0: 8/0/0 default/read/poll queues
    nvme nvme0: Ignoring bogus Namespace Identifiers
    nvme0n1: p1 p2
    ...
    ```
    
    Kernel Logs with patch not applied (`dmesg -t | grep -i nvm`):
    
    ```
    ...
    nvme 0000:04:00.0: platform quirk: setting simple suspend
    nvme nvme0: pci function 0000:04:00.0
    nvme 0000:05:00.0: platform quirk: setting simple suspend
    nvme nvme1: pci function 0000:05:00.0
    nvme nvme0: missing or invalid SUBNQN field.
    nvme nvme1: missing or invalid SUBNQN field.
    nvme nvme0: allocated 64 MiB host memory buffer.
    nvme nvme1: allocated 64 MiB host memory buffer.
    nvme nvme0: 8/0/0 default/read/poll queues
    nvme nvme1: 8/0/0 default/read/poll queues
    nvme nvme1: globally duplicate IDs for nsid 1
    nvme nvme1: VID:DID 1dbe:5216 model:Acer SSD FA100 256GB firmware:1.Z.J.2X
    nvme0n1: p1 p2
    ...
    ```
    
    Signed-off-by: Christopher Lentocha <christopherericlentocha@gmail.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
nvme: move error logging from nvme_end_req() to __nvme_end_req() [+ + +]
Author: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Date:   Tue Mar 11 19:43:58 2025 +0900

    nvme: move error logging from nvme_end_req() to __nvme_end_req()
    
    [ Upstream commit e5c2bcc0cd47321d78bb4e865d7857304139f95d ]
    
    Before the Commit 1f47ed294a2b ("block: cleanup and fix batch completion
    adding conditions"), blk_mq_add_to_batch() did not add failed
    passthrough requests to batch, and returned false. After the commit,
    blk_mq_add_to_batch() always adds passthrough requests to batch
    regardless of whether the request failed or not, and returns true. This
    affected error logging feature in the NVME driver.
    
    Before the commit, the call chain of failed passthrough request was as
    follows:
    
    nvme_handle_cqe()
     blk_mq_add_to_batch() .. false is returned, then call nvme_pci_complete_rq()
     nvme_pci_complete_rq()
      nvme_complete_rq()
       nvme_end_req()
        nvme_log_err_passthru() .. error logging
        __nvme_end_req()        .. end of the rqeuest
    
    After the commit, the call chain is as follows:
    
    nvme_handle_cqe()
     blk_mq_add_to_batch() .. true is returned, then set nvme_pci_complete_batch()
     ..
     nvme_pci_complete_batch()
      nvme_complete_batch()
       nvme_complete_batch_req()
        __nvme_end_req() .. end of the request, without error logging
    
    To make the error logging feature work again for passthrough requests, move the
    nvme_log_err_passthru() call from nvme_end_req() to __nvme_end_req().
    
    While at it, move nvme_log_error() call for non-passthrough requests together
    with nvme_log_err_passthru(). Even though the trigger commit does not affect
    non-passthrough requests, move it together for code simplicity.
    
    Fixes: 1f47ed294a2b ("block: cleanup and fix batch completion adding conditions")
    Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
    Reviewed-by: Hannes Reinecke <hare@suse.de>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Link: https://lore.kernel.org/r/20250311104359.1767728-2-shinichiro.kawasaki@wdc.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

nvme: only allow entering LIVE from CONNECTING state [+ + +]
Author: Daniel Wagner <wagi@kernel.org>
Date:   Fri Feb 14 09:02:03 2025 +0100

    nvme: only allow entering LIVE from CONNECTING state
    
    [ Upstream commit d2fe192348f93fe3a0cb1e33e4aba58e646397f4 ]
    
    The fabric transports and also the PCI transport are not entering the
    LIVE state from NEW or RESETTING. This makes the state machine more
    restrictive and allows to catch not supported state transitions, e.g.
    directly switching from RESETTING to LIVE.
    
    Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
    Signed-off-by: Daniel Wagner <wagi@kernel.org>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
nvmet-rdma: recheck queue state is LIVE in state lock in recv done [+ + +]
Author: Ruozhu Li <david.li@jaguarmicro.com>
Date:   Sun Feb 16 20:49:56 2025 +0800

    nvmet-rdma: recheck queue state is LIVE in state lock in recv done
    
    [ Upstream commit 3988ac1c67e6e84d2feb987d7b36d5791174b3da ]
    
    The queue state checking in nvmet_rdma_recv_done is not in queue state
    lock.Queue state can transfer to LIVE in cm establish handler between
    state checking and state lock here, cause a silent drop of nvme connect
    cmd.
    Recheck queue state whether in LIVE state in state lock to prevent this
    issue.
    
    Signed-off-by: Ruozhu Li <david.li@jaguarmicro.com>
    Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
objtool: Ignore dangling jump table entries [+ + +]
Author: Josh Poimboeuf <jpoimboe@kernel.org>
Date:   Tue Jan 14 13:57:58 2025 -0800

    objtool: Ignore dangling jump table entries
    
    [ Upstream commit 3724062ca2b1364f02cf44dbea1a552227844ad1 ]
    
    Clang sometimes leaves dangling unused jump table entries which point to
    the end of the function.  Ignore them.
    
    Closes: https://lore.kernel.org/20250113235835.vqgvb7cdspksy5dn@jpoimboe
    Reported-by: Klaus Kusche <klaus.kusche@computerix.info>
    Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/ee25c0b7e80113e950bd1d4c208b671d35774ff4.1736891751.git.jpoimboe@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
PCI: pci_ids: add INTEL_HDA_PTL_H [+ + +]
Author: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Date:   Mon Feb 10 10:17:27 2025 +0200

    PCI: pci_ids: add INTEL_HDA_PTL_H
    
    [ Upstream commit a1f7b7ff0e10ae574d388131596390157222f986 ]
    
    Add Intel PTL-H audio Device ID.
    
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
    Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Acked-by: Bjorn Helgaas <bhelgaas@google.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Link: https://patch.msgid.link/20250210081730.22916-2-peter.ujfalusi@linux.intel.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
perf/x86/intel: Use better start period for frequency mode [+ + +]
Author: Kan Liang <kan.liang@linux.intel.com>
Date:   Fri Jan 17 07:19:13 2025 -0800

    perf/x86/intel: Use better start period for frequency mode
    
    [ Upstream commit a26b24b2e21f6222635a95426b9ef9eec63d69b1 ]
    
    Freqency mode is the current default mode of Linux perf. A period of 1 is
    used as a starting period. The period is auto-adjusted on each tick or an
    overflow, to meet the frequency target.
    
    The start period of 1 is too low and may trigger some issues:
    
    - Many HWs do not support period 1 well.
      https://lore.kernel.org/lkml/875xs2oh69.ffs@tglx/
    
    - For an event that occurs frequently, period 1 is too far away from the
      real period. Lots of samples are generated at the beginning.
      The distribution of samples may not be even.
    
    - A low starting period for frequently occurring events also challenges
      virtualization, which has a longer path to handle a PMI.
    
    The limit_period value only checks the minimum acceptable value for HW.
    It cannot be used to set the start period, because some events may
    need a very low period. The limit_period cannot be set too high. It
    doesn't help with the events that occur frequently.
    
    It's hard to find a universal starting period for all events. The idea
    implemented by this patch is to only give an estimate for the popular
    HW and HW cache events. For the rest of the events, start from the lowest
    possible recommended value.
    
    Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: https://lore.kernel.org/r/20250117151913.3043942-3-kan.liang@linux.intel.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
perf/x86/rapl: Add support for Intel Arrow Lake U [+ + +]
Author: Aaron Ma <aaron.ma@canonical.com>
Date:   Tue Dec 24 22:55:16 2024 +0800

    perf/x86/rapl: Add support for Intel Arrow Lake U
    
    [ Upstream commit 68a9b0e313302451468c0b0eda53c383fa51a8f4 ]
    
    Add Arrow Lake U model for RAPL:
    
      $ ls -1 /sys/devices/power/events/
      energy-cores
      energy-cores.scale
      energy-cores.unit
      energy-gpu
      energy-gpu.scale
      energy-gpu.unit
      energy-pkg
      energy-pkg.scale
      energy-pkg.unit
      energy-psys
      energy-psys.scale
      energy-psys.unit
    
    The same output as ArrowLake:
    
      $ perf stat -a -I 1000 --per-socket -e power/energy-pkg/
    
    Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Acked-by: Zhang Rui <rui.zhang@intel.com>
    Link: https://lore.kernel.org/r/20241224145516.349028-1-aaron.ma@canonical.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
phy: ti: gmii-sel: Do not use syscon helper to build regmap [+ + +]
Author: Andrew Davis <afd@ti.com>
Date:   Thu Jan 23 12:22:34 2025 -0600

    phy: ti: gmii-sel: Do not use syscon helper to build regmap
    
    [ Upstream commit 5ab90f40121a9f6a9b368274cd92d0f435dc7cfa ]
    
    The syscon helper device_node_to_regmap() is used to fetch a regmap
    registered to a device node. It also currently creates this regmap
    if the node did not already have a regmap associated with it. This
    should only be used on "syscon" nodes. This driver is not such a
    device and instead uses device_node_to_regmap() on its own node as
    a hacky way to create a regmap for itself.
    
    This will not work going forward and so we should create our regmap
    the normal way by defining our regmap_config, fetching our memory
    resource, then using the normal regmap_init_mmio() function.
    
    Signed-off-by: Andrew Davis <afd@ti.com>
    Tested-by: Nishanth Menon <nm@ti.com>
    Link: https://lore.kernel.org/r/20250123182234.597665-1-afd@ti.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
pinctrl: bcm281xx: Fix incorrect regmap max_registers value [+ + +]
Author: Artur Weber <aweber.kernel@gmail.com>
Date:   Fri Feb 7 21:02:41 2025 +0100

    pinctrl: bcm281xx: Fix incorrect regmap max_registers value
    
    [ Upstream commit 68283c1cb573143c0b7515e93206f3503616bc10 ]
    
    The max_registers value does not take into consideration the stride;
    currently, it's set to the number of the last pin, but this does not
    accurately represent the final register.
    
    Fix this by multiplying the current value by 4.
    
    Fixes: 54b1aa5a5b16 ("ARM: pinctrl: Add Broadcom Capri pinctrl driver")
    Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
    Link: https://lore.kernel.org/20250207-bcm21664-pinctrl-v1-2-e7cfac9b2d3b@gmail.com
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

pinctrl: nuvoton: npcm8xx: Add NULL check in npcm8xx_gpio_fw [+ + +]
Author: Charles Han <hanchunchao@inspur.com>
Date:   Wed Feb 12 18:05:32 2025 +0800

    pinctrl: nuvoton: npcm8xx: Add NULL check in npcm8xx_gpio_fw
    
    [ Upstream commit acf40ab42799e4ae1397ee6f5c5941092d66f999 ]
    
    devm_kasprintf() calls can return null pointers on failure.
    But the return values were not checked in npcm8xx_gpio_fw().
    Add NULL check in npcm8xx_gpio_fw(), to handle kernel NULL
    pointer dereference error.
    
    Fixes: acf4884a5717 ("pinctrl: nuvoton: add NPCM8XX pinctrl and GPIO driver")
    Signed-off-by: Charles Han <hanchunchao@inspur.com>
    Link: https://lore.kernel.org/20250212100532.4317-1-hanchunchao@inspur.com
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
platform/x86/intel: pmc: fix ltr decode in pmc_core_ltr_show() [+ + +]
Author: Dmitry Kandybka <d.kandybka@gmail.com>
Date:   Fri Jan 24 01:07:39 2025 +0300

    platform/x86/intel: pmc: fix ltr decode in pmc_core_ltr_show()
    
    [ Upstream commit 583ef25bb2a094813351a727ddec38b35a15b9f8 ]
    
    In pmc_core_ltr_show(), promote 'val' to 'u64' to avoid possible integer
    overflow. Values (10 bit) are multiplied by the scale, the result of
    expression is in a range from 1 to 34,326,183,936 which is bigger then
    UINT32_MAX. Compile tested only.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Signed-off-by: Dmitry Kandybka <d.kandybka@gmail.com>
    Reviewed-by: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Link: https://lore.kernel.org/r/20250123220739.68087-1-d.kandybka@gmail.com
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
platform/x86: int3472: Call "reset" GPIO "enable" for INT347E [+ + +]
Author: Sakari Ailus <sakari.ailus@linux.intel.com>
Date:   Tue Feb 11 09:28:40 2025 +0200

    platform/x86: int3472: Call "reset" GPIO "enable" for INT347E
    
    [ Upstream commit 569617dbbd06286fb73f3f1c2ac91e51d863c7de ]
    
    The DT bindings for ov7251 specify "enable" GPIO (xshutdown in
    documentation) but the int3472 indiscriminately provides this as a "reset"
    GPIO to sensor drivers. Take this into account by assigning it as "enable"
    with active high polarity for INT347E devices, i.e. ov7251. "reset" with
    active low polarity remains the default GPIO name for other devices.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://lore.kernel.org/r/20250211072841.7713-3-sakari.ailus@linux.intel.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

platform/x86: int3472: Use correct type for "polarity", call it gpio_flags [+ + +]
Author: Sakari Ailus <sakari.ailus@linux.intel.com>
Date:   Tue Feb 11 09:28:39 2025 +0200

    platform/x86: int3472: Use correct type for "polarity", call it gpio_flags
    
    [ Upstream commit fc22b06fbd2afefa1eddff69a6fd30c539cef577 ]
    
    Struct gpiod_lookup flags field's type is unsigned long. Thus use unsigned
    long for values to be assigned to that field. Similarly, also call the
    field gpio_flags which it really is.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://lore.kernel.org/r/20250211072841.7713-2-sakari.ailus@linux.intel.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

platform/x86: thinkpad_acpi: Fix invalid fan speed on ThinkPad X120e [+ + +]
Author: Sybil Isabel Dorsett <sybdorsett@proton.me>
Date:   Mon Feb 3 16:33:15 2025 +0000

    platform/x86: thinkpad_acpi: Fix invalid fan speed on ThinkPad X120e
    
    [ Upstream commit 1046cac109225eda0973b898e053aeb3d6c10e1d ]
    
    On ThinkPad X120e, fan speed is reported in ticks per revolution
    rather than RPM.
    
    Recalculate the fan speed value reported for ThinkPad X120e
    to RPM based on a 22.5 kHz clock.
    
    Based on the information on
    https://www.thinkwiki.org/wiki/How_to_control_fan_speed,
    the same problem is highly likely to be relevant to at least Edge11,
    but Edge11 is not addressed in this patch.
    
    Signed-off-by: Sybil Isabel Dorsett <sybdorsett@proton.me>
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Link: https://lore.kernel.org/r/20250203163255.5525-1-sybdorsett@proton.me
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

platform/x86: thinkpad_acpi: Support for V9 DYTC platform profiles [+ + +]
Author: Mark Pearson <mpearson-lenovo@squebb.ca>
Date:   Thu Feb 6 14:39:41 2025 -0500

    platform/x86: thinkpad_acpi: Support for V9 DYTC platform profiles
    
    [ Upstream commit 9cff907cbf8c7fb5345918dbcc7b74a01656f34f ]
    
    Newer Thinkpad AMD platforms are using V9 DYTC and this changes the
    profiles used for PSC mode. Add support for this update.
    Tested on P14s G5 AMD
    
    Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
    Link: https://lore.kernel.org/r/20250206193953.58365-1-mpearson-lenovo@squebb.ca
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
powercap: call put_device() on an error path in powercap_register_control_type() [+ + +]
Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Date:   Fri Jan 10 10:05:54 2025 +0900

    powercap: call put_device() on an error path in powercap_register_control_type()
    
    [ Upstream commit 93c66fbc280747ea700bd6199633d661e3c819b3 ]
    
    powercap_register_control_type() calls device_register(), but does not
    release the refcount of the device when it fails.
    
    Call put_device() before returning an error to balance the refcount.
    
    Since the kfree(control_type) will be done by powercap_release(), remove
    the lines in powercap_register_control_type() before returning the error.
    
    This bug was found by an experimental verifier that I am developing.
    
    Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
    Link: https://patch.msgid.link/20250110010554.1583411-1-joe@pf.is.s.u-tokyo.ac.jp
    [ rjw: Changelog edits ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
qlcnic: fix memory leak issues in qlcnic_sriov_common.c [+ + +]
Author: Haoxiang Li <haoxiang_li2024@163.com>
Date:   Fri Mar 7 17:49:52 2025 +0800

    qlcnic: fix memory leak issues in qlcnic_sriov_common.c
    
    commit d2b9d97e89c79c95f8b517e4fa43fd100f936acc upstream.
    
    Add qlcnic_sriov_free_vlans() in qlcnic_sriov_alloc_vlans() if
    any sriov_vlans fails to be allocated.
    Add qlcnic_sriov_free_vlans() to free the memory allocated by
    qlcnic_sriov_alloc_vlans() if "sriov->allowed_vlans" fails to
    be allocated.
    
    Fixes: 91b7282b613d ("qlcnic: Support VLAN id config.")
    Cc: stable@vger.kernel.org
    Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
    Link: https://patch.msgid.link/20250307094952.14874-1-haoxiang_li2024@163.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Revert "Bluetooth: hci_core: Fix sleeping function called from invalid context" [+ + +]
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Tue Mar 4 10:06:10 2025 -0500

    Revert "Bluetooth: hci_core: Fix sleeping function called from invalid context"
    
    [ Upstream commit ab6ab707a4d060a51c45fc13e3b2228d5f7c0b87 ]
    
    This reverts commit 4d94f05558271654670d18c26c912da0c1c15549 which has
    problems (see [1]) and is no longer needed since 581dd2dc168f
    ("Bluetooth: hci_event: Fix using rcu_read_(un)lock while iterating")
    has reworked the code where the original bug has been found.
    
    [1] Link: https://lore.kernel.org/linux-bluetooth/877c55ci1r.wl-tiwai@suse.de/T/#t
    Fixes: 4d94f0555827 ("Bluetooth: hci_core: Fix sleeping function called from invalid context")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Revert "openvswitch: switch to per-action label counting in conntrack" [+ + +]
Author: Xin Long <lucien.xin@gmail.com>
Date:   Sat Mar 8 13:05:43 2025 -0500

    Revert "openvswitch: switch to per-action label counting in conntrack"
    
    [ Upstream commit 1063ae07383c0ddc5bcce170260c143825846b03 ]
    
    Currently, ovs_ct_set_labels() is only called for confirmed conntrack
    entries (ct) within ovs_ct_commit(). However, if the conntrack entry
    does not have the labels_ext extension, attempting to allocate it in
    ovs_ct_get_conn_labels() for a confirmed entry triggers a warning in
    nf_ct_ext_add():
    
      WARN_ON(nf_ct_is_confirmed(ct));
    
    This happens when the conntrack entry is created externally before OVS
    increments net->ct.labels_used. The issue has become more likely since
    commit fcb1aa5163b1 ("openvswitch: switch to per-action label counting
    in conntrack"), which changed to use per-action label counting and
    increment net->ct.labels_used when a flow with ct action is added.
    
    Since there’s no straightforward way to fully resolve this issue at the
    moment, this reverts the commit to avoid breaking existing use cases.
    
    Fixes: fcb1aa5163b1 ("openvswitch: switch to per-action label counting in conntrack")
    Reported-by: Jianbo Liu <jianbol@nvidia.com>
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Acked-by: Aaron Conole <aconole@redhat.com>
    Link: https://patch.msgid.link/1bdeb2f3a812bca016a225d3de714427b2cd4772.1741457143.git.lucien.xin@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
rtase: Fix improper release of ring list entries in rtase_sw_reset [+ + +]
Author: Justin Lai <justinlai0215@realtek.com>
Date:   Thu Mar 6 15:05:10 2025 +0800

    rtase: Fix improper release of ring list entries in rtase_sw_reset
    
    [ Upstream commit 415f135ace7fd824cde083184a922e39156055b5 ]
    
    Since rtase_init_ring, which is called within rtase_sw_reset, adds ring
    entries already present in the ring list back into the list, it causes
    the ring list to form a cycle. This results in list_for_each_entry_safe
    failing to find an endpoint during traversal, leading to an error.
    Therefore, it is necessary to remove the previously added ring_list nodes
    before calling rtase_init_ring.
    
    Fixes: 079600489960 ("rtase: Implement net_device_ops")
    Signed-off-by: Justin Lai <justinlai0215@realtek.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20250306070510.18129-1-justinlai0215@realtek.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
rust: alloc: satisfy POSIX alignment requirement [+ + +]
Author: Tamir Duberstein <tamird@gmail.com>
Date:   Thu Feb 13 06:34:18 2025 -0500

    rust: alloc: satisfy POSIX alignment requirement
    
    commit ff64846bee0e7e3e7bc9363ebad3bab42dd27e24 upstream.
    
    ISO C's `aligned_alloc` is partially implementation-defined; on some
    systems it inherits stricter requirements from POSIX's `posix_memalign`.
    
    This causes the call added in commit dd09538fb409 ("rust: alloc:
    implement `Cmalloc` in module allocator_test") to fail on macOS because
    it doesn't meet the requirements of `posix_memalign`.
    
    Adjust the call to meet the POSIX requirement and add a comment. This
    fixes failures in `make rusttest` on macOS.
    
    Acked-by: Danilo Krummrich <dakr@kernel.org>
    Cc: stable@vger.kernel.org
    Fixes: dd09538fb409 ("rust: alloc: implement `Cmalloc` in module allocator_test")
    Signed-off-by: Tamir Duberstein <tamird@gmail.com>
    Reviewed-by: Gary Guo <gary@garyguo.net>
    Link: https://lore.kernel.org/r/20250213-aligned-alloc-v7-1-d2a2d0be164b@gmail.com
    [ Added Cc: stable. - Miguel ]
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

rust: Disallow BTF generation with Rust + LTO [+ + +]
Author: Matthew Maurer <mmaurer@google.com>
Date:   Wed Jan 8 23:35:08 2025 +0000

    rust: Disallow BTF generation with Rust + LTO
    
    commit 5daa0c35a1f0e7a6c3b8ba9cb721e7d1ace6e619 upstream.
    
    The kernel cannot currently self-parse BTF containing Rust debug
    information. pahole uses the language of the CU to determine whether to
    filter out debug information when generating the BTF. When LTO is
    enabled, Rust code can cross CU boundaries, resulting in Rust debug
    information in CUs labeled as C. This results in a system which cannot
    parse its own BTF.
    
    Signed-off-by: Matthew Maurer <mmaurer@google.com>
    Cc: stable@vger.kernel.org
    Fixes: c1177979af9c ("btf, scripts: Exclude Rust CUs with pahole")
    Link: https://lore.kernel.org/r/20250108-rust-btf-lto-incompat-v1-1-60243ff6d820@google.com
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

rust: error: add missing newline to pr_warn! calls [+ + +]
Author: Alban Kurti <kurti@invicto.ai>
Date:   Thu Feb 6 21:07:53 2025 +0000

    rust: error: add missing newline to pr_warn! calls
    
    [ Upstream commit 6f5c36f56d475732981dcf624e0ac0cc7c8984c8 ]
    
    Added missing newline at the end of pr_warn! usage
    so the log is not missed.
    
    Fixes: 6551a7fe0acb ("rust: error: Add Error::from_errno{_unchecked}()")
    Reported-by: Miguel Ojeda <ojeda@kernel.org>
    Link: https://github.com/Rust-for-Linux/linux/issues/1139
    Signed-off-by: Alban Kurti <kurti@invicto.ai>
    Link: https://lore.kernel.org/r/20250206-printing_fix-v3-2-a85273b501ae@invicto.ai
    [ Replaced Closes with Link since it fixes part of the issue. - Miguel ]
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

rust: init: add missing newline to pr_info! calls [+ + +]
Author: Alban Kurti <kurti@invicto.ai>
Date:   Thu Feb 6 21:07:54 2025 +0000

    rust: init: add missing newline to pr_info! calls
    
    [ Upstream commit 6933c1067fe6df8ddb34dd68bdb2aa172cbd08c8 ]
    
    Several pr_info! calls in rust/kernel/init.rs (both in code examples
    and macro documentation) were missing a newline, causing logs to
    run together. This commit updates these calls to include a trailing
    newline, improving readability and consistency with the C side.
    
    Fixes: 6841d45a3030 ("rust: init: add `stack_pin_init!` macro")
    Fixes: 7f8977a7fe6d ("rust: init: add `{pin_}chain` functions to `{Pin}Init<T, E>`")
    Fixes: d0fdc3961270 ("rust: init: add `PinnedDrop` trait and macros")
    Fixes: 4af84c6a85c6 ("rust: init: update expanded macro explanation")
    Reported-by: Miguel Ojeda <ojeda@kernel.org>
    Link: https://github.com/Rust-for-Linux/linux/issues/1139
    Signed-off-by: Alban Kurti <kurti@invicto.ai>
    Link: https://lore.kernel.org/r/20250206-printing_fix-v3-3-a85273b501ae@invicto.ai
    [ Replaced Closes with Link since it fixes part of the issue. Added
      one more Fixes tag (still same set of stable kernels). - Miguel ]
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

rust: init: fix `Zeroable` implementation for `Option>` and `Option>` [+ + +]
Author: Benno Lossin <benno.lossin@proton.me>
Date:   Wed Mar 5 13:29:01 2025 +0000

    rust: init: fix `Zeroable` implementation for `Option<NonNull<T>>` and `Option<KBox<T>>`
    
    commit df27cef153603b18a7d094b53cc3d5264ff32797 upstream.
    
    According to [1], `NonNull<T>` and `#[repr(transparent)]` wrapper types
    such as our custom `KBox<T>` have the null pointer optimization only if
    `T: Sized`. Thus remove the `Zeroable` implementation for the unsized
    case.
    
    Link: https://doc.rust-lang.org/stable/std/option/index.html#representation [1]
    Reported-by: Alice Ryhl <aliceryhl@google.com>
    Closes: https://lore.kernel.org/rust-for-linux/CAH5fLghL+qzrD8KiCF1V3vf2YcC6aWySzkmaE2Zzrnh1gKj-hw@mail.gmail.com/
    Cc: stable@vger.kernel.org # v6.12+ (a custom patch will be needed for 6.6.y)
    Fixes: 38cde0bd7b67 ("rust: init: add `Zeroable` trait and `init::zeroed` function")
    Signed-off-by: Benno Lossin <benno.lossin@proton.me>
    Reviewed-by: Alice Ryhl <aliceryhl@google.com>
    Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
    Link: https://lore.kernel.org/r/20250305132836.2145476-1-benno.lossin@proton.me
    [ Added Closes tag and moved up the Reported-by one. - Miguel ]
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

rust: lockdep: Remove support for dynamically allocated LockClassKeys [+ + +]
Author: Mitchell Levy <levymitchell0@gmail.com>
Date:   Fri Mar 7 15:27:00 2025 -0800

    rust: lockdep: Remove support for dynamically allocated LockClassKeys
    
    commit 966944f3711665db13e214fef6d02982c49bb972 upstream.
    
    Currently, dynamically allocated LockCLassKeys can be used from the Rust
    side without having them registered. This is a soundness issue, so
    remove them.
    
    Fixes: 6ea5aa08857a ("rust: sync: introduce `LockClassKey`")
    Suggested-by: Alice Ryhl <aliceryhl@google.com>
    Signed-off-by: Mitchell Levy <levymitchell0@gmail.com>
    Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Reviewed-by: Benno Lossin <benno.lossin@proton.me>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20250307232717.1759087-11-boqun.feng@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

rust: remove leftover mentions of the `alloc` crate [+ + +]
Author: Miguel Ojeda <ojeda@kernel.org>
Date:   Mon Mar 3 18:10:30 2025 +0100

    rust: remove leftover mentions of the `alloc` crate
    
    commit 374908a15af4cd60862ebc51a6e012ace2212c76 upstream.
    
    In commit 392e34b6bc22 ("kbuild: rust: remove the `alloc` crate and
    `GlobalAlloc`") we stopped using the upstream `alloc` crate.
    
    Thus remove a few leftover mentions treewide.
    
    Cc: stable@vger.kernel.org # Also to 6.12.y after the `alloc` backport lands
    Fixes: 392e34b6bc22 ("kbuild: rust: remove the `alloc` crate and `GlobalAlloc`")
    Reviewed-by: Danilo Krummrich <dakr@kernel.org>
    Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
    Link: https://lore.kernel.org/r/20250303171030.1081134-1-ojeda@kernel.org
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
s390/cio: Fix CHPID "configure" attribute caching [+ + +]
Author: Peter Oberparleiter <oberpar@linux.ibm.com>
Date:   Fri Jan 31 12:02:55 2025 +0100

    s390/cio: Fix CHPID "configure" attribute caching
    
    [ Upstream commit 32ae4a2992529e2c7934e422035fad1d9b0f1fb5 ]
    
    In some environments, the SCLP firmware interface used to query a
    CHPID's configured state is not supported. On these environments,
    rapidly reading the corresponding sysfs attribute produces inconsistent
    results:
    
      $ cat /sys/devices/css0/chp0.00/configure
      cat: /sys/devices/css0/chp0.00/configure: Operation not supported
      $ cat /sys/devices/css0/chp0.00/configure
      3
    
    This occurs for example when Linux is run as a KVM guest. The
    inconsistency is a result of CIO using cached results for generating
    the value of the "configure" attribute while failing to handle the
    situation where no data was returned by SCLP.
    
    Fix this by not updating the cache-expiration timestamp when SCLP
    returns no data. With the fix applied, the system response is
    consistent:
    
      $ cat /sys/devices/css0/chp0.00/configure
      cat: /sys/devices/css0/chp0.00/configure: Operation not supported
      $ cat /sys/devices/css0/chp0.00/configure
      cat: /sys/devices/css0/chp0.00/configure: Operation not supported
    
    Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
    Reviewed-by: Eric Farman <farman@linux.ibm.com>
    Tested-by: Eric Farman <farman@linux.ibm.com>
    Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
    Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
sched/debug: Provide slice length for fair tasks [+ + +]
Author: Christian Loehle <christian.loehle@arm.com>
Date:   Wed Jan 29 17:59:44 2025 +0000

    sched/debug: Provide slice length for fair tasks
    
    [ Upstream commit 9065ce69754dece78606c8bbb3821449272e56bf ]
    
    Since commit:
    
      857b158dc5e8 ("sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion")
    
    ... we have the userspace per-task tunable slice length, which is
    a key parameter that is otherwise difficult to obtain, so provide
    it in /proc/$PID/sched.
    
    [ mingo: Clarified the changelog. ]
    
    Signed-off-by: Christian Loehle <christian.loehle@arm.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: https://lore.kernel.org/r/453349b1-1637-42f5-a7b2-2385392b5956@arm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
sched: address a potential NULL pointer dereference in the GRED scheduler. [+ + +]
Author: Jun Yang <juny24602@gmail.com>
Date:   Wed Mar 5 23:44:10 2025 +0800

    sched: address a potential NULL pointer dereference in the GRED scheduler.
    
    [ Upstream commit 115ef44a98220fddfab37a39a19370497cd718b9 ]
    
    If kzalloc in gred_init returns a NULL pointer, the code follows the
    error handling path, invoking gred_destroy. This, in turn, calls
    gred_offload, where memset could receive a NULL pointer as input,
    potentially leading to a kernel crash.
    
    When table->opt is NULL in gred_init(), gred_change_table_def()
    is not called yet, so it is not necessary to call ->ndo_setup_tc()
    in gred_offload().
    
    Signed-off-by: Jun Yang <juny24602@gmail.com>
    Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
    Fixes: f25c0515c521 ("net: sched: gred: dynamically allocate tc_gred_qopt_offload")
    Link: https://patch.msgid.link/20250305154410.3505642-1-juny24602@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

sched: Clarify wake_up_q()'s write to task->wake_q.next [+ + +]
Author: Jann Horn <jannh@google.com>
Date:   Wed Jan 29 20:53:03 2025 +0100

    sched: Clarify wake_up_q()'s write to task->wake_q.next
    
    [ Upstream commit bcc6244e13b4d4903511a1ea84368abf925031c0 ]
    
    Clarify that wake_up_q() does an atomic write to task->wake_q.next, after
    which a concurrent __wake_q_add() can immediately overwrite
    task->wake_q.next again.
    
    Signed-off-by: Jann Horn <jannh@google.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/20250129-sched-wakeup-prettier-v1-1-2f51f5f663fa@google.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
sched_ext: selftests/dsp_local_on: Fix selftest on UP systems [+ + +]
Author: Andrea Righi <arighi@nvidia.com>
Date:   Sat Jan 25 10:36:07 2025 +0100

    sched_ext: selftests/dsp_local_on: Fix selftest on UP systems
    
    commit 3c7d51b0d29954c40ea3a097e0ec7884b4344331 upstream.
    
    In UP systems p->migration_disabled is not available. Fix this by using
    the portable helper is_migration_disabled(p).
    
    Fixes: e9fe182772dc ("sched_ext: selftests/dsp_local_on: Fix sporadic failures")
    Signed-off-by: Andrea Righi <arighi@nvidia.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

sched_ext: selftests/dsp_local_on: Fix sporadic failures [+ + +]
Author: Tejun Heo <tj@kernel.org>
Date:   Fri Jan 24 10:48:25 2025 -1000

    sched_ext: selftests/dsp_local_on: Fix sporadic failures
    
    [ Upstream commit e9fe182772dcb2630964724fd93e9c90b68ea0fd ]
    
    dsp_local_on has several incorrect assumptions, one of which is that
    p->nr_cpus_allowed always tracks p->cpus_ptr. This is not true when a task
    is scheduled out while migration is disabled - p->cpus_ptr is temporarily
    overridden to the previous CPU while p->nr_cpus_allowed remains unchanged.
    
    This led to sporadic test faliures when dsp_local_on_dispatch() tries to put
    a migration disabled task to a different CPU. Fix it by keeping the previous
    CPU when migration is disabled.
    
    There are SCX schedulers that make use of p->nr_cpus_allowed. They should
    also implement explicit handling for p->migration_disabled.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Ihor Solodrai <ihor.solodrai@pm.me>
    Cc: Andrea Righi <arighi@nvidia.com>
    Cc: Changwoo Min <changwoo@igalia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl() [+ + +]
Author: Andrea Righi <arighi@nvidia.com>
Date:   Mon Mar 3 18:51:59 2025 +0100

    sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl()
    
    commit 9360dfe4cbd62ff1eb8217b815964931523b75b3 upstream.
    
    If a BPF scheduler provides an invalid CPU (outside the nr_cpu_ids
    range) as prev_cpu to scx_bpf_select_cpu_dfl() it can cause a kernel
    crash.
    
    To prevent this, validate prev_cpu in scx_bpf_select_cpu_dfl() and
    trigger an scx error if an invalid CPU is specified.
    
    Fixes: f0e1a0643a59b ("sched_ext: Implement BPF extensible scheduler class")
    Cc: stable@vger.kernel.org # v6.12+
    Signed-off-by: Andrea Righi <arighi@nvidia.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
scripts: generate_rust_analyzer: add missing include_dirs [+ + +]
Author: Tamir Duberstein <tamird@gmail.com>
Date:   Mon Feb 10 13:04:16 2025 -0500

    scripts: generate_rust_analyzer: add missing include_dirs
    
    [ Upstream commit d1f928052439cad028438a8b8b34c1f01bc06068 ]
    
    Commit 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`")
    specified OBJTREE for the bindings crate, and `source.include_dirs` for
    the kernel crate, likely in an attempt to support out-of-source builds
    for those crates where the generated files reside in `objtree` rather
    than `srctree`. This was insufficient because both bits of configuration
    are required for each crate; the result is that rust-analyzer is unable
    to resolve generated files for either crate in an out-of-source build.
    
      [ Originally we were not using `OBJTREE` in the `kernel` crate, but
        we did pass the variable anyway, so conceptually it could have been
        there since then.
    
        Regarding `include_dirs`, it started in `kernel` before being in
        mainline because we included the bindings directly there (i.e.
        there was no `bindings` crate). However, when that crate got
        created, we moved the `OBJTREE` there but not the `include_dirs`.
        Nowadays, though, we happen to need the `include_dirs` also in
        the `kernel` crate for `generated_arch_static_branch_asm.rs` which
        was not there back then -- Tamir confirms it is indeed required
        for that reason. - Miguel ]
    
    Add the missing bits to improve the developer experience.
    
    Fixes: 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`")
    Signed-off-by: Tamir Duberstein <tamird@gmail.com>
    Tested-by: Andreas Hindborg <a.hindborg@kernel.org>
    Link: https://lore.kernel.org/r/20250210-rust-analyzer-bindings-include-v2-1-23dff845edc3@gmail.com
    [ Slightly reworded title. - Miguel ]
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

scripts: generate_rust_analyzer: add missing macros deps [+ + +]
Author: Tamir Duberstein <tamird@gmail.com>
Date:   Mon Feb 10 12:03:24 2025 -0500

    scripts: generate_rust_analyzer: add missing macros deps
    
    [ Upstream commit 2e0f91aba507a3cb59f7a12fc3ea2b7d4d6675b7 ]
    
    The macros crate has depended on std and proc_macro since its
    introduction in commit 1fbde52bde73 ("rust: add `macros` crate"). These
    dependencies were omitted from commit 8c4555ccc55c ("scripts: add
    `generate_rust_analyzer.py`") resulting in missing go-to-definition and
    autocomplete, and false-positive warnings emitted from rust-analyzer
    such as:
    
      [{
            "resource": "/Users/tamird/src/linux/rust/macros/module.rs",
            "owner": "_generated_diagnostic_collection_name_#1",
            "code": {
                    "value": "non_snake_case",
                    "target": {
                            "$mid": 1,
                            "path": "/rustc/",
                            "scheme": "https",
                            "authority": "doc.rust-lang.org",
                            "query": "search=non_snake_case"
                    }
            },
            "severity": 4,
            "message": "Variable `None` should have snake_case name, e.g. `none`",
            "source": "rust-analyzer",
            "startLineNumber": 123,
            "startColumn": 17,
            "endLineNumber": 123,
            "endColumn": 21
      }]
    
    Add the missing dependencies to improve the developer experience.
    
      [ Fiona had a different approach (thanks!) at:
    
            https://lore.kernel.org/rust-for-linux/20241205115438.234221-1-me@kloenk.dev/
    
        But Tamir and Fiona agreed to this one. - Miguel ]
    
    Fixes: 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`")
    Reviewed-by: Fiona Behrens <me@kloenk.dev>
    Diagnosed-by: Chayim Refael Friedman <chayimfr@gmail.com>
    Link: https://github.com/rust-lang/rust-analyzer/issues/17759#issuecomment-2646328275
    Signed-off-by: Tamir Duberstein <tamird@gmail.com>
    Tested-by: Andreas Hindborg <a.hindborg@kernel.org>
    Link: https://lore.kernel.org/r/20250210-rust-analyzer-macros-core-dep-v3-1-45eb4836f218@gmail.com
    [ Removed `return`. Changed tag name. Added Link. Slightly
      reworded. - Miguel ]
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

scripts: generate_rust_analyzer: add uapi crate [+ + +]
Author: Tamir Duberstein <tamird@gmail.com>
Date:   Mon Feb 10 13:04:17 2025 -0500

    scripts: generate_rust_analyzer: add uapi crate
    
    [ Upstream commit a1eb95d6b5f4cf5cc7b081e85e374d1dd98a213b ]
    
    Commit 4e1746656839 ("rust: uapi: Add UAPI crate") did not update
    rust-analyzer to include the new crate.
    
    Add the missing definition to improve the developer experience.
    
    Fixes: 4e1746656839 ("rust: uapi: Add UAPI crate")
    Signed-off-by: Tamir Duberstein <tamird@gmail.com>
    Tested-by: Andreas Hindborg <a.hindborg@kernel.org>
    Link: https://lore.kernel.org/r/20250210-rust-analyzer-bindings-include-v2-2-23dff845edc3@gmail.com
    [ Slightly reworded title. - Miguel ]
    Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
scsi: core: Use GFP_NOIO to avoid circular locking dependency [+ + +]
Author: Rik van Riel <riel@surriel.com>
Date:   Tue Jan 28 16:35:39 2025 -0500

    scsi: core: Use GFP_NOIO to avoid circular locking dependency
    
    [ Upstream commit 5363ee9d110e139584c2d92a0b640bc210588506 ]
    
    Filesystems can write to disk from page reclaim with __GFP_FS
    set. Marc found a case where scsi_realloc_sdev_budget_map() ends up in
    page reclaim with GFP_KERNEL, where it could try to take filesystem
    locks again, leading to a deadlock.
    
    WARNING: possible circular locking dependency detected
    6.13.0 #1 Not tainted
    ------------------------------------------------------
    kswapd0/70 is trying to acquire lock:
    ffff8881025d5d78 (&q->q_usage_counter(io)){++++}-{0:0}, at: blk_mq_submit_bio+0x461/0x6e0
    
    but task is already holding lock:
    ffffffff81ef5f40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x9f/0x760
    
    The full lockdep splat can be found in Marc's report:
    
    https://lkml.org/lkml/2025/1/24/1101
    
    Avoid the potential deadlock by doing the allocation with GFP_NOIO, which
    prevents both filesystem and block layer recursion.
    
    Reported-by: Marc Aurèle La France <tsi@tuyoix.net>
    Signed-off-by: Rik van Riel <riel@surriel.com>
    Link: https://lore.kernel.org/r/20250129104525.0ae8421e@fangorn
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

scsi: qla1280: Fix kernel oops when debug level > 2 [+ + +]
Author: Magnus Lindholm <linmag7@gmail.com>
Date:   Sat Jan 25 10:49:22 2025 +0100

    scsi: qla1280: Fix kernel oops when debug level > 2
    
    [ Upstream commit 5233e3235dec3065ccc632729675575dbe3c6b8a ]
    
    A null dereference or oops exception will eventually occur when qla1280.c
    driver is compiled with DEBUG_QLA1280 enabled and ql_debug_level > 2.  I
    think its clear from the code that the intention here is sg_dma_len(s) not
    length of sg_next(s) when printing the debug info.
    
    Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
    Link: https://lore.kernel.org/r/20250125095033.26188-1-linmag7@gmail.com
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

scsi: ufs: core: Fix error return with query response [+ + +]
Author: Seunghui Lee <sh043.lee@samsung.com>
Date:   Sat Jan 18 11:38:08 2025 +0900

    scsi: ufs: core: Fix error return with query response
    
    [ Upstream commit 1a78a56ea65252bb089e0daace989167227f2d31 ]
    
    There is currently no mechanism to return error from query responses.
    Return the error and print the corresponding error message with it.
    
    Signed-off-by: Seunghui Lee <sh043.lee@samsung.com>
    Link: https://lore.kernel.org/r/20250118023808.24726-1-sh043.lee@samsung.com
    Reviewed-by: Bean Huo <beanhuo@micron.com>
    Reviewed-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
sctp: Fix undefined behavior in left shift operation [+ + +]
Author: Yu-Chun Lin <eleanor15x@gmail.com>
Date:   Tue Feb 18 16:12:16 2025 +0800

    sctp: Fix undefined behavior in left shift operation
    
    [ Upstream commit 606572eb22c1786a3957d24307f5760bb058ca19 ]
    
    According to the C11 standard (ISO/IEC 9899:2011, 6.5.7):
    "If E1 has a signed type and E1 x 2^E2 is not representable in the result
    type, the behavior is undefined."
    
    Shifting 1 << 31 causes signed integer overflow, which leads to undefined
    behavior.
    
    Fix this by explicitly using '1U << 31' to ensure the shift operates on
    an unsigned type, avoiding undefined behavior.
    
    Signed-off-by: Yu-Chun Lin <eleanor15x@gmail.com>
    Link: https://patch.msgid.link/20250218081217.3468369-1-eleanor15x@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
selftests/bpf: Adjust data size to have ETH_HLEN [+ + +]
Author: Shigeru Yoshida <syoshida@redhat.com>
Date:   Wed Jan 22 00:06:43 2025 +0900

    selftests/bpf: Adjust data size to have ETH_HLEN
    
    [ Upstream commit c7f2188d68c114095660a950b7e880a1e5a71c8f ]
    
    The function bpf_test_init() now returns an error if user_size
    (.data_size_in) is less than ETH_HLEN, causing the tests to
    fail. Adjust the data size to ensure it meets the requirement of
    ETH_HLEN.
    
    Signed-off-by: Shigeru Yoshida <syoshida@redhat.com>
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Link: https://patch.msgid.link/20250121150643.671650-2-syoshida@redhat.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

selftests/bpf: Fix invalid flag of recv() [+ + +]
Author: Jiayuan Chen <mrpre@163.com>
Date:   Wed Jan 22 18:09:16 2025 +0800

    selftests/bpf: Fix invalid flag of recv()
    
    [ Upstream commit a0c11149509aa905aeec10cf9998091443472b0b ]
    
    SOCK_NONBLOCK flag is only effective during socket creation, not during
    recv. Use MSG_DONTWAIT instead.
    
    Signed-off-by: Jiayuan Chen <mrpre@163.com>
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Acked-by: Jakub Sitnicki <jakub@cloudflare.com>
    Acked-by: John Fastabend <john.fastabend@gmail.com>
    Link: https://patch.msgid.link/20250122100917.49845-5-mrpre@163.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
selftests/cgroup: use bash in test_cpuset_v1_hp.sh [+ + +]
Author: Bharadwaj Raju <bharadwaj.raju777@gmail.com>
Date:   Wed Feb 5 00:59:53 2025 +0530

    selftests/cgroup: use bash in test_cpuset_v1_hp.sh
    
    [ Upstream commit fd079124112c6e11c1bca2e7c71470a2d60bc363 ]
    
    The script uses non-POSIX features like `[[` for conditionals and hence
    does not work when run with a POSIX /bin/sh.
    
    Change the shebang to /bin/bash instead, like the other tests in cgroup.
    
    Signed-off-by: Bharadwaj Raju <bharadwaj.raju777@gmail.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
selftests: always check mask returned by statmount(2) [+ + +]
Author: Miklos Szeredi <mszeredi@redhat.com>
Date:   Wed Jan 29 17:06:41 2025 +0100

    selftests: always check mask returned by statmount(2)
    
    [ Upstream commit 2cc02059fbc79306b53a44b1f1a4444aa3c76598 ]
    
    STATMOUNT_MNT_OPTS can actually be missing if there are no options.  This
    is a change of behavior since 75ead69a7173 ("fs: don't let statmount return
    empty strings").
    
    The other checks shouldn't actually trigger, but add them for correctness
    and for easier debugging if the test fails.
    
    Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
    Link: https://lore.kernel.org/r/20250129160641.35485-1-mszeredi@redhat.com
    Signed-off-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

selftests: bonding: fix incorrect mac address [+ + +]
Author: Hangbin Liu <liuhangbin@gmail.com>
Date:   Thu Mar 6 02:39:23 2025 +0000

    selftests: bonding: fix incorrect mac address
    
    [ Upstream commit 9318dc2357b6b8b2ea1200ab7f2d5877851b7382 ]
    
    The correct mac address for NS target 2001:db8::254 is 33:33:ff:00:02:54,
    not 33:33:00:00:02:54. The same with client maddress.
    
    Fixes: 86fb6173d11e ("selftests: bonding: add ns multicast group testing")
    Acked-by: Jay Vosburgh <jv@jvosburgh.net>
    Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20250306023923.38777-3-liuhangbin@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
smb3: add support for IAKerb [+ + +]
Author: Steve French <stfrench@microsoft.com>
Date:   Tue Jan 28 01:04:23 2025 -0600

    smb3: add support for IAKerb
    
    [ Upstream commit eea5119fa5979c350af5783a8148eacdd4219715 ]
    
    There are now more servers which advertise support for IAKerb (passthrough
    Kerberos authentication via proxy).  IAKerb is a public extension industry
    standard Kerberos protocol that allows a client without line-of-sight
    to a Domain Controller to authenticate. There can be cases where we
    would fail to mount if the server only advertises the OID for IAKerb
    in SPNEGO/GSSAPI.  Add code to allow us to still upcall to userspace
    in these cases to obtain the Kerberos ticket.
    
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Stable-dep-of: 605b249ea967 ("smb: client: Fix match_session bug preventing session reuse")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
smb: client: Fix match_session bug preventing session reuse [+ + +]
Author: Henrique Carvalho <henrique.carvalho@suse.com>
Date:   Tue Mar 11 15:23:59 2025 -0300

    smb: client: Fix match_session bug preventing session reuse
    
    [ Upstream commit 605b249ea96770ac4fac4b8510a99e0f8442be5e ]
    
    Fix a bug in match_session() that can causes the session to not be
    reused in some cases.
    
    Reproduction steps:
    
    mount.cifs //server/share /mnt/a -o credentials=creds
    mount.cifs //server/share /mnt/b -o credentials=creds,sec=ntlmssp
    cat /proc/fs/cifs/DebugData | grep SessionId | wc -l
    
    mount.cifs //server/share /mnt/b -o credentials=creds,sec=ntlmssp
    mount.cifs //server/share /mnt/a -o credentials=creds
    cat /proc/fs/cifs/DebugData | grep SessionId | wc -l
    
    Cc: stable@vger.kernel.org
    Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
    Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

smb: client: fix noisy when tree connecting to DFS interlink targets [+ + +]
Author: Paulo Alcantara <pc@manguebit.com>
Date:   Wed Feb 5 13:22:11 2025 -0300

    smb: client: fix noisy when tree connecting to DFS interlink targets
    
    [ Upstream commit 773dc23ff81838b6f74d7fabba5a441cc6a93982 ]
    
    When the client attempts to tree connect to a domain-based DFS
    namespace from a DFS interlink target, the server will return
    STATUS_BAD_NETWORK_NAME and the following will appear on dmesg:
    
            CIFS: VFS:  BAD_NETWORK_NAME: \\dom\dfs
    
    Since a DFS share might contain several DFS interlinks and they expire
    after 10 minutes, the above message might end up being flooded on
    dmesg when mounting or accessing them.
    
    Print this only once per share.
    
    Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

smb: client: fix regression with guest option [+ + +]
Author: Paulo Alcantara <pc@manguebit.com>
Date:   Wed Mar 12 10:51:31 2025 -0300

    smb: client: fix regression with guest option
    
    commit fc99045effa81fdf509c2a97cbb7e6e8f2fd4443 upstream.
    
    When mounting a CIFS share with 'guest' mount option, mount.cifs(8)
    will set empty password= and password2= options.  Currently we only
    handle empty strings from user= and password= options, so the mount
    will fail with
    
            cifs: Bad value for 'password2'
    
    Fix this by handling empty string from password2= option as well.
    
    Link: https://bbs.archlinux.org/viewtopic.php?id=303927
    Reported-by: Adam Williamson <awilliam@redhat.com>
    Closes: https://lore.kernel.org/r/83c00b5fea81c07f6897a5dd3ef50fd3b290f56c.camel@redhat.com
    Fixes: 35f834265e0d ("smb3: fix broken reconnect when password changing on the server by allowing password rotation")
    Cc: stable@vger.kernel.org
    Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
spi: microchip-core: prevent RX overflows when transmit size > FIFO size [+ + +]
Author: Conor Dooley <conor.dooley@microchip.com>
Date:   Mon Mar 3 10:47:40 2025 +0000

    spi: microchip-core: prevent RX overflows when transmit size > FIFO size
    
    commit 91cf42c63f2d8a9c1bcdfe923218e079b32e1a69 upstream.
    
    When the size of a transfer exceeds the size of the FIFO (32 bytes), RX
    overflows will be generated and receive data will be corrupted and
    warnings will be produced. For example, here's an error generated by a
    transfer of 36 bytes:
    
      spi_master spi0: mchp_corespi_interrupt: RX OVERFLOW: rxlen: 4, txlen: 0
    
    The driver is currently split between handling receiving in the
    interrupt handler, and sending outside of it. Move all handling out of
    the interrupt handling, and explicitly link the number of bytes read of
    of the RX FIFO to the number written into the TX one. This both resolves
    the overflow problems as well as simplifying the flow of the driver.
    
    CC: stable@vger.kernel.org
    Fixes: 9ac8d17694b6 ("spi: add support for microchip fpga spi controllers")
    Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
    Link: https://patch.msgid.link/20250303-veal-snooper-712c1dfad336@wendy
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
thermal/cpufreq_cooling: Remove structure member documentation [+ + +]
Author: Daniel Lezcano <daniel.lezcano@linaro.org>
Date:   Tue Feb 11 09:47:11 2025 +0100

    thermal/cpufreq_cooling: Remove structure member documentation
    
    [ Upstream commit a6768c4f92e152265590371975d44c071a5279c7 ]
    
    The structure member documentation refers to a member which does not
    exist any more. Remove it.
    
    Link: https://lore.kernel.org/all/202501220046.h3PMBCti-lkp@intel.com/
    Reported-by: kernel test robot <lkp@intel.com>
    Closes: https://lore.kernel.org/oe-kbuild-all/202501220046.h3PMBCti-lkp@intel.com/
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
    Link: https://patch.msgid.link/20250211084712.2746705-1-daniel.lezcano@linaro.org
    [ rjw: Minor changelog edits ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
tools/sched_ext: Add helper to check task migration state [+ + +]
Author: Andrea Righi <arighi@nvidia.com>
Date:   Sat Jan 25 18:14:12 2025 +0100

    tools/sched_ext: Add helper to check task migration state
    
    commit 5f52bbf2f6e0997394cf9c449d44e1c80ff4282c upstream.
    
    Introduce a new helper for BPF schedulers to determine whether a task
    can migrate or not (supporting both SMP and UP systems).
    
    Fixes: e9fe182772dc ("sched_ext: selftests/dsp_local_on: Fix sporadic failures")
    Signed-off-by: Andrea Righi <arighi@nvidia.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
usb: phy: generic: Use proper helper for property detection [+ + +]
Author: Alexander Stein <alexander.stein@ew.tq-group.com>
Date:   Mon Jan 20 15:42:51 2025 +0100

    usb: phy: generic: Use proper helper for property detection
    
    [ Upstream commit 309005e448c1f3e4b81e4416406991b7c3339c1d ]
    
    Since commit c141ecc3cecd7 ("of: Warn when of_property_read_bool() is
    used on non-boolean properties") a warning is raised if this function
    is used for property detection. of_property_present() is the correct
    helper for this.
    
    Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
    Link: https://lore.kernel.org/r/20250120144251.580981-1-alexander.stein@ew.tq-group.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
USB: serial: ftdi_sio: add support for Altera USB Blaster 3 [+ + +]
Author: Boon Khai Ng <boon.khai.ng@intel.com>
Date:   Wed Mar 12 11:05:44 2025 +0800

    USB: serial: ftdi_sio: add support for Altera USB Blaster 3
    
    commit 18e0885bd2ca738407036434418a26a58394a60e upstream.
    
    The Altera USB Blaster 3, available as both a cable and an on-board
    solution, is primarily used for programming and debugging FPGAs.
    
    It interfaces with host software such as Quartus Programmer,
    System Console, SignalTap, and Nios Debugger. The device utilizes
    either an FT2232 or FT4232 chip.
    
    Enabling the support for various configurations of the on-board
    USB Blaster 3 by including the appropriate VID/PID pairs,
    allowing it to function as a serial device via ftdi_sio.
    
    Note that this check-in does not include support for the
    cable solution, as it does not support UART functionality.
    The supported configurations are determined by the
    hardware design and include:
    
    1) PID 0x6022, FT2232, 1 JTAG port (Port A) + Port B as UART
    2) PID 0x6025, FT4232, 1 JTAG port (Port A) + Port C as UART
    3) PID 0x6026, FT4232, 1 JTAG port (Port A) + Port C, D as UART
    4) PID 0x6029, FT4232, 1 JTAG port (Port B) + Port C as UART
    5) PID 0x602a, FT4232, 1 JTAG port (Port B) + Port C, D as UART
    6) PID 0x602c, FT4232, 1 JTAG port (Port A) + Port B as UART
    7) PID 0x602d, FT4232, 1 JTAG port (Port A) + Port B, C as UART
    8) PID 0x602e, FT4232, 1 JTAG port (Port A) + Port B, C, D as UART
    
    These configurations allow for flexibility in how the USB Blaster 3 is
    used, depending on the specific needs of the hardware design.
    
    Signed-off-by: Boon Khai Ng <boon.khai.ng@intel.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: option: add Telit Cinterion FE990B compositions [+ + +]
Author: Fabio Porcedda <fabio.porcedda@gmail.com>
Date:   Tue Mar 4 10:19:38 2025 +0100

    USB: serial: option: add Telit Cinterion FE990B compositions
    
    commit 4981bb50392b7515b765da28cf8768ce624c2670 upstream.
    
    Add the following Telit Cinterion FE990B40 compositions:
    
    0x10b0: rmnet + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) +
            tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb
    T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=480  MxCh= 0
    D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=10b0 Rev=05.15
    S:  Manufacturer=Telit Cinterion
    S:  Product=FE990
    S:  SerialNumber=28c2595e
    C:  #Ifs= 9 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=88(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8a(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
    E:  Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none)
    E:  Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
    E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    0x10b1: MBIM + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) +
            tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb
    T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  8 Spd=480  MxCh= 0
    D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=10b1 Rev=05.15
    S:  Manufacturer=Telit Cinterion
    S:  Product=FE990
    S:  SerialNumber=28c2595e
    C:  #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
    E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
    I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=88(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8a(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
    E:  Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none)
    E:  Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
    E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    0x10b2: RNDIS + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) +
            tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb
    T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  9 Spd=480  MxCh= 0
    D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=10b2 Rev=05.15
    S:  Manufacturer=Telit Cinterion
    S:  Product=FE990
    S:  SerialNumber=28c2595e
    C:  #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=ef(misc ) Sub=04 Prot=01 Driver=rndis_host
    E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
    I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=88(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8a(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
    E:  Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none)
    E:  Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
    E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    0x10b3: ECM + tty (AT/NMEA) + tty (AT) + tty (AT) + tty (AT) +
            tty (diag) + DPL + QDSS (Qualcomm Debug SubSystem) + adb
    T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 11 Spd=480  MxCh= 0
    D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=10b3 Rev=05.15
    S:  Manufacturer=Telit Cinterion
    S:  Product=FE990
    S:  SerialNumber=28c2595e
    C:  #Ifs=10 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
    E:  Ad=82(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
    I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=88(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8a(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    I:  If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
    E:  Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 8 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none)
    E:  Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
    E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
    Reviewed-by: Daniele Palmas <dnlplm@gmail.com>
    [ johan: use USB_DEVICE_AND_INTERFACE_INFO() and sort by protocol ]
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: option: fix Telit Cinterion FE990A name [+ + +]
Author: Fabio Porcedda <fabio.porcedda@gmail.com>
Date:   Tue Mar 4 10:19:39 2025 +0100

    USB: serial: option: fix Telit Cinterion FE990A name
    
    commit 6232f0d8e100a26275bbd773fc56a60af2c95322 upstream.
    
    The correct name for FE990 is FE990A so use it in order to avoid
    confusion with FE990B.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: option: match on interface class for Telit FN990B [+ + +]
Author: Johan Hovold <johan@kernel.org>
Date:   Thu Mar 6 11:44:41 2025 +0100

    USB: serial: option: match on interface class for Telit FN990B
    
    commit 9a665fe3d967fe46edb4fd2497c7a5cc2dac2f55 upstream.
    
    The device id entries for Telit FN990B ended up matching only on the
    interface protocol. While this works, the protocol is qualified by the
    interface class (and subclass) which should have been included.
    
    Switch to matching using USB_DEVICE_AND_INTERFACE_INFO() while keeping
    the entries sorted also by protocol for consistency.
    
    Link: https://lore.kernel.org/20250227110655.3647028-2-fabio.porcedda@gmail.com/
    Cc: Fabio Porcedda <fabio.porcedda@gmail.com>
    Cc: Daniele Palmas <dnlplm@gmail.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
usb: typec: tcpm: fix state transition for SNK_WAIT_CAPABILITIES state in run_state_machine() [+ + +]
Author: Amit Sunil Dhamne <amitsd@google.com>
Date:   Mon Mar 10 19:19:07 2025 -0700

    usb: typec: tcpm: fix state transition for SNK_WAIT_CAPABILITIES state in run_state_machine()
    
    commit f2865c6300d75a9f187dd7918d248e010970fd44 upstream.
    
    A subtle error got introduced while manually fixing merge conflict in
    tcpm.c for commit 85c4efbe6088 ("Merge v6.12-rc6 into usb-next"). As a
    result of this error, the next state is unconditionally set to
    SNK_WAIT_CAPABILITIES_TIMEOUT while handling SNK_WAIT_CAPABILITIES state
    in run_state_machine(...).
    
    Fix this by setting new state of TCPM state machine to `upcoming_state`
    (that is set to different values based on conditions).
    
    Cc: stable@vger.kernel.org
    Fixes: 85c4efbe60888 ("Merge v6.12-rc6 into usb-next")
    Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
    Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
    Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
    Link: https://lore.kernel.org/r/20250310-fix-snk-wait-timeout-v6-14-rc6-v1-1-5db14475798f@google.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
userfaultfd: fix PTE unmapping stack-allocated PTE copies [+ + +]
Author: Suren Baghdasaryan <surenb@google.com>
Date:   Wed Feb 26 10:55:09 2025 -0800

    userfaultfd: fix PTE unmapping stack-allocated PTE copies
    
    commit 927e926d72d9155fde3264459fe9bfd7b5e40d28 upstream.
    
    Current implementation of move_pages_pte() copies source and destination
    PTEs in order to detect concurrent changes to PTEs involved in the move.
    However these copies are also used to unmap the PTEs, which will fail if
    CONFIG_HIGHPTE is enabled because the copies are allocated on the stack.
    Fix this by using the actual PTEs which were kmap()ed.
    
    Link: https://lkml.kernel.org/r/20250226185510.2732648-3-surenb@google.com
    Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
    Signed-off-by: Suren Baghdasaryan <surenb@google.com>
    Reported-by: Peter Xu <peterx@redhat.com>
    Reviewed-by: Peter Xu <peterx@redhat.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Barry Song <21cnbao@gmail.com>
    Cc: Barry Song <v-songbaohua@oppo.com>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Jann Horn <jannh@google.com>
    Cc: Kalesh Singh <kaleshsingh@google.com>
    Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
    Cc: Lokesh Gidra <lokeshgidra@google.com>
    Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
    Cc: Matthew Wilcow (Oracle) <willy@infradead.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
vboxsf: fix building with GCC 15 [+ + +]
Author: Brahmajit Das <brahmajit.xyz@gmail.com>
Date:   Tue Jan 21 21:56:48 2025 +0530

    vboxsf: fix building with GCC 15
    
    [ Upstream commit 4e7487245abcbc5a1a1aea54e4d3b33c53804bda ]
    
    Building with GCC 15 results in build error
    fs/vboxsf/super.c:24:54: error: initializer-string for array of ‘unsigned char’ is too long [-Werror=unterminated-string-initialization]
       24 | static const unsigned char VBSF_MOUNT_SIGNATURE[4] = "\000\377\376\375";
          |                                                      ^~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    
    Due to GCC having enabled -Werror=unterminated-string-initialization[0]
    by default. Separately initializing each array element of
    VBSF_MOUNT_SIGNATURE to ensure NUL termination, thus satisfying GCC 15
    and fixing the build error.
    
    [0]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-unterminated-string-initialization
    
    Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
    Link: https://lore.kernel.org/r/20250121162648.1408743-1-brahmajit.xyz@gmail.com
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
vhost: return task creation error instead of NULL [+ + +]
Author: Keith Busch <kbusch@kernel.org>
Date:   Thu Feb 27 15:06:30 2025 -0800

    vhost: return task creation error instead of NULL
    
    [ Upstream commit cb380909ae3b1ebf14d6a455a4f92d7916d790cb ]
    
    Lets callers distinguish why the vhost task creation failed. No one
    currently cares why it failed, so no real runtime change from this
    patch, but that will not be the case for long.
    
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Message-ID: <20250227230631.303431-2-kbusch@meta.com>
    Reviewed-by: Mike Christie <michael.christie@oracle.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
virt: sev-guest: Move SNP Guest Request data pages handling under snp_cmd_mutex [+ + +]
Author: Alexey Kardashevskiy <aik@amd.com>
Date:   Fri Mar 7 12:37:00 2025 +1100

    virt: sev-guest: Move SNP Guest Request data pages handling under snp_cmd_mutex
    
    commit 3e385c0d6ce88ac9916dcf84267bd5855d830748 upstream.
    
    Compared to the SNP Guest Request, the "Extended" version adds data pages for
    receiving certificates. If not enough pages provided, the HV can report to the
    VM how much is needed so the VM can reallocate and repeat.
    
    Commit
    
      ae596615d93d ("virt: sev-guest: Reduce the scope of SNP command mutex")
    
    moved handling of the allocated/desired pages number out of scope of said
    mutex and create a possibility for a race (multiple instances trying to
    trigger Extended request in a VM) as there is just one instance of
    snp_msg_desc per /dev/sev-guest and no locking other than snp_cmd_mutex.
    
    Fix the issue by moving the data blob/size and the GHCB input struct
    (snp_req_data) into snp_guest_req which is allocated on stack now and accessed
    by the GHCB caller under that mutex.
    
    Stop allocating SEV_FW_BLOB_MAX_SIZE in snp_msg_alloc() as only one of four
    callers needs it. Free the received blob in get_ext_report() right after it is
    copied to the userspace. Possible future users of snp_send_guest_request() are
    likely to have different ideas about the buffer size anyways.
    
    Fixes: ae596615d93d ("virt: sev-guest: Reduce the scope of SNP command mutex")
    Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Reviewed-by: Nikunj A Dadhania <nikunj@amd.com>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20250307013700.437505-3-aik@amd.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
wifi: cfg80211: cancel wiphy_work before freeing wiphy [+ + +]
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 6 12:37:59 2025 +0200

    wifi: cfg80211: cancel wiphy_work before freeing wiphy
    
    [ Upstream commit 72d520476a2fab6f3489e8388ab524985d6c4b90 ]
    
    A wiphy_work can be queued from the moment the wiphy is allocated and
    initialized (i.e. wiphy_new_nm). When a wiphy_work is queued, the
    rdev::wiphy_work is getting queued.
    
    If wiphy_free is called before the rdev::wiphy_work had a chance to run,
    the wiphy memory will be freed, and then when it eventally gets to run
    it'll use invalid memory.
    
    Fix this by canceling the work before freeing the wiphy.
    
    Fixes: a3ee4dc84c4e ("wifi: cfg80211: add a work abstraction with special semantics")
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Johannes Berg <johannes.berg@intel.com>
    Link: https://patch.msgid.link/20250306123626.efd1d19f6e07.I48229f96f4067ef73f5b87302335e2fd750136c9@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

wifi: iwlwifi: mvm: fix PNVM timeout for non-MSI-X platforms [+ + +]
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date:   Thu Mar 6 12:25:47 2025 +0200

    wifi: iwlwifi: mvm: fix PNVM timeout for non-MSI-X platforms
    
    [ Upstream commit b8c8a03e9b7bfc06f366b75daf3d0812400e7123 ]
    
    When MSI-X is not enabled, we mask all the interrupts in the interrupt
    handler and re-enable them when the interrupt thread runs. If
    STATUS_INT_ENABLED is not set, we won't re-enable in the thread.
    In order to get the ALIVE interrupt, we allow the ALIVE interrupt
    itself, and RX as well in order to receive the ALIVE notification (which
    is received as an RX from the firmware.
    
    The problem is that STATUS_INT_ENABLED is clear until the op_mode calls
    trans_fw_alive which means that until trans_fw_alive is called, any
    notification from the firmware will not be received.
    
    This became a problem when we inserted the pnvm_load exactly between the
    ALIVE and trans_fw_alive.
    
    Fix that by calling trans_fw_alive before loading the PNVM. This will
    allow to get the notification from the firmware about PNVM load being
    complete and continue the flow normally.
    
    This didn't happen on MSI-X because we don't disable the interrupts in
    the ISR when MSI-X is available.
    
    The error in the log looks like this:
    
    iwlwifi 0000:00:03.0: Timeout waiting for PNVM load!
    iwlwifi 0000:00:03.0: Failed to start RT ucode: -110
    iwlwifi 0000:00:03.0: WRT: Collecting data: ini trigger 13 fired (delay=0ms).
    
    Fixes: 70d3ca86b025 ("iwlwifi: mvm: ring the doorbell and wait for PNVM load completion")
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Reviewed-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Link: https://patch.msgid.link/20250306122425.0f2cf207aae1.I025d8f724b44f52eadf6c19069352eb9275613a8@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

wifi: mac80211: don't queue sdata::work for a non-running sdata [+ + +]
Author: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Date:   Thu Mar 6 12:37:56 2025 +0200

    wifi: mac80211: don't queue sdata::work for a non-running sdata
    
    [ Upstream commit 20d5a0b9cd0ccb32e886cf6baecf14936325bf10 ]
    
    The worker really shouldn't be queued for a non-running interface.
    Also, if ieee80211_setup_sdata is called between queueing and executing
    the wk, it will be initialized, which will corrupt wiphy_work_list.
    
    Fixes: f8891461a277 ("mac80211: do not start any work during reconfigure flow")
    Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
    Reviewed-by: Johannes Berg <johannes.berg@intel.com>
    Link: https://patch.msgid.link/20250306123626.1e02caf82640.I4949e71ed56e7186ed4968fa9ddff477473fa2f4@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

wifi: mac80211: fix MPDU length parsing for EHT 5/6 GHz [+ + +]
Author: Benjamin Berg <benjamin.berg@intel.com>
Date:   Tue Mar 11 12:17:04 2025 +0100

    wifi: mac80211: fix MPDU length parsing for EHT 5/6 GHz
    
    [ Upstream commit 8ae227f8a7749eec92fc381dfbe213429c852278 ]
    
    The MPDU length is only configured using the EHT capabilities element on
    2.4 GHz. On 5/6 GHz it is configured using the VHT or HE capabilities
    respectively.
    
    Fixes: cf0079279727 ("wifi: mac80211: parse A-MSDU len from EHT capabilities")
    Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
    Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
    Link: https://patch.msgid.link/20250311121704.0634d31f0883.I28063e4d3ef7d296b7e8a1c303460346a30bf09c@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
x86/irq: Define trace events conditionally [+ + +]
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Tue Feb 25 22:32:33 2025 +0100

    x86/irq: Define trace events conditionally
    
    [ Upstream commit 9de7695925d5d2d2085681ba935857246eb2817d ]
    
    When both of X86_LOCAL_APIC and X86_THERMAL_VECTOR are disabled,
    the irq tracing produces a W=1 build warning for the tracing
    definitions:
    
      In file included from include/trace/trace_events.h:27,
                     from include/trace/define_trace.h:113,
                     from arch/x86/include/asm/trace/irq_vectors.h:383,
                     from arch/x86/kernel/irq.c:29:
      include/trace/stages/init.h:2:23: error: 'str__irq_vectors__trace_system_name' defined but not used [-Werror=unused-const-variable=]
    
    Make the tracepoints conditional on the same symbosl that guard
    their usage.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20250225213236.3141752-1-arnd@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
x86/microcode/AMD: Fix out-of-bounds on systems with CPU-less NUMA nodes [+ + +]
Author: Florent Revest <revest@chromium.org>
Date:   Mon Mar 10 15:42:43 2025 +0100

    x86/microcode/AMD: Fix out-of-bounds on systems with CPU-less NUMA nodes
    
    commit e3e89178a9f4a80092578af3ff3c8478f9187d59 upstream.
    
    Currently, load_microcode_amd() iterates over all NUMA nodes, retrieves their
    CPU masks and unconditionally accesses per-CPU data for the first CPU of each
    mask.
    
    According to Documentation/admin-guide/mm/numaperf.rst:
    
      "Some memory may share the same node as a CPU, and others are provided as
      memory only nodes."
    
    Therefore, some node CPU masks may be empty and wouldn't have a "first CPU".
    
    On a machine with far memory (and therefore CPU-less NUMA nodes):
    - cpumask_of_node(nid) is 0
    - cpumask_first(0) is CONFIG_NR_CPUS
    - cpu_data(CONFIG_NR_CPUS) accesses the cpu_info per-CPU array at an
      index that is 1 out of bounds
    
    This does not have any security implications since flashing microcode is
    a privileged operation but I believe this has reliability implications by
    potentially corrupting memory while flashing a microcode update.
    
    When booting with CONFIG_UBSAN_BOUNDS=y on an AMD machine that flashes
    a microcode update. I get the following splat:
    
      UBSAN: array-index-out-of-bounds in arch/x86/kernel/cpu/microcode/amd.c:X:Y
      index 512 is out of range for type 'unsigned long[512]'
      [...]
      Call Trace:
       dump_stack
       __ubsan_handle_out_of_bounds
       load_microcode_amd
       request_microcode_amd
       reload_store
       kernfs_fop_write_iter
       vfs_write
       ksys_write
       do_syscall_64
       entry_SYSCALL_64_after_hwframe
    
    Change the loop to go over only NUMA nodes which have CPUs before determining
    whether the first CPU on the respective node needs microcode update.
    
      [ bp: Massage commit message, fix typo. ]
    
    Fixes: 7ff6edf4fef3 ("x86/microcode/AMD: Fix mixed steppings support")
    Signed-off-by: Florent Revest <revest@chromium.org>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20250310144243.861978-1-revest@chromium.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
x86/of: Don't use DTB for SMP setup if ACPI is enabled [+ + +]
Author: Dmytro Maluka <dmaluka@chromium.org>
Date:   Sun Jan 5 17:27:40 2025 +0000

    x86/of: Don't use DTB for SMP setup if ACPI is enabled
    
    [ Upstream commit 96f41f644c4885761b0d117fc36dc5dcf92e15ec ]
    
    There are cases when it is useful to use both ACPI and DTB provided by
    the bootloader, however in such cases we should make sure to prevent
    conflicts between the two. Namely, don't try to use DTB for SMP setup
    if ACPI is enabled.
    
    Precisely, this prevents at least:
    
    - incorrectly calling register_lapic_address(APIC_DEFAULT_PHYS_BASE)
      after the LAPIC was already successfully enumerated via ACPI, causing
      noisy kernel warnings and probably potential real issues as well
    
    - failed IOAPIC setup in the case when IOAPIC is enumerated via mptable
      instead of ACPI (e.g. with acpi=noirq), due to
      mpparse_parse_smp_config() overridden by x86_dtb_parse_smp_config()
    
    Signed-off-by: Dmytro Maluka <dmaluka@chromium.org>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Link: https://lore.kernel.org/r/20250105172741.3476758-2-dmaluka@chromium.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
x86/vmware: Parse MP tables for SEV-SNP enabled guests under VMware hypervisors [+ + +]
Author: Ajay Kaher <ajay.kaher@broadcom.com>
Date:   Thu Mar 13 17:31:11 2025 +0000

    x86/vmware: Parse MP tables for SEV-SNP enabled guests under VMware hypervisors
    
    [ Upstream commit a2ab25529bbcea51b5e01dded79f45aeb94f644a ]
    
    Under VMware hypervisors, SEV-SNP enabled VMs are fundamentally able to boot
    without UEFI, but this regressed a year ago due to:
    
      0f4a1e80989a ("x86/sev: Skip ROM range scans and validation for SEV-SNP guests")
    
    In this case, mpparse_find_mptable() has to be called to parse MP
    tables which contains the necessary boot information.
    
    [ mingo: Updated the changelog. ]
    
    Fixes: 0f4a1e80989a ("x86/sev: Skip ROM range scans and validation for SEV-SNP guests")
    Co-developed-by: Ye Li <ye.li@broadcom.com>
    Signed-off-by: Ye Li <ye.li@broadcom.com>
    Signed-off-by: Ajay Kaher <ajay.kaher@broadcom.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Tested-by: Ye Li <ye.li@broadcom.com>
    Reviewed-by: Kevin Loughlin <kevinloughlin@google.com>
    Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
    Link: https://lore.kernel.org/r/20250313173111.10918-1-ajay.kaher@broadcom.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Xen/swiotlb: mark xen_swiotlb_fixup() __init [+ + +]
Author: Jan Beulich <jbeulich@suse.com>
Date:   Wed Feb 12 16:14:38 2025 +0100

    Xen/swiotlb: mark xen_swiotlb_fixup() __init
    
    [ Upstream commit 75ad02318af2e4ae669e26a79f001bd5e1f97472 ]
    
    It's sole user (pci_xen_swiotlb_init()) is __init, too.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    
    Message-ID: <e1198286-99ec-41c1-b5ad-e04e285836c9@suse.com>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>