]> git.ipfire.org Git - thirdparty/linux.git/log
thirdparty/linux.git
8 weeks agosoc: mediatek: mtk-cmdq: Add cmdq_pkt_jump_rel_temp() for removing shift_pa
Jason-JH Lin [Wed, 25 Mar 2026 03:57:39 +0000 (11:57 +0800)] 
soc: mediatek: mtk-cmdq: Add cmdq_pkt_jump_rel_temp() for removing shift_pa

Since shift_pa will be stored into the cmdq_mobx_priv of cmdq_pkt, all
the shif_pa parameters in CMDQ helper APIs can be removed.

Add cmdq_pkt_jump_rel_temp() for the current users of cmdq_pkt_jump_rel(),
and then remove shift_pa after all users have migrated to the new APIs.

Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
8 weeks agosoc: mediatek: Use pkt_write function pointer for subsys ID compatibility
Jason-JH Lin [Wed, 25 Mar 2026 03:57:38 +0000 (11:57 +0800)] 
soc: mediatek: Use pkt_write function pointer for subsys ID compatibility

Switch to pkt_write and reg_write_mask function pointers for register
access, enabling compatibility with platforms regardless of subsys ID
support.

Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
8 weeks agoMerge patch series "cleanup block-style layouts exports"
Christian Brauner [Mon, 11 May 2026 09:11:55 +0000 (11:11 +0200)] 
Merge patch series "cleanup block-style layouts exports"

Chuck Lever <cel@kernel.org> says:

This series cleanups the exportfs support for block-style layouts that
provide direct block device access.  This is preparation for supporting
exportfs of more than a single device per file system.

* patches from https://patch.msgid.link/20260423181854.743150-1-cel@kernel.org:
  exportfs,nfsd: rework checking for layout-based block device access support
  exportfs: don't pass struct iattr to ->commit_blocks
  exportfs: split out the ops for layout-based block device access
  nfsd/blocklayout: always ignore loca_time_modify

Link: https://patch.msgid.link/20260423181854.743150-1-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
8 weeks agoexportfs,nfsd: rework checking for layout-based block device access support
Christoph Hellwig [Thu, 23 Apr 2026 18:18:54 +0000 (14:18 -0400)] 
exportfs,nfsd: rework checking for layout-based block device access support

Currently NFSD hard codes checking support for block-style layouts.
Lift the checks into a file system-helper and provide a exportfs-level
helper to implement the typical checks.

This prepares for supporting block layout export of multiple devices
per file system.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260423181854.743150-5-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
8 weeks agoexportfs: don't pass struct iattr to ->commit_blocks
Christoph Hellwig [Thu, 23 Apr 2026 18:18:53 +0000 (14:18 -0400)] 
exportfs: don't pass struct iattr to ->commit_blocks

The only thing ->commit_blocks really needs is the new size, with a magic
-1 placeholder 0 for "do not change the size" because it only ever
extends the size.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260423181854.743150-4-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
8 weeks agoexportfs: split out the ops for layout-based block device access
Christoph Hellwig [Thu, 23 Apr 2026 18:18:52 +0000 (14:18 -0400)] 
exportfs: split out the ops for layout-based block device access

The support to grant layouts for direct block device access works
at a very different layer than the rest of exports.  Split the methods
for it into a separate struct, and move that into a separate header
to better split things out.  The pointer to the new operation vector
is kept in export_operations to avoid bloating the super_block.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260423181854.743150-3-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
8 weeks agonfsd/blocklayout: always ignore loca_time_modify
Christoph Hellwig [Thu, 23 Apr 2026 18:18:51 +0000 (14:18 -0400)] 
nfsd/blocklayout: always ignore loca_time_modify

RFC 8881 Section 18.42 makes it clear that the client provided timestamp
is a "may" condition, and clients that want to force a specific timestamp
should send a separate SETATTR in the compound.

Since commit b82f92d5dd1a ("fs: have setattr_copy handle multigrain
timestamps appropriately") the ia_mtime value is ignored by file
systems using multi-grain timestamps like XFS, which is the only
file system supporting blocklayout exports right now, so make that
explicit in NFSD as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260423181854.743150-2-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
8 weeks agoselftests/pid_namespace: compute pid_max test limits dynamically
Bjoern Doebel [Wed, 22 Apr 2026 20:11:51 +0000 (20:11 +0000)] 
selftests/pid_namespace: compute pid_max test limits dynamically

The pid_max kselftest hardcodes pid_max values of 400 and 500, but the
kernel enforces a minimum of PIDS_PER_CPU_MIN * num_possible_cpus().
On machines with many possible CPUs (e.g. nr_cpu_ids=128 yields a
minimum of 1024), writing 400 or 500 to /proc/sys/kernel/pid_max
returns EINVAL and all three tests fail.

Compute these limits the same way as the kernel does and set outer_limit
and inner_limit dynamically based on the result. Original test semantics
are preserved (outer < inner, nested namespace capped by parent).

Signed-off-by: Bjoern Doebel <doebel@amazon.com>
Link: https://patch.msgid.link/20260422201151.3830506-1-doebel@amazon.com
Reviewed-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Assisted-by: Kiro:claude-opus-4.6
Signed-off-by: Christian Brauner <brauner@kernel.org>
8 weeks agopinctrl: renesas: rzv2m: Fix type in .pin_config_group_get() callback
Geert Uytterhoeven [Thu, 30 Apr 2026 15:33:17 +0000 (17:33 +0200)] 
pinctrl: renesas: rzv2m: Fix type in .pin_config_group_get() callback

On 64-bit platforms, "unsigned long" is 64-bit.  Hence checking if all
"unsigned long" configuration values are equal should be done using an
"unsigned long" temporary.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/4bcb78b40d685b0aab8c3150d379240ffb765b37.1777562725.git.geert+renesas@glider.be
8 weeks agopinctrl: renesas: rzg2l: Fix type in .pin_config_group_get() callback
Geert Uytterhoeven [Thu, 30 Apr 2026 15:33:16 +0000 (17:33 +0200)] 
pinctrl: renesas: rzg2l: Fix type in .pin_config_group_get() callback

On 64-bit platforms, "unsigned long" is 64-bit.  Hence checking if all
"unsigned long" configuration values are equal should be done using an
"unsigned long" temporary.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://patch.msgid.link/6befae30f129daffd94f7a9507d874443e444a21.1777562725.git.geert+renesas@glider.be
8 weeks agopinctrl: renesas: rzg2l: Add support for clone channel control
Biju Das [Thu, 30 Apr 2026 09:34:12 +0000 (10:34 +0100)] 
pinctrl: renesas: rzg2l: Add support for clone channel control

The RZ/G3L SoC has some IP such as I2C ch{2,3},SCIF ch{3,4,5},
RSPI ch{1,2} and RSCI ch{1,2,3} need to control the clone channel for
proper operation. As per the RZ/G3L hardware manual, the clone channel
setting is to be done before the mux setting.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260430093422.74812-8-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agopinctrl: renesas: rzg2l: Simplify rzg2l_pinctrl_set_mux()
Biju Das [Thu, 30 Apr 2026 09:34:11 +0000 (10:34 +0100)] 
pinctrl: renesas: rzg2l: Simplify rzg2l_pinctrl_set_mux()

The port and function selectors are evaluated multiple times
in rzg2l_pinctrl_set_mux(). Simplify the function by dropping
dupicate evaluation storing them in local variables.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260430093422.74812-7-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agopinctrl: renesas: rzg2l: Add support for RZ/G3L SoC
Biju Das [Thu, 30 Apr 2026 09:34:10 +0000 (10:34 +0100)] 
pinctrl: renesas: rzg2l: Add support for RZ/G3L SoC

Add pinctrl driver support for RZ/G3L SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260430093422.74812-6-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agopinctrl: renesas: rzg2l: Update OEN pin validation to use exact match
Biju Das [Thu, 30 Apr 2026 09:34:09 +0000 (10:34 +0100)] 
pinctrl: renesas: rzg2l: Update OEN pin validation to use exact match

The RZ/G2L SoC uses pin 0 from a port for OEN while RZ/G3L uses pin 1. The
existing greater-than comparison against oen_max_pin in
rzg2l_pin_to_oen_bit() would incorrectly accept any pin below that value
rather than enforcing the single valid OEN pin for each SoC. Replace the
range check with an exact equality test so that only the designated OEN
pin is accepted.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260430093422.74812-5-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agopinctrl: renesas: rzg2l: Add support for selecting power source for {WDT,AWO,ISO}
Biju Das [Thu, 30 Apr 2026 09:34:08 +0000 (10:34 +0100)] 
pinctrl: renesas: rzg2l: Add support for selecting power source for {WDT,AWO,ISO}

The RZ/G3L SoC has support for setting power source that are not
controlled by the following voltage control registers:
  - SD_CH{0,1,2}_POC, XSPI_POC, ETH{0,1}_POC, I3C_SET.POC

Add support for selecting voltages using OTHER_POC register for
setting I/O domain voltage for WDT, ISO and AWO by extending
rzg2l_caps_to_pwr_reg() with a mask output parameter so that callers
callers can identify which bit(s) within OTHER_POC correspond to the
requested domain. Update rzg2l_get_power_source() to extract the
relevant bit field via field_get() when reading OTHER_POC, and update
rzg2l_set_power_source() to perform a read-modify-write under the
spinlock when writing to OTHER_POC, since multiple domains share the
same register.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260430093422.74812-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agopinctrl: renesas: rzg2l: Make QSPI register handling conditional
Biju Das [Thu, 30 Apr 2026 09:34:07 +0000 (10:34 +0100)] 
pinctrl: renesas: rzg2l: Make QSPI register handling conditional

The QSPI register at offset 0x3008 is not present on all SoCs supported by
the RZ/G2L pinctrl driver. Unconditionally reading and writing this
register during suspend/resume on hardware that lacks it can cause
undefined behaviour.

Add a qspi field to rzg2l_register_offsets to allow per-SoC declaration of
the QSPI register offset, and guard the suspend/resume accesses with a
check on that field. Populate the offset only for the RZ/{G2L,G2LC,G2UL,
Five} hardware configuration, which is where the register is known to
exist.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260430093422.74812-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agoMerge tag 'renesas-r9a08g046-dt-binding-defs-tag2' into renesas-pinctrl-for-v7.2
Geert Uytterhoeven [Mon, 11 May 2026 09:06:50 +0000 (11:06 +0200)] 
Merge tag 'renesas-r9a08g046-dt-binding-defs-tag2' into renesas-pinctrl-for-v7.2

Renesas RZ/G3L DT Pin Control Binding Definitions

Pin Control DT bindings and binding definitions for the Renesas RZ/G3L
(R9A08G046) SoC, shared by driver and DT source files.

8 weeks agodt-bindings: pinctrl: renesas: Document RZ/G3L SoC
Biju Das [Thu, 30 Apr 2026 09:34:06 +0000 (10:34 +0100)] 
dt-bindings: pinctrl: renesas: Document RZ/G3L SoC

Add documentation for the pin controller found on the Renesas RZ/G3L
(R9A08G046) SoC. The RZ/G3L PFC is similar to the RZ/G3S SoC but has
more pins.

Also add header file similar to RZ/G3E and RZ/V2H as it has alpha
numeric ports.

Document renesas,clonech property for controlling clone channel
control register located on SYSC IP block on RZ/G3L SoC.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260430093422.74812-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agodt-bindings: pinctrl: renesas,rzg2l-pinctrl: Document reset-names
Biju Das [Tue, 17 Mar 2026 10:16:14 +0000 (10:16 +0000)] 
dt-bindings: pinctrl: renesas,rzg2l-pinctrl: Document reset-names

All SoCs have multiple resets.  Document the reset-names property.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260317101627.174491-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agodrm/dp: Use drm_printf_indent for DP SDP logging
Ankit Nautiyal [Tue, 28 Apr 2026 07:44:57 +0000 (13:14 +0530)] 
drm/dp: Use drm_printf_indent for DP SDP logging

Currently the DP SDP log helpers use spaces for indentation. Switch to
tabs for indentation and use drm_printf_indent to keep the format
strings readable.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260428074457.3566918-10-ankit.k.nautiyal@intel.com
8 weeks agodrm/dp: Add target_rr_divider field in AS SDP logging
Ankit Nautiyal [Tue, 28 Apr 2026 07:44:56 +0000 (13:14 +0530)] 
drm/dp: Add target_rr_divider field in AS SDP logging

The field target_rr_divider is missing from the AS SDP logging.
Add it and print the divider value (1.001 or 1.000) as per the DP 2.1 spec.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260428074457.3566918-9-ankit.k.nautiyal@intel.com
8 weeks agodrm/dp: Add a helper to get the SDP type as a string
Ankit Nautiyal [Tue, 28 Apr 2026 07:44:55 +0000 (13:14 +0530)] 
drm/dp: Add a helper to get the SDP type as a string

Introduce dp_sdp_type_get_name() to get the SDP type as a string.
Use this to log the SDP type based on the sdp_type fields of the
VSC and AS SDPs instead of the hardcoded strings.

v2: Modify the SDP names to match the DisplayPort Spec. (Ville)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260428074457.3566918-8-ankit.k.nautiyal@intel.com
8 weeks agodrm/dp: Store coasting vtotal in struct drm_dp_as_sdp
Ankit Nautiyal [Tue, 28 Apr 2026 07:44:54 +0000 (13:14 +0530)] 
drm/dp: Store coasting vtotal in struct drm_dp_as_sdp

Add new field in struct drm_dp_as_sdp to store coasting vtotal.
This is used by the sinks that support Panel Replay and Asynchronous
timing during PR Active to derive refresh rate, when AS SDP transmission
is stopped by the source.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260428074457.3566918-7-ankit.k.nautiyal@intel.com
8 weeks agodrm/dp: Refactor AS SDP logging to use space-separated field names
Ankit Nautiyal [Tue, 28 Apr 2026 07:44:53 +0000 (13:14 +0530)] 
drm/dp: Refactor AS SDP logging to use space-separated field names

Replace underscores with spaces in AS SDP log field labels to be
consistent with the VSC SDP logging style.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260428074457.3566918-6-ankit.k.nautiyal@intel.com
8 weeks agodrm/dp: Add DPCD for configuring AS SDP for PR + VRR
Ankit Nautiyal [Tue, 28 Apr 2026 07:44:52 +0000 (13:14 +0530)] 
drm/dp: Add DPCD for configuring AS SDP for PR + VRR

Add additional DPCDs required to be configured to support VRR with Panel
Replay. These DPCDs are specifically required for configuring Adaptive Sync
SDP and are introduced in DP v2.1.

v2:
 - Correct the shift for the bits. (Ville)
 - Add DP_PR_ prefix for the PR-related fields.
v3:
 - Use macro values in their shifted form to match the convention. (Ville)
v4:
 - Add macro for the mask. (Ville)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260428074457.3566918-5-ankit.k.nautiyal@intel.com
8 weeks agodrm/dp: Add bits for AS SDP FAVT Payload Fields Parsing support
Ankit Nautiyal [Tue, 28 Apr 2026 07:44:51 +0000 (13:14 +0530)] 
drm/dp: Add bits for AS SDP FAVT Payload Fields Parsing support

DP v2.1 introduced support for sending AS SDP payload bytes for FAVT.
Add the relavant bits for the same.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260428074457.3566918-4-ankit.k.nautiyal@intel.com
8 weeks agodrm/dp: Clean up DPRX feature enumeration macros
Ankit Nautiyal [Tue, 28 Apr 2026 07:44:50 +0000 (13:14 +0530)] 
drm/dp: Clean up DPRX feature enumeration macros

Align the DP_DPRX feature enumeration macros for better readability and
consistency, and use the BIT() macro instead of open-coded shifts.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260428074457.3566918-3-ankit.k.nautiyal@intel.com
8 weeks agodrm/dp: Rename and relocate AS SDP payload field masks
Ankit Nautiyal [Tue, 28 Apr 2026 07:44:49 +0000 (13:14 +0530)] 
drm/dp: Rename and relocate AS SDP payload field masks

The AS SDP payload field masks were misnamed and placed under the DPRX
feature enumeration list. These are not DPRX capability bits, but are
payload field masks for the Adaptive Sync SDP.

Relocate both masks next to the AS SDP definitions.
Update users to the corrected names. No functional change.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260428074457.3566918-2-ankit.k.nautiyal@intel.com
8 weeks agocgroup/cpuset: Skip hardwall ancestor scan in cpuset v2 in cpuset_current_node_allowed()
Chen Wandun [Mon, 11 May 2026 08:18:38 +0000 (16:18 +0800)] 
cgroup/cpuset: Skip hardwall ancestor scan in cpuset v2 in cpuset_current_node_allowed()

Cgroup v2 doesn't have the concept of memory hardwall, only top_cpuset
has CS_MEM_EXCLUSIVE/CS_MEM_HARDWALL flags, nearest_hardwall_ancestor
always returns top_cpuset with all nodes set, so no need to acquire
callback_lock and scan up cpuset.

Suggested-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Chen Wandun <chenwandun@lixiang.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
8 weeks agoMerge branch 'for-7.1-fixes' into for-7.2
Tejun Heo [Mon, 11 May 2026 08:53:08 +0000 (22:53 -1000)] 
Merge branch 'for-7.1-fixes' into for-7.2

Pull to receive dde2f938d02f ("cgroup/cpuset: move PF_EXITING check
before __GFP_HARDWALL in cpuset_current_node_allowed()") as a
dependency for an upcoming patch in the same function.

Signed-off-by: Tejun Heo <tj@kernel.org>
8 weeks agosched_ext: Clear ops->priv on scx_alloc_and_add_sched() error paths
Andrea Righi [Mon, 11 May 2026 08:31:30 +0000 (10:31 +0200)] 
sched_ext: Clear ops->priv on scx_alloc_and_add_sched() error paths

scx_alloc_and_add_sched() can fail after @sch has been assigned to
ops->priv. In those cases @sch is torn down (either via kfree() through
the err_free_* chain or via kobject_put() -> scx_kobj_release() -> RCU
work), but @ops->priv is left pointing at the about-to-be-freed pointer.

With the recent -EBUSY gate in scx_root_enable_workfn() and
scx_sub_enable_workfn() that rejects an attach when @ops->priv is still
non-NULL, see commit bbf30b383cf6 ("sched_ext: Fix ops->priv clobber on
concurrent attach/detach"), a dangling @ops->priv permanently locks the
kdata out: every future attach attempt sees a stale binding and returns
-EBUSY even though no scheduler is actually attached.

Clear @ops->priv on the post-assign failure paths so that the kdata
returns to its pre-attach state when the function returns ERR_PTR().

Fixes: bbf30b383cf6 ("sched_ext: Fix ops->priv clobber on concurrent attach/detach")
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
8 weeks agoceph: put folios not suitable for writeback
Hristo Venev [Mon, 4 May 2026 15:54:45 +0000 (18:54 +0300)] 
ceph: put folios not suitable for writeback

The batch holds references to the folios (see `filemap_get_folios`,
`folio_batch_release`), so we need to `folio_put` the folios we remove.

Tested on v6.18.

Cc: stable@vger.kernel.org
Link: https://tracker.ceph.com/issues/74156
Signed-off-by: Hristo Venev <hristo@venev.name>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
8 weeks agoceph: add ceph_has_realms_with_quotas() check to ceph_quota_update_statfs()
Viacheslav Dubeyko [Thu, 9 Apr 2026 18:33:23 +0000 (11:33 -0700)] 
ceph: add ceph_has_realms_with_quotas() check to ceph_quota_update_statfs()

When MDS rejects a session, remove_session_caps() ->
__ceph_remove_cap() -> ceph_change_snap_realm() clears
i_snap_realm for every inode that loses its last cap.
The realm is restored once caps are re-granted after
reconnect. It is not a real error and this patch changes
pr_err_ratelimited_client() on doutc().

Every quota methods ceph_quota_is_max_files_exceeded(),
ceph_quota_is_max_bytes_exceeded(),
ceph_quota_is_max_bytes_approaching() calls
ceph_has_realms_with_quotas() check. This patch adds
the missing ceph_has_realms_with_quotas() call into
ceph_quota_update_statfs().

[ idryomov: add braces around both arms of multiline ifs ]

Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
8 weeks agolibceph: Fix potential out-of-bounds access in __ceph_x_decrypt()
Raphael Zimmer [Tue, 28 Apr 2026 12:15:46 +0000 (14:15 +0200)] 
libceph: Fix potential out-of-bounds access in __ceph_x_decrypt()

In __ceph_x_decrypt(), a part of the buffer p is interpreted as a
ceph_x_encrypt_header, and the magic field of this struct is accessed.
This happens without any guarantee that the buffer is large enough to
hold this struct. The function parameter ciphertext_len represents the
length of the ciphertext to decrypt and is guaranteed to be at most the
remaining size of the allocated buffer p. However, this value is not
necessarily greater than sizeof(ceph_x_encrypt_header). E.g., a message
frame of type FRAME_TAG_AUTH_REPLY_MORE, that is just as long to hold
the ciphertext at its end with a ciphertext_len of 8 or less, can
trigger an out-of-bounds memory access when accessing hdr->magic.

This patch fixes the issue by adding a check to ensure that the
decrypted plaintext in the buffer is large enough to represent at least
the ceph_x_encrypt_header.

Cc: stable@vger.kernel.org
Signed-off-by: Raphael Zimmer <raphael.zimmer@tu-ilmenau.de>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
8 weeks agoceph: fix BUG_ON in __ceph_build_xattrs_blob() due to stale blob size
Viacheslav Dubeyko [Thu, 9 Apr 2026 19:43:40 +0000 (12:43 -0700)] 
ceph: fix BUG_ON in __ceph_build_xattrs_blob() due to stale blob size

The generic/642 test-case can reproduce the kernel crash:

[40243.605254] ------------[ cut here ]------------
[40243.605956] kernel BUG at fs/ceph/xattr.c:918!
[40243.607142] Oops: invalid opcode: 0000 [#1] SMP PTI
[40243.608067] CPU: 7 UID: 0 PID: 498762 Comm: kworker/7:1 Not tainted 7.0.0-rc7+ #3 PREEMPT(full)
[40243.609700] Hardware name: QEMU Ubuntu 25.10 PC v2 (i440FX + PIIX, + 10.1 machine, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[40243.611820] Workqueue: ceph-msgr ceph_con_workfn
[40243.612715] RIP: 0010:__ceph_build_xattrs_blob+0x1b8/0x1e0
[40243.613731] Code: 0f 84 82 fe ff ff e9 cf 8e 56 ff 48 8d 65 e8 31 c0 5b 41 5c 41 5d 5d 31 d2 31 c9 31 f6 31 ff 45 31 c0 45 31 c9 c3 cc cc cc cc <0f> 0b 4c 8b 62 08 41 8b 85 24 07 00 00 49 83 c4 04 41 89 44 24 fc
[40243.616888] RSP: 0018:ffffcc80c4d4b688 EFLAGS: 00010287
[40243.617773] RAX: 0000000000010026 RBX: 0000000000000001 RCX: 0000000000000000
[40243.618928] RDX: ffff8a773798dee0 RSI: 0000000000000000 RDI: 0000000000000000
[40243.620158] RBP: ffffcc80c4d4b6a0 R08: 0000000000000000 R09: 0000000000000000
[40243.621573] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8a75f3b58000
[40243.622907] R13: ffff8a75f3b58000 R14: 0000000000000080 R15: 000000000000bffd
[40243.624054] FS:  0000000000000000(0000) GS:ffff8a787d1b4000(0000) knlGS:0000000000000000
[40243.625331] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[40243.626269] CR2: 000072f390b623c0 CR3: 000000011c02a003 CR4: 0000000000372ef0
[40243.627408] Call Trace:
[40243.627839]  <TASK>
[40243.628188]  __prep_cap+0x3fd/0x4a0
[40243.628789]  ? do_raw_spin_unlock+0x4e/0xe0
[40243.629474]  ceph_check_caps+0x46a/0xc80
[40243.630094]  ? __lock_acquire+0x4a2/0x2650
[40243.630773]  ? find_held_lock+0x31/0x90
[40243.631347]  ? handle_cap_grant+0x79f/0x1060
[40243.632068]  ? lock_release+0xd9/0x300
[40243.632696]  ? __mutex_unlock_slowpath+0x3e/0x340
[40243.633429]  ? lock_release+0xd9/0x300
[40243.634052]  handle_cap_grant+0xcf6/0x1060
[40243.634745]  ceph_handle_caps+0x122b/0x2110
[40243.635415]  mds_dispatch+0x5bd/0x2160
[40243.636034]  ? ceph_con_process_message+0x65/0x190
[40243.636828]  ? lock_release+0xd9/0x300
[40243.637431]  ceph_con_process_message+0x7a/0x190
[40243.638184]  ? kfree+0x311/0x4f0
[40243.638749]  ? kfree+0x311/0x4f0
[40243.639268]  process_message+0x16/0x1a0
[40243.639915]  ? sg_free_table+0x39/0x90
[40243.640572]  ceph_con_v2_try_read+0xf58/0x2120
[40243.641255]  ? lock_acquire+0xc8/0x300
[40243.641863]  ceph_con_workfn+0x151/0x820
[40243.642493]  process_one_work+0x22f/0x630
[40243.643093]  ? process_one_work+0x254/0x630
[40243.643770]  worker_thread+0x1e2/0x400
[40243.644332]  ? __pfx_worker_thread+0x10/0x10
[40243.645020]  kthread+0x109/0x140
[40243.645560]  ? __pfx_kthread+0x10/0x10
[40243.646125]  ret_from_fork+0x3f8/0x480
[40243.646752]  ? __pfx_kthread+0x10/0x10
[40243.647316]  ? __pfx_kthread+0x10/0x10
[40243.647919]  ret_from_fork_asm+0x1a/0x30
[40243.648556]  </TASK>
[40243.648902] Modules linked in: overlay hctr2 libpolyval chacha libchacha adiantum libnh libpoly1305 essiv intel_rapl_msr intel_rapl_common intel_uncore_frequency_common skx_edac_common nfit kvm_intel kvm irqbypass joydev ghash_clmulni_intel aesni_intel rapl input_leds mac_hid psmouse vga16fb serio_raw vgastate floppy i2c_piix4 pata_acpi bochs qemu_fw_cfg i2c_smbus sch_fq_codel rbd dm_crypt msr parport_pc ppdev lp parport efi_pstore
[40243.654766] ---[ end trace 0000000000000000 ]---

Commit d93231a6bc8a ("ceph: prevent a client from exceeding the MDS
maximum xattr size") moved the required_blob_size computation to before
the __build_xattrs() call, introducing a race.

__build_xattrs() releases and reacquires i_ceph_lock during execution.
In that window, handle_cap_grant() may update i_xattrs.blob with a
newer MDS-provided blob and bump i_xattrs.version.  When
__build_xattrs() detects that index_version < version, it destroys and
rebuilds the entire xattr rb-tree from the new blob, potentially
increasing count, names_size, and vals_size.

The prealloc_blob size check that follows still uses the stale
required_blob_size computed before the rebuild, so it passes even when
prealloc_blob is too small for the now-larger tree. After __set_xattr()
adds one more xattr on top, __ceph_build_xattrs_blob() is called from
the cap flush path and hits:

    BUG_ON(need > ci->i_xattrs.prealloc_blob->alloc_len);

Fix this by recomputing required_blob_size after __build_xattrs()
returns, using the current tree state. Also re-validate against
m_max_xattr_size to fall back to the sync path if the rebuilt tree now
exceeds the MDS limit.

Cc: stable@vger.kernel.org
Fixes: d93231a6bc8a ("ceph: prevent a client from exceeding the MDS maximum xattr size")
Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
8 weeks agoceph: fix a buffer leak in __ceph_setxattr()
Viacheslav Dubeyko [Thu, 9 Apr 2026 19:26:02 +0000 (12:26 -0700)] 
ceph: fix a buffer leak in __ceph_setxattr()

The old_blob in __ceph_setxattr() can store
ci->i_xattrs.prealloc_blob value during the retry.
However, it is never called the ceph_buffer_put()
for the old_blob object. This patch fixes the issue of
the buffer leak.

Cc: stable@vger.kernel.org
Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
8 weeks agolibceph: Fix unnecessarily high ceph_decode_need() for uniform bucket
Raphael Zimmer [Fri, 24 Apr 2026 13:37:37 +0000 (15:37 +0200)] 
libceph: Fix unnecessarily high ceph_decode_need() for uniform bucket

In crush_decode_uniform_bucket(), the item_weight field of the bucket
is set. This is a single field of type u32 since the uniform bucket uses
the same weight for all items. The value in ceph_decode_need() is set to
(1+b->h.size) * sizeof(u32), which is higher than actually needed.

This patch removes the call to ceph_decode_need() with the unnecessarily
high value and switches the subsequent operation from ceph_decode_32()
to ceph_decode_32_safe(), which already includes the correct bounds
check.

Signed-off-by: Raphael Zimmer <raphael.zimmer@tu-ilmenau.de>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
8 weeks agolibceph: Fix potential out-of-bounds access in crush_decode()
Raphael Zimmer [Wed, 22 Apr 2026 08:47:13 +0000 (10:47 +0200)] 
libceph: Fix potential out-of-bounds access in crush_decode()

A message of type CEPH_MSG_OSD_MAP containing a crush map with at least
one bucket has two fields holding the bucket algorithm. If the values
in these two fields differ, an out-of-bounds access can occur. This is
the case because the first algorithm field (alg) is used to allocate
the correct amount of memory for a bucket of this type, while the second
algorithm field inside the bucket (b->alg) is used in the subsequent
processing.

This patch fixes the issue by adding a check that compares alg and
b->alg and aborts the processing in case they differ. Furthermore,
b->alg is set to 0 in this case, because the destruction of the crush
map also uses this field to determine the bucket type, which can again
result in an out-of-bounds access when trying to free the memory pointed
to by the fields of the bucket. To correctly free the memory allocated
for the bucket in such a case, the corresponding call to kfree is moved
from the algorithm-specific crush_destroy_bucket functions to the
generic crush_destroy_bucket().

Cc: stable@vger.kernel.org
Signed-off-by: Raphael Zimmer <raphael.zimmer@tu-ilmenau.de>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
8 weeks agostaging: rtl8723bs: fix type issue in DYNAMIC_BB_DYNAMIC_TXPWR
Michael Steinmötzger [Mon, 11 May 2026 04:40:29 +0000 (06:40 +0200)] 
staging: rtl8723bs: fix type issue in DYNAMIC_BB_DYNAMIC_TXPWR

Add explicit cast to fix -Werror=overflow warning for BIT(2) usage
in DYNAMIC_BB_DYNAMIC_TXPWR

Suggested-by: Nikolay Kulikov <nikolayof23@gmail.com>
Signed-off-by: Michael Steinmötzger <m.steinmoetzger@gmail.com>
Link: https://patch.msgid.link/20260511044029.14839-1-m.steinmoetzger@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agoxfrm: ipcomp: Free destination pages on acomp errors
Herbert Xu [Wed, 6 May 2026 13:23:28 +0000 (21:23 +0800)] 
xfrm: ipcomp: Free destination pages on acomp errors

Move the out_free_req label up by a couple of lines so that the
allocated dst SG list gets freed on error as well as success.

Fixes: eb2953d26971 ("xfrm: ipcomp: Use crypto_acomp interface")
Cc: stable@kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Reported-by: Yilin Zhu <zylzyl2333@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
8 weeks agoselftests/cgroup: fix misleading debug message in test_cgfreezer_time_child
Tao Cui [Mon, 11 May 2026 06:25:20 +0000 (14:25 +0800)] 
selftests/cgroup: fix misleading debug message in test_cgfreezer_time_child

The debug message says "Expect ctime <= ptime" when the test actually
expects ctime > ptime (child's freeze time should exceed parent's,
which is zero). Fix the message to match the actual expectation.

Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
8 weeks agoselftests/cgroup: fix child process escaping to parent cleanup in test_cpucg_nice
Tao Cui [Mon, 11 May 2026 06:15:08 +0000 (14:15 +0800)] 
selftests/cgroup: fix child process escaping to parent cleanup in test_cpucg_nice

In test_cpucg_nice, the forked child process incorrectly jumps to the
parent's cleanup label on cg_write failure. This causes the child to
attempt cg_destroy on cgroups the parent is still using, and then
return to main() to continue executing tests as if it were the parent.

Replace goto cleanup with exit(EXIT_FAILURE) in the child process.

Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
8 weeks agoselftests/cgroup: Add NULL check after malloc in cgroup_util.c
Hongfu Li [Mon, 11 May 2026 06:08:53 +0000 (14:08 +0800)] 
selftests/cgroup: Add NULL check after malloc in cgroup_util.c

Add NULL checks after malloc() in three helper functions to prevent
NULL pointer dereference on memory allocation failure.
- cg_name()
- cg_name_indexed()
- cg_control()

These functions allocate memory with malloc() but previously called
snprintf() unconditionally, which would trigger undefined behavior
if allocation fails.

Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
8 weeks agostaging: rtl8723bs: replace non-standard BITn macros with BIT(n)
Michael Steinmötzger [Sat, 9 May 2026 03:22:02 +0000 (05:22 +0200)] 
staging: rtl8723bs: replace non-standard BITn macros with BIT(n)

Remove the local BIT0-BIT31 macro definitions from osdep_service.h
and replace all usages with the kernel's BIT(n) macro from <linux/bitops.h>.

NOTE: DYNAMIC_BB_DYNAMIC_TXPWR is defined as BIT2 and used
in a bitwise NOT expression. Migrating to BIT(2) causes an
-Werror=overflow warning due to the unsigned long result not
fitting in u32. This instance has been left unconverted.

Compile-tested only.

Signed-off-by: Michael Steinmötzger <m.steinmoetzger@gmail.com>
Link: https://patch.msgid.link/20260509032202.146240-1-m.steinmoetzger@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agoiommu/vt-d: Avoid NULL pointer dereference or refcount corruption
Zhenzhong Duan [Sat, 9 May 2026 02:43:46 +0000 (10:43 +0800)] 
iommu/vt-d: Avoid NULL pointer dereference or refcount corruption

Commit 60f030f7418d ("iommu/vt-d: Avoid use of NULL after WARN_ON_ONCE")
fixed a NULL pointer dereference in an unlikely situation partly.

If dev_pasid is not found in the dev_pasids list, it remains NULL.
However, the teardown operations are executed unconditionally, this lead
to a NULL pointer dereference or refcount corruption.

If the domain was never attached to this IOMMU, info will be NULL, which
would cause an immediate dereference when checking --info->refcnt.

Even if info is not NULL, decrementing the refcount without having removed
a valid PASID might unbalance the count. This could lead to premature
dropping of the refcount to 0, potentially causing a use-after-free for the
remaining active devices sharing the domain.

Fix it by returning early if dev_pasid is NULL, before executing the
teardown operations.

Issue found by AI review and suggested by Kevin Tian.
https://sashiko.dev/#/patchset/20260421031347.1408890-1-zhenzhong.duan%40intel.com

Fixes: 60f030f7418d ("iommu/vt-d: Avoid use of NULL after WARN_ON_ONCE")
Cc: stable@vger.kernel.org
Suggested-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20260422033538.95000-1-zhenzhong.duan@intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu/vt-d: Fix oops due to out of scope access
Zhenzhong Duan [Sat, 9 May 2026 02:43:45 +0000 (10:43 +0800)] 
iommu/vt-d: Fix oops due to out of scope access

Below oops triggers when kill QEMU process:

  Oops: general protection fault, probably for non-canonical address 0x7fffffff844eaaa7: 0000 [#1] SMP NOPTI
  Call Trace:
   <TASK>
   do_raw_spin_lock+0xaa/0xc0
   _raw_spin_lock_irqsave+0x21/0x40
   domain_remove_dev_pasid+0x52/0x160
   intel_nested_set_dev_pasid+0x1b9/0x1e0
   __iommu_set_group_pasid+0x56/0x120
   pci_dev_reset_iommu_done+0xe3/0x180
   pcie_flr+0x65/0x160
   __pci_reset_function_locked+0x5b/0x120
   vfio_pci_core_close_device+0x63/0xe0 [vfio_pci_core]
   vfio_df_close+0x4f/0xa0
   vfio_df_unbind_iommufd+0x2d/0x60
   vfio_device_fops_release+0x3e/0x40
   __fput+0xe5/0x2c0
   task_work_run+0x58/0xa0
   do_exit+0x2c8/0x600
   do_group_exit+0x2f/0xa0
   get_signal+0x863/0x8c0
   arch_do_signal_or_restart+0x24/0x100
   exit_to_user_mode_loop+0x87/0x380
   do_syscall_64+0x2ff/0x11e0
   entry_SYSCALL_64_after_hwframe+0x76/0x7e

The global static blocked domain is a dummy domain without corresponding
dmar_domain structure, accessing beyond iommu_domain structure triggers
oops easily. Fix it by return early in domain_remove_dev_pasid() like
identity domain.

Fixes: 7d0c9da6c150 ("iommu/vt-d: Add set_dev_pasid callback for dma domain")
Cc: stable@vger.kernel.org
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20260421031347.1408890-1-zhenzhong.duan@intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu/vt-d: Disable DMAR for Intel Q35 IGFX
Naval Alcalá [Sat, 9 May 2026 02:43:44 +0000 (10:43 +0800)] 
iommu/vt-d: Disable DMAR for Intel Q35 IGFX

Intel Q35 integrated graphics (8086:29b2) exhibits broken DMAR
behaviour similar to other G4x/GM45 devices for which DMAR is
already disabled via quirks.

When DMAR is enabled, the system may hard lock up during boot or
early device initialization, requiring a reset.

Add the missing PCI ID to the existing quirk list to disable
DMAR for this device.

Fixes: 1f76249cc3be ("iommu/vt-d: Declare Broadwell igfx dmar support snafu")
Cc: stable@vger.kernel.org
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=201185
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=216064
Signed-off-by: Naval Alcalá <ari@naval.cat>
Link: https://lore.kernel.org/r/20260410161622.13549-1-ari@naval.cat
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agocgroup/cpuset: Reset DL migration state on can_attach() failure
Guopeng Zhang [Sat, 9 May 2026 10:20:30 +0000 (18:20 +0800)] 
cgroup/cpuset: Reset DL migration state on can_attach() failure

cpuset_can_attach() accumulates temporary SCHED_DEADLINE migration
state in the destination cpuset while walking the taskset.

If a later task_can_attach() or security_task_setscheduler() check
fails, cgroup_migrate_execute() treats cpuset as the failing subsystem
and does not call cpuset_cancel_attach() for it. The partially
accumulated state is then left behind and can be consumed by a later
attach, corrupting cpuset DL task accounting and pending DL bandwidth
accounting.

Reset the pending DL migration state from the common error exit when
ret is non-zero. Successful can_attach() keeps the state for
cpuset_attach() or cpuset_cancel_attach().

Fixes: 2ef269ef1ac0 ("cgroup/cpuset: Free DL BW in case can_attach() fails")
Cc: stable@vger.kernel.org # v6.10+
Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Chen Ridong <chenridong@huaweicloud.com>
Reviewed-by: Waiman Long <longman@redhat.com>
8 weeks agostaging: rtl8723bs: simplify if-else blocks in rtw_mlme_ext.c
Andrei Khomenkov [Sun, 10 May 2026 13:43:15 +0000 (16:43 +0300)] 
staging: rtl8723bs: simplify if-else blocks in rtw_mlme_ext.c

Fix indentation, remove unnecessary braces, and wrap long lines
in if-else blocks inside the site_survey function.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Link: https://patch.msgid.link/20260510134315.64295-10-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove commented out code in rtw_mlme_ext.c
Andrei Khomenkov [Sun, 10 May 2026 13:43:14 +0000 (16:43 +0300)] 
staging: rtl8723bs: remove commented out code in rtw_mlme_ext.c

Remove commented out code in the site_survey function as it is not used.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Link: https://patch.msgid.link/20260510134315.64295-9-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove unused RTW_MLME_EXT_C_ code
Andrei Khomenkov [Sun, 10 May 2026 13:43:13 +0000 (16:43 +0300)] 
staging: rtl8723bs: remove unused RTW_MLME_EXT_C_ code

Remove the RTW_MLME_EXT_C_ code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Link: https://patch.msgid.link/20260510134315.64295-8-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove unused RTW_DVOBJ_CHIP_HW_TYPE code
Andrei Khomenkov [Sun, 10 May 2026 13:43:12 +0000 (16:43 +0300)] 
staging: rtl8723bs: remove unused RTW_DVOBJ_CHIP_HW_TYPE code

Remove the RTW_DVOBJ_CHIP_HW_TYPE code since it is not used as the
macro is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Link: https://patch.msgid.link/20260510134315.64295-7-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove unused REMOVE_PACK code
Andrei Khomenkov [Sun, 10 May 2026 13:43:11 +0000 (16:43 +0300)] 
staging: rtl8723bs: remove unused REMOVE_PACK code

Remove the REMOVE_PACK code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Link: https://patch.msgid.link/20260510134315.64295-6-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove unused DBG_CH_SWITCH code
Andrei Khomenkov [Sun, 10 May 2026 13:43:10 +0000 (16:43 +0300)] 
staging: rtl8723bs: remove unused DBG_CH_SWITCH code

Remove the DBG_CH_SWITCH code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Link: https://patch.msgid.link/20260510134315.64295-5-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove unused CONSISTENT_PN_ORDER code
Andrei Khomenkov [Sun, 10 May 2026 13:43:09 +0000 (16:43 +0300)] 
staging: rtl8723bs: remove unused CONSISTENT_PN_ORDER code

Remove the CONSISTENT_PN_ORDER code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Link: https://patch.msgid.link/20260510134315.64295-4-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove unused DBG_RX_DUMP_EAP code
Andrei Khomenkov [Sun, 10 May 2026 13:43:08 +0000 (16:43 +0300)] 
staging: rtl8723bs: remove unused DBG_RX_DUMP_EAP code

Remove the DBG_RX_DUMP_EAP code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Link: https://patch.msgid.link/20260510134315.64295-3-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove unused DBG_FIXED_CHAN code
Andrei Khomenkov [Sun, 10 May 2026 13:43:07 +0000 (16:43 +0300)] 
staging: rtl8723bs: remove unused DBG_FIXED_CHAN code

Remove the DBG_FIXED_CHAN code since it is not used as the macro
is not defined anywhere.

Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
Link: https://patch.msgid.link/20260510134315.64295-2-khomenkov@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agoiommu: Warn on premature unblock during DMA aliased sibling reset
Nicolin Chen [Sat, 25 Apr 2026 01:15:27 +0000 (18:15 -0700)] 
iommu: Warn on premature unblock during DMA aliased sibling reset

When two aliased siblings are in the same iommu_group, they might share the
same RID. The reset functions don't support this case, though it is unclear
whether there is a real case of having an ATS capable device on a PCI/PCI-X
bus.

Theoretically, however, if two aliased devices are resetting concurrently,
one might be unblocked prematurely in the middle of the reset by the other
sibling who completes the reset first.

This isn't a regression from this series but it's better to spit a warning,
so we can know if such use case is common enough for us to make subsequent
patches for its coverage.

Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu: Fix WARN_ON in __iommu_group_set_domain_nofail() due to reset
Nicolin Chen [Sat, 25 Apr 2026 01:15:26 +0000 (18:15 -0700)] 
iommu: Fix WARN_ON in __iommu_group_set_domain_nofail() due to reset

In __iommu_group_set_domain_internal(), concurrent domain attachments are
rejected when any device in the group is recovering. This is necessary to
fence concurrent attachments to a multi-device group where devices might
share the same RID due to PCI DMA alias quirks, but triggers the WARN_ON in
__iommu_group_set_domain_nofail().

Other IOMMU_SET_DOMAIN_MUST_SUCCEED callers in detach/teardown paths, such
as __iommu_group_set_core_domain and __iommu_release_dma_ownership, should
not be rejected, as the domain would be freed anyway in these nofail paths
while group->domain is still pointing to it. So pci_dev_reset_iommu_done()
could trigger a UAF when re-attaching group->domain.

Honor the IOMMU_SET_DOMAIN_MUST_SUCCEED flag, allowing the callers through
the group->recovery_cnt fence, so as to update the group->domain pointer.
Instead add a gdev->blocked check in the device iteration loop, to prevent
any concurrent per-device detachment.

Fixes: c279e83953d9 ("iommu: Introduce pci_dev_reset_iommu_prepare/done()")
Cc: stable@vger.kernel.org
Closes: https://sashiko.dev/#/patchset/20260407194644.171304-1-nicolinc%40nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu: Fix ATS invalidation timeouts during __iommu_remove_group_pasid()
Nicolin Chen [Sat, 25 Apr 2026 01:15:25 +0000 (18:15 -0700)] 
iommu: Fix ATS invalidation timeouts during __iommu_remove_group_pasid()

If a device is blocked, its PASID domains are already detached. Repeating
iommu_remove_dev_pasid() is unnecessary and might trigger ATS invalidation
timeouts.

Skip the iommu_remove_dev_pasid() call upon gdev->blocked.

Fixes: c279e83953d9 ("iommu: Introduce pci_dev_reset_iommu_prepare/done()")
Cc: stable@vger.kernel.org
Closes: https://sashiko.dev/#/patchset/20260407194644.171304-1-nicolinc%40nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu: Fix nested pci_dev_reset_iommu_prepare/done()
Nicolin Chen [Sat, 25 Apr 2026 01:15:24 +0000 (18:15 -0700)] 
iommu: Fix nested pci_dev_reset_iommu_prepare/done()

Shuai found that cxl_reset_bus_function() calls pci_reset_bus_function()
internally while both are calling pci_dev_reset_iommu_prepare/done().

As pci_dev_reset_iommu_prepare() doesn't support re-entry, the inner call
will trigger a WARN_ON and return -EBUSY, resulting in failing the entire
device reset.

On the other hand, removing the outer calls in the PCI callers is unsafe.
As pointed out by Kevin, device-specific quirks like reset_hinic_vf_dev()
execute custom firmware waits after their inner pcie_flr() completes. If
the IOMMU protection relies solely on the inner reset, the IOMMU will be
unblocked prematurely while the device is still resetting.

Instead, fix this by making pci_dev_reset_iommu_prepare/done() reentrant.

Introduce gdev->reset_depth to handle the re-entries on the same device.

Fixes: c279e83953d9 ("iommu: Introduce pci_dev_reset_iommu_prepare/done()")
Cc: stable@vger.kernel.org
Reported-by: Shuai Xue <xueshuai@linux.alibaba.com>
Closes: https://lore.kernel.org/all/absKsk7qQOwzhpzv@Asurada-Nvidia/
Suggested-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu: Fix pasid attach in pci_dev_reset_iommu_prepare/done()
Nicolin Chen [Sat, 25 Apr 2026 01:15:23 +0000 (18:15 -0700)] 
iommu: Fix pasid attach in pci_dev_reset_iommu_prepare/done()

Now the helpers handle per-gdev resets. Replace __iommu_set_group_pasid()
with set_dev_pasid() accordingly, in the pci_dev_reset_iommu_done().

Also add max_pasids check as other callers.

Fixes: c279e83953d9 ("iommu: Introduce pci_dev_reset_iommu_prepare/done()")
Cc: stable@vger.kernel.org
Reported-by: Shuai Xue <xueshuai@linux.alibaba.com>
Closes: https://lore.kernel.org/all/ad858513-09fc-455e-bbc5-fe38a225cc78@linux.alibaba.com/
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu: Replace per-group resetting_domain with per-gdev blocked flag
Nicolin Chen [Sat, 25 Apr 2026 01:15:22 +0000 (18:15 -0700)] 
iommu: Replace per-group resetting_domain with per-gdev blocked flag

The core tracks device resetting states with a per-group resetting_domain,
while a reset is actually per group-device. Such a mismatch might lead to
confusion and even difficulty to untangle per-gdev handling requirement.

Shuai found that cxl_reset_bus_function() calls pci_reset_bus_function()
internally while both are calling pci_dev_reset_iommu_prepare/done(). And
the solution requires the core to track at the group_device level as well.

Introduce a 'blocked' flag to struct group_device, to allow a multi-device
group to isolate concurrent device resets independently.

As the reset routine is per gdev, it cannot clear group->resetting_domain
without iterating over the device list to ensure no other device is being
reset. Simplify it by replacing the resetting_domain with a 'recovery_cnt'
in the struct iommu_group.

No functional change. But this is essential to apply following bug fixes.

Fixes: c279e83953d9 ("iommu: Introduce pci_dev_reset_iommu_prepare/done()")
Cc: stable@vger.kernel.org
Reported-by: Shuai Xue <xueshuai@linux.alibaba.com>
Closes: https://lore.kernel.org/all/absKsk7qQOwzhpzv@Asurada-Nvidia/
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu: Fix kdocs of pci_dev_reset_iommu_done()
Nicolin Chen [Sat, 25 Apr 2026 01:15:21 +0000 (18:15 -0700)] 
iommu: Fix kdocs of pci_dev_reset_iommu_done()

Remove the duplicated word. No functional change.

Fixes: c279e83953d9 ("iommu: Introduce pci_dev_reset_iommu_prepare/done()")
Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu: Fix NULL group->domain dereference in pci_dev_reset_iommu_done()
Nicolin Chen [Sat, 25 Apr 2026 01:15:20 +0000 (18:15 -0700)] 
iommu: Fix NULL group->domain dereference in pci_dev_reset_iommu_done()

Local sashiko review pointed it out that group->domain could be NULL when
a default domain fails to allocate during the first probe, which can crash
at domain->ops->attach_dev dereference in __iommu_attach_device() invoked
by pci_dev_reset_iommu_done().

pci_dev_reset_iommu_prepare() is fine as an old_domain pointer can be NULL.

Skip the re-attach in pci_dev_reset_iommu_done() to fix the bug.

Fixes: c279e83953d9 ("iommu: Introduce pci_dev_reset_iommu_prepare/done()")
Cc: stable@vger.kernel.org
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agostaging: rtl8723bs: Fix block comment style in ieee80211.h
Pramod Maurya [Sun, 10 May 2026 17:52:06 +0000 (13:52 -0400)] 
staging: rtl8723bs: Fix block comment style in ieee80211.h

Move trailing '*/' to a new line in multi-line block comments, add
proper ' * ' prefix to comment continuation lines, and consolidate
the OUI_MICROSOFT multi-line comment into a single line.

Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com>
Link: https://patch.msgid.link/20260510175207.563378-4-pramod.nexgen@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: Replace __attribute__((packed)) with __packed in ieee80211.h
Pramod Maurya [Sun, 10 May 2026 17:52:04 +0000 (13:52 -0400)] 
staging: rtl8723bs: Replace __attribute__((packed)) with __packed in ieee80211.h

Replace the verbose __attribute__ ((packed)) with the preferred
kernel shorthand __packed in struct eapol and struct ieee80211_snap_hdr.

Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com>
Link: https://patch.msgid.link/20260510175207.563378-2-pramod.nexgen@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: Remove multiple blank lines in include headers
Pramod Maurya [Sun, 10 May 2026 17:51:02 +0000 (13:51 -0400)] 
staging: rtl8723bs: Remove multiple blank lines in include headers

Remove superfluous consecutive blank lines from rtl8723bs include
header files as flagged by checkpatch.pl.

Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com>
Link: https://patch.msgid.link/20260510175103.562518-2-pramod.nexgen@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agoclk: renesas: r9a08g046: Add RSPI clocks and resets
Biju Das [Tue, 5 May 2026 07:15:39 +0000 (08:15 +0100)] 
clk: renesas: r9a08g046: Add RSPI clocks and resets

Add clock and reset definitions for the three RSPI (Serial Peripheral
Interface) channels on the RZ/G3L (R9A08G046) SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260505071544.8965-4-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agoclk: renesas: r9a08g046: Add SSIF-2 clocks and resets
Biju Das [Tue, 5 May 2026 07:15:38 +0000 (08:15 +0100)] 
clk: renesas: r9a08g046: Add SSIF-2 clocks and resets

Add SSIF-2 clock and reset entries on the RZ/G3L SoC.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260505071544.8965-3-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agoclk: renesas: r9a08g046: Add RSCI clocks and resets
Biju Das [Tue, 5 May 2026 07:15:37 +0000 (08:15 +0100)] 
clk: renesas: r9a08g046: Add RSCI clocks and resets

Add clock and reset entries for the Serial Communications Interfaces
(RSCI) found on the RZ/G3L SoC.  This includes various dividers and mux
clocks needed for the four RSCI channels.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260505071544.8965-2-biju.das.jz@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 weeks agostaging: rtl8723bs: Replace __attribute__((__packed__)) with __packed in rtl8723b_hal.h
Pramod Maurya [Sun, 10 May 2026 11:03:34 +0000 (07:03 -0400)] 
staging: rtl8723bs: Replace __attribute__((__packed__)) with __packed in rtl8723b_hal.h

Replace __attribute__((__packed__)) with the preferred __packed macro
to fix a checkpatch.pl warning.

Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com>
Link: https://patch.msgid.link/20260510110338.98540-1-pramod.nexgen@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: Replace __attribute__((packed)) with __packed in wifi.h
Pramod Maurya [Sun, 10 May 2026 10:36:26 +0000 (06:36 -0400)] 
staging: rtl8723bs: Replace __attribute__((packed)) with __packed in wifi.h

Replace all occurrences of __attribute__((packed)) with the preferred
__packed macro in wifi.h to fix checkpatch.pl warnings.

Signed-off-by: Pramod Maurya <pramod.nexgen@gmail.com>
Link: https://patch.msgid.link/20260510103630.80917-1-pramod.nexgen@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agoiommu/amd: Bounds-check devid in __rlookup_amd_iommu()
Jose Fernandez (Anthropic) [Tue, 21 Apr 2026 19:26:13 +0000 (19:26 +0000)] 
iommu/amd: Bounds-check devid in __rlookup_amd_iommu()

iommu_device_register() walks every device on the PCI bus via
bus_for_each_dev() and calls amd_iommu_probe_device() for each. The
inlined check_device() path computes the device's sbdf, calls
rlookup_amd_iommu() to find the owning IOMMU, and only afterwards
verifies devid <= pci_seg->last_bdf. __rlookup_amd_iommu() indexes
rlookup_table[devid] with no bounds check of its own, so for a PCI
device whose BDF is not described by the IVRS, the lookup reads past
the end of the allocation before the caller's bounds check can run.

This was harmless before commit e874c666b15b ("iommu/amd: Change
rlookup, irq_lookup, and alias to use kvalloc()"): the table was a
zeroed page-order allocation, so the over-read returned NULL and the
caller's NULL check skipped the device. After that commit the table is
a tight kvcalloc() and the over-read returns adjacent slab contents,
which check_device() then dereferences as a struct amd_iommu *,
causing a boot-time GPF.

Seen on Google Compute Engine ct6e VMs, where the virtualized IVRS
describes only the four TPU endpoints 00:04.0-07.0; the gVNIC at
00:08.0 (devid 0x40) indexes 56 bytes past the 456-byte allocation,
into the adjacent kmalloc-512 slab object:

  pci 0000:00:04.0: Adding to iommu group 0
  pci 0000:00:05.0: Adding to iommu group 1
  pci 0000:00:06.0: Adding to iommu group 2
  pci 0000:00:07.0: Adding to iommu group 3
  Oops: general protection fault, probably for non-canonical address 0x3a64695f78746382: 0000 [#1] SMP NOPTI
  CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.18.22 #1
  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/06/2025
  RIP: 0010:amd_iommu_probe_device+0x54/0x3a0
  Call Trace:
   __iommu_probe_device+0x107/0x520
   probe_iommu_group+0x29/0x50
   bus_for_each_dev+0x7e/0xe0
   iommu_device_register+0xc9/0x240
   iommu_go_to_state+0x9c0/0x1c60
   amd_iommu_init+0x14/0x40
   pci_iommu_init+0x16/0x60
   do_one_initcall+0x47/0x2f0

Guard the array access in __rlookup_amd_iommu(). With the fix applied
on 6.18.22, the gVNIC at 00:08.0 is skipped cleanly and the VM boots.

Fixes: e874c666b15b ("iommu/amd: Change rlookup, irq_lookup, and alias to use kvalloc()")
Cc: stable@vger.kernel.org
Reported-by: Ziyuan Chen <zc@anthropic.com>
Tested-by: Ziyuan Chen <zc@anthropic.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Assisted-by: Claude:unspecified
Signed-off-by: Jose Fernandez (Anthropic) <jose.fernandez@linux.dev>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu/amd: Remove unused IOMMU_IN/OUT_ADDR_BIT_SIZE macros
Wei Wang [Tue, 21 Apr 2026 10:00:38 +0000 (18:00 +0800)] 
iommu/amd: Remove unused IOMMU_IN/OUT_ADDR_BIT_SIZE macros

The macros IOMMU_IN/OUT_ADDR_BIT_SIZE became unused after commit
2fdf6db436e3 ("iommu/amd: Remove AMD io_pgtable support"), which removed
the last references in io_pgtable.c and io_pgtable_v2.c. Remove them to
clean up unused definitions.

Signed-off-by: Wei Wang <wei.w.wang@hotmail.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agostaging: rtl8723bs: remove unnecessary braces
Shivam Gupta [Thu, 7 May 2026 17:52:18 +0000 (23:22 +0530)] 
staging: rtl8723bs: remove unnecessary braces

Remove unnecessary braces around a single statement block
reported by checkpatch.

Signed-off-by: Shivam Gupta <shivgupta751157@gmail.com>
Reviewed-by: Nikolay Kulikov <nikolayof23@gmail.com>
Link: https://patch.msgid.link/20260507175218.16831-1-shivgupta751157@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: Replace uint with unsigned int in core
Aidan Russell [Mon, 4 May 2026 23:48:46 +0000 (16:48 -0700)] 
staging: rtl8723bs: Replace uint with unsigned int in core

Replace the uint type with unsigned int in the rtl8723bs core code.

This removes unnecessary typedef use and moves the driver closer to
standards.

No functional changes intended.

Signed-off-by: Aidan Russell <aidanlrussell@gmail.com>
Link: https://patch.msgid.link/20260504234846.114912-1-aidanlrussell@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove unnecessary blank lines in rtw_recv.c
Jennifer Guo [Sun, 10 May 2026 06:58:29 +0000 (23:58 -0700)] 
staging: rtl8723bs: remove unnecessary blank lines in rtw_recv.c

Remove unnecessary blank lines around braces {}.

This fixes the following checkpatch.pl checks in rtw_recv.c:
- CHECK: Blank lines aren't necessary after an open brace '{'
- CHECK: Blank lines aren't necessary before a close brace '}'

Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Link: https://patch.msgid.link/20260510065829.68957-1-guojy.bj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove commented out code from odm.c
Jennifer Guo [Sat, 9 May 2026 05:12:40 +0000 (22:12 -0700)] 
staging: rtl8723bs: remove commented out code from odm.c

Remove commented out case statements for better readability.

This also fixes the checkpatch.pl warning:
WARNING: Block comments use * on subsequent lines.

Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Reviewed-by: Nikolay Kulikov <nikolayof23@gmail.com>
Link: https://patch.msgid.link/20260509051240.5807-1-guojy.bj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: move block comment terminator to new line
Jennifer Guo [Sat, 9 May 2026 04:23:10 +0000 (21:23 -0700)] 
staging: rtl8723bs: move block comment terminator to new line

Move block comment terminator '*/' to separate line in order to
adhere to the kernel coding style.

This fixes the following checkpatch.pl warning:
  WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Link: https://patch.msgid.link/20260509042310.4745-3-guojy.bj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: fix block comment alignment in hal/ source files
Jennifer Guo [Sat, 9 May 2026 04:23:09 +0000 (21:23 -0700)] 
staging: rtl8723bs: fix block comment alignment in hal/ source files

Add leading whitespace to block comments in order to adhere to
the kernel coding style.

This fixes the following checkpatch.pl warning:
  WARNING: Block comments should align the * on each line.

Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Link: https://patch.msgid.link/20260509042310.4745-2-guojy.bj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agoiommupt: Encode IOMMU_MMIO/IOMMU_CACHE via RISC-V Svpbmt bits
Fangyu Yu [Fri, 17 Apr 2026 14:07:46 +0000 (22:07 +0800)] 
iommupt: Encode IOMMU_MMIO/IOMMU_CACHE via RISC-V Svpbmt bits

When the RISC-V IOMMU page table format support Svpbmt, PBMT provides
a way to tag mappings with page-based memory types. Encode memory type
via PBMT in RISC-V IOMMU PTEs:

  - IOMMU_MMIO   -> PBMT=IO
  - !IOMMU_MMIO && !IOMMU_CACHE -> PBMT=NC
  - otherwise    -> PBMT=Normal (PBMT=0)

Only touch PBMT when PT_FEAT_RISCV_SVPBMT is advertised.

Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu/riscv: Advertise Svpbmt support to generic page table
Fangyu Yu [Fri, 17 Apr 2026 14:07:45 +0000 (22:07 +0800)] 
iommu/riscv: Advertise Svpbmt support to generic page table

The RISC-V IOMMU can optionally support Svpbmt page-based memory types
in its page table format. When present,the generic page table code can
use this capability to encode memory attributes (e.g. MMIO vs normal
memory) in PTEs.

Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agostaging: rtl8723bs: fix block comment alignment in hal/ header files
Jennifer Guo [Thu, 7 May 2026 17:42:56 +0000 (10:42 -0700)] 
staging: rtl8723bs: fix block comment alignment in hal/ header files

Add leading whitespace to block comments in order to adhere to
the kernel coding style.

This fixes the following checkpatch.pl warning:
  WARNING: Block comments should align the * on each line.

Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Link: https://patch.msgid.link/20260507174256.5319-1-guojy.bj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove commented out enum values from odm_types.h
Jennifer Guo [Thu, 7 May 2026 05:00:11 +0000 (22:00 -0700)] 
staging: rtl8723bs: remove commented out enum values from odm_types.h

Found these commented out enum values, while checking for block comment
issues with checkpatch.pl. These seem to be ok to remove for cleanup.

I verified via:
git grep 'RT_STATUS_' drivers/staging/rtl8723bs/
to check there are no other occurrences.

Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Link: https://patch.msgid.link/20260507050011.17066-1-guojy.bj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: rtl8723bs: remove unnecessary block comment
Jennifer Guo [Tue, 5 May 2026 18:54:31 +0000 (11:54 -0700)] 
staging: rtl8723bs: remove unnecessary block comment

Found a block comment formatting warning in odm_interface.h
via checkpatch.pl. As far as I can tell, this block comment is no
longer useful. Hence proposing to remove it.

Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Link: https://patch.msgid.link/20260505185431.27037-1-guojy.bj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agoarm64: dts: rockchip: Add verisilicon IOMMU node on RK3588
Benjamin Gaignard [Wed, 15 Apr 2026 07:23:40 +0000 (09:23 +0200)] 
arm64: dts: rockchip: Add verisilicon IOMMU node on RK3588

Add the device tree node for the Verisilicon IOMMU present
in the RK3588 SoC.
This IOMMU handles address translation for the VPU hardware blocks.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agoiommu: Add verisilicon IOMMU driver
Benjamin Gaignard [Wed, 15 Apr 2026 07:23:39 +0000 (09:23 +0200)] 
iommu: Add verisilicon IOMMU driver

The Verisilicon IOMMU hardware block can be found in combination
with Verisilicon hardware video codecs (encoders or decoders) on
different SoCs.
Enable it will allow us to use non contiguous memory allocators
for Verisilicon video codecs.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agodt-bindings: iommu: verisilicon: Add binding for VSI IOMMU
Benjamin Gaignard [Wed, 15 Apr 2026 07:23:38 +0000 (09:23 +0200)] 
dt-bindings: iommu: verisilicon: Add binding for VSI IOMMU

Add a device tree binding for the Verisilicon (VSI) IOMMU.
This IOMMU sits in front of hardware encoder and decoder
blocks on SoCs using Verisilicon IP, such as the Rockchip RK3588.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
8 weeks agostaging: sm750fb: change 2 CamelCase variables to snake_case
Jennifer Guo [Sun, 10 May 2026 06:29:08 +0000 (23:29 -0700)] 
staging: sm750fb: change 2 CamelCase variables to snake_case

Renames these variables inside struct init_status to adhere to
kernel coding style:
- powerMode -> power_mode
- resetMemory -> reset_memory

This fixes the following checkpatch.pl checks:
- CHECK: Avoid CamelCase: <powerMode>
- CHECK: Avoid CamelCase: <resetMemory>

Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Link: https://patch.msgid.link/20260510062908.67848-3-guojy.bj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: sm750fb: rename CamelCase variable and drop prefix
Jennifer Guo [Sun, 10 May 2026 06:29:07 +0000 (23:29 -0700)] 
staging: sm750fb: rename CamelCase variable and drop prefix

Renames the CamelCase variable 'pvMem' in struct sm750_dev to 'vmem'.
Dropping the pointer prefix 'p'.

This fixes the following checkpatch.pl check:
CHECK: Avoid CamelCase: <pvMem>

Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Link: https://patch.msgid.link/20260510062908.67848-2-guojy.bj@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: most: net: replace pr_err with netdev_err
Maha Maryam Javaid [Fri, 8 May 2026 06:04:38 +0000 (11:04 +0500)] 
staging: most: net: replace pr_err with netdev_err

Replace remaining pr_err() calls with netdev_err() where a net device
is available to provide better context in error messages.

Lines in skb_to_mep() are left as pr_err() since no net device
context is available there.

Signed-off-by: Maha Maryam Javaid <mahamaryamjavaid@gmail.com>
Link: https://patch.msgid.link/20260508060438.20156-1-mahamaryamjavaid@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agostaging: sm750fb: remove unnecessary initializations
Ahmet Sezgin Duran [Mon, 4 May 2026 20:46:12 +0000 (23:46 +0300)] 
staging: sm750fb: remove unnecessary initializations

Remove two instances of `ret = 0` initializations since the variable
is overridden unconditionally before being used.

Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
Link: https://patch.msgid.link/20260504204612.55657-1-ahmet@sezginduran.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 weeks agoARM: dts: ixp4xx: use phandle-based GPIOs in mi424wr
Mohamed Ayman [Tue, 5 May 2026 09:36:07 +0000 (11:36 +0200)] 
ARM: dts: ixp4xx: use phandle-based GPIOs in mi424wr

Convert remaining legacy integer GPIO specifiers to phandle-based
descriptors in intel-ixp42x-actiontec-mi424wr.dtsi.

All other GPIOs in this file already use &gpio0/&gpio1. These are the
last remaining legacy users in the IXP4xx DTS files.

Signed-off-by: Mohamed Ayman <mohamedaymanworkspace@gmail.com>
Link: https://lore.kernel.org/20260428191029.809462-1-mohamedaymanworkspace@gmail.com
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://lore.kernel.org/r/20260505-ixp4xx-dts-v1-1-02f4a92a9697@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 weeks agoarm64: dts: realtek: Add pinctrl support for RTD1625
Yu-Chun Lin [Tue, 5 May 2026 10:58:36 +0000 (18:58 +0800)] 
arm64: dts: realtek: Add pinctrl support for RTD1625

Add the pinctrl nodes for the Realtek RTD1625 SoC.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com>
Link: https://lore.kernel.org/r/20260505105838.1014771-1-eleanor.lin@realtek.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 weeks agogpio: add GPIO controller found on Waveshare DSI TOUCH panels
Dmitry Baryshkov [Thu, 7 May 2026 09:01:33 +0000 (12:01 +0300)] 
gpio: add GPIO controller found on Waveshare DSI TOUCH panels

The Waveshare DSI TOUCH family of panels has separate on-board GPIO
controller, which controls power supplies to the panel and the touch
screen and provides reset pins for both the panel and the touchscreen.
Also it provides a simple PWM controller for panel backlight. Add
support for this GPIO controller.

Tested-by: Riccardo Mereu <r.mereu@arduino.cc>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260507-waveshare-dsi-touch-v5-2-d2ac7ccc22d4@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
8 weeks agodt-bindings: gpio: describe Waveshare GPIO controller
Dmitry Baryshkov [Thu, 7 May 2026 09:01:32 +0000 (12:01 +0300)] 
dt-bindings: gpio: describe Waveshare GPIO controller

The Waveshare DSI TOUCH family of panels has separate on-board GPIO
controller, which controls power supplies to the panel and the touch
screen and provides reset pins for both the panel and the touchscreen.
Also it provides a simple PWM controller for panel backlight.

Add bindings for these GPIO controllers. As overall integration might be
not very obvious (and it differs significantly from the bindings used by
the original drivers), provide complete example with the on-board
regulators and the DSI panel.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260507-waveshare-dsi-touch-v5-1-d2ac7ccc22d4@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
8 weeks agosoc: renesas: Convert to of_machine_get_match()
Geert Uytterhoeven [Mon, 2 Mar 2026 16:29:11 +0000 (17:29 +0100)] 
soc: renesas: Convert to of_machine_get_match()

Use the of_machine_get_match() helper to avoid accessing of_root
directly, which is planned to become private.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Link: https://patch.msgid.link/10876b30a8bdb7d1cfcc2f23fb859f2ffea335fe.1772468323.git.geert+renesas@glider.be
8 weeks agopower: sequencing: print power sequencing device parent in debugfs
Chen-Yu Tsai [Thu, 7 May 2026 05:29:41 +0000 (13:29 +0800)] 
power: sequencing: print power sequencing device parent in debugfs

The debugfs summary currently shows the power sequencing device's name.
This is not really helpful since the device name is always "pwrseq.N".

Also print the parent device's name. This would likely be the device
node name from the device tree, something like "nvme-connector". This
would make it much easier for the developer to associate the summary
with a certain device.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://patch.msgid.link/20260507052943.3133349-1-wenst@chromium.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
8 weeks agoiommu/amd: Remove latent out-of-bounds access in IOMMU debugfs
Eder Zulian [Fri, 10 Apr 2026 12:55:50 +0000 (14:55 +0200)] 
iommu/amd: Remove latent out-of-bounds access in IOMMU debugfs

In iommu_mmio_write() and iommu_capability_write(), the variables
dbg_mmio_offset and dbg_cap_offset are declared as int. However, they
are populated using kstrtou32_from_user(). If a user provides a
sufficiently large value, it can become a negative integer.

Prior to this patch, the AMD IOMMU debugfs implementation was already
protected by different mechanisms.

1. #define OFS_IN_SZ 8 ensures the user string <= 8 bytes, so
   e.g. 0xffffffff isn't a valid input.

  if (cnt > OFS_IN_SZ)
     return -EINVAL;

2. Implicit type promotion in iommu_mmio_write(), dbg_mmio_offset is int
   and iommu->mmio_phys_end is u64

  if (dbg_mmio_offset > iommu->mmio_phys_end - sizeof(u64))
      return -EINVAL;

3. The show handlers would currently catch the negative number and
   refuse to perform the read.

Replace kstrtou32_from_user() with kstrtos32_from_user() to parse the
input, and check for negative values to explicitly prevent out-of-bounds
memory accesses directly in iommu_mmio_write() and
iommu_capability_write().

Signed-off-by: Eder Zulian <ezulian@redhat.com>
Fixes: 7a4ee419e8c1 ("iommu/amd: Add debugfs support to dump IOMMU MMIO registers")
Cc: stable@vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>