]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
5 weeks agoMerge tag 'docs-7.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/docs...
Linus Torvalds [Fri, 15 May 2026 19:24:09 +0000 (12:24 -0700)] 
Merge tag 'docs-7.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/docs/linux

Pull documentation fixes from Jonathan Corbet:
 "This is Willy Tarreau's new document clarifying the definition and
  handling of security-related bugs, which we're trying to get out there
  quickly on the theory that some of the bug reporters might actually
  read and pay attention to it"

* tag 'docs-7.1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/docs/linux:
  docs: threat-model: don't limit root capabilities to CAP_SYS_ADMIN
  docs: security-bugs: add a link to the threat-model documentation
  Documentation: security-bugs: clarify requirements for AI-assisted reports
  Documentation: security-bugs: explain what is and is not a security bug
  Documentation: security-bugs: do not systematically Cc the security team

5 weeks agodrm/xe/pf: Fix CFI failure in debugfs access
Mohanram Meenakshisundaram [Thu, 14 May 2026 17:49:18 +0000 (23:19 +0530)] 
drm/xe/pf: Fix CFI failure in debugfs access

Reading debugfs file (/sys/kernel/debug/dri/0/gt*/pf/adverse_events)
with CFI (Control Flow Integrity) enabled, the kernel panics at
xe_gt_debugfs_simple_show+0x82/0xc0.

xe_gt_debugfs_simple_show() declare a function pointer expecting int
return type, but xe_gt_sriov_pf_monitor_print_events() is void return
type, leading to CFI failure and kernel panic.

[507620.973657] CFI failure at xe_gt_debugfs_simple_show+0x82/0xc0 [xe]
(target: xe_gt_sriov_pf_monitor_print_events+0x0/0x130 [xe]; expected
type: 0xd72c7139)

Fix xe_gt_sriov_pf_monitor_print_events() function by updating to return
an int type.

Fixes: 1c99d3d3edab ("drm/xe/pf: Expose PF monitor details via debugfs")
Signed-off-by: Mohanram Meenakshisundaram <mohanram.meenakshisundaram@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patch.msgid.link/20260514174918.1556357-2-mohanram.meenakshisundaram@intel.com
5 weeks agodrm/xe/vf: Fix signature of print functions
Michal Wajdeczko [Thu, 14 May 2026 15:57:26 +0000 (17:57 +0200)] 
drm/xe/vf: Fix signature of print functions

We have plugged-in existing VF print functions into our GT debugfs
show helper as-is, but we missed that the helper expects functions
to return int, while they were defined as void. This can lead to
errors being reported when CFI is enabled.

Fixes: 63d8cb8fe3dd ("drm/xe/vf: Expose SR-IOV VF attributes to GT debugfs")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Mohanram Meenakshisundaram <mohanram.meenakshisundaram@intel.com>
Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com>
Link: https://patch.msgid.link/20260514155726.7165-1-michal.wajdeczko@intel.com
5 weeks agoring-buffer remote: Avoid unexpected symbol warnings (arm, s390)
Arnd Bergmann [Fri, 15 May 2026 10:57:09 +0000 (12:57 +0200)] 
ring-buffer remote: Avoid unexpected symbol warnings (arm, s390)

The now more verbose check found more architecture specific symbol
missing from the whitelist, during randconfig testing on s390
and 32-bit arm:

Unexpected symbols in kernel/trace/simple_ring_buffer.o:
         U __aeabi_unwind_cpp_pr1

Unexpected symbols in kernel/trace/simple_ring_buffer.o:
                 U __s390_indirect_jump_r1
                 U __s390_indirect_jump_r10
                 U __s390_indirect_jump_r14
                 U __s390_indirect_jump_r2
                 U __s390_indirect_jump_r5
                 U __s390_indirect_jump_r7
                 U __s390_indirect_jump_r8
                 U __s390_indirect_jump_r9
make[6]: *** [/home/arnd/arm-soc/kernel/trace/Makefile:160: kernel/trace/simple_ring_buffer.o.checked] Error 1

Add these to the list and keep it roughly sorted into sanitizer
and architecture symbols.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Vincent Donnefort <vdonnefort@google.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Link: https://patch.msgid.link/20260515105717.1023007-1-arnd@kernel.org
Fixes: 1211907ac0b5 ("tracing: Generate undef symbols allowlist for simple_ring_buffer")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
5 weeks agoMerge tag 'for-linus-7.1b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 15 May 2026 18:24:51 +0000 (11:24 -0700)] 
Merge tag 'for-linus-7.1b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fixes from Juergen Gross:

 - one simple cleanup

 - a fix for a corner case when running as Xen PV dom0

 - a fix of a regression for Xen PV guests, introduced in 7.0

* tag 'for-linus-7.1b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  x86/xen: Tolerate nested XEN_LAZY_MMU entering/leaving
  x86/xen: Fix xen_e820_swap_entry_with_ram()
  xen/arm: Replace __ASSEMBLY__ with __ASSEMBLER__ in interface.h

5 weeks agoMerge tag 'platform-drivers-x86-v7.1-3' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 May 2026 18:12:54 +0000 (11:12 -0700)] 
Merge tag 'platform-drivers-x86-v7.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Ilpo Järvinen:

 - asus-nb-wmi:
    - Use existing keyboard quirk for ASUS Zenbook Duo UX8407AA

 - hp-wmi:
    - Add support for Victus 16-r0xxx (8BC2)

 - intel/vsec_tpmi:
    - Move debugfs register before creating devices
    - Prevent fault during unbind

 - lenovo-wmi-*:
    - Fix memory leak in lwmi_dev_evaluate_int()
    - Balance IDA id allocation and free
    - Balance component bind and unbind
    - Prevent sending uninitialized WMI arguments to the device
    - Decouple lenovo-wmi-gamezone and lenovo-wmi-other to simplify
      module dependency graph
    - Limit adding attributes to supported devices

 - samsung-galaxybook:
    - Handle kbd backlight, mic mute and camera block hotkeys

* tag 'platform-drivers-x86-v7.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: asus-nb-wmi: add DMI quirk for ASUS Zenbook Duo UX8407AA
  platform/x86: lenovo-wmi-other: Limit adding attributes to supported devices
  platform/x86: lenovo-wmi-other: Add Attribute ID helper functions
  platform/x86: lenovo-wmi-helpers: Move gamezone enums to wmi-helpers
  platform/x86: lenovo: Decouple lenovo-wmi-gamezone and lenovo-wmi-other
  platform/x86: lenovo-wmi-other: Fix tunable_attr_01 struct members
  platform/x86: lenovo-wmi-other: Zero initialize WMI arguments
  platform/x86: lenovo-wmi-other: Balance component bind and unbind
  platform/x86: lenovo-wmi-other: Balance IDA id allocation and free
  platform/x86: lenovo-wmi-helpers: Fix memory leak in lwmi_dev_evaluate_int()
  platform/x86: hp-wmi: Add support for Victus 16-r0xxx (8BC2)
  platform/x86/intel/tpmi/plr: Prevent fault during unbind
  platform/x86: intel: Add notifiers support
  platform/x86: intel: Move debugfs register before creating devices
  platform/x86: samsung-galaxybook: Handle ACPI hotkey notifications
  platform/x86: samsung-galaxybook: Refactor camera lens cover input device

5 weeks agoPCI: brcmstb: Assign pcie->gen from of_pci_get_max_link_speed()
Florian Fainelli [Wed, 6 May 2026 16:45:37 +0000 (09:45 -0700)] 
PCI: brcmstb: Assign pcie->gen from of_pci_get_max_link_speed()

After commit 03f920936977 ("PCI: controller: Validate max-link-speed"),
pcie->gen stopped being assigned and as a result the established PCIe link
would stop supporting Gen3 speeds on 2712 since pcie->gen is used to
populate LnkCntl2 and LnkCap in brcm_pcie_set_gen().

If the 'max-link-speed' property is not specified, or it exceeds Gen3,
resort to the HW defaults.

Link: https://github.com/raspberrypi/linux/issues/7343
Reported-by: Dom Cobley <popcornmix@gmail.com>
Reported-by: Phil Elwell <phil@raspberrypi.com>
Fixes: 03f920936977 ("PCI: controller: Validate max-link-speed")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Hans Zhang <18255117159@163.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20260506164537.103196-1-florian.fainelli@broadcom.com
5 weeks agoMerge tag 'v7.1-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 15 May 2026 17:38:37 +0000 (10:38 -0700)] 
Merge tag 'v7.1-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:

 - Fix potential dead-lock in rhashtable when used by xattr

 - Avoid calling kvfree on atomic path in rhashtable

* tag 'v7.1-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  rhashtable: Add bucket_table_free_atomic() helper
  mm/slab: Add kvfree_atomic() helper
  rhashtable: drop ht->mutex in rhashtable_free_and_destroy()

5 weeks agoMerge patch series "VFS changes for nfsd CB_NOTIFY callbacks in directory delegations"
Christian Brauner [Fri, 15 May 2026 17:24:42 +0000 (19:24 +0200)] 
Merge patch series "VFS changes for nfsd CB_NOTIFY callbacks in directory delegations"

The series starts with patches to allow the vfs to ignore certain types
of events on directories. nfsd can then request these sorts of
delegations on directories, and then set up inotify watches on the
directory to trigger sending CB_NOTIFY events.

* patches from https://patch.msgid.link/20260428-dir-deleg-v3-0-5a0780ba9def@kernel.org:
  fsnotify: add FSNOTIFY_EVENT_RENAME data type
  fsnotify: add fsnotify_modify_mark_mask()
  fsnotify: new tracepoint in fsnotify()
  filelock: add an inode_lease_ignore_mask helper
  filelock: add a tracepoint to start of break_lease()
  filelock: add support for ignoring deleg breaks for dir change events
  filelock: pass current blocking lease to trace_break_lease_block() rather than "new_fl"

Link: https://patch.msgid.link/20260428-dir-deleg-v3-0-5a0780ba9def@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agofsnotify: add FSNOTIFY_EVENT_RENAME data type
Jeff Layton [Tue, 28 Apr 2026 07:09:51 +0000 (08:09 +0100)] 
fsnotify: add FSNOTIFY_EVENT_RENAME data type

Add a new fsnotify_rename_data struct and FSNOTIFY_EVENT_RENAME data
type that carries both the moved dentry and the inode that was
overwritten by the rename (if any).

Update fsnotify_data_inode(), fsnotify_data_dentry(), and
fsnotify_data_sb() to handle the new type, and add a new
fsnotify_data_rename_target() helper for extracting the overwritten
target inode.

Update fsnotify_move() to use the new data type for FS_RENAME and
FS_MOVED_TO events, passing the overwritten target inode through the
event data. FS_MOVED_FROM is unchanged since the source directory
doesn't need overwrite information.

This is done so that fsnotify consumers like nfsd can atomically
observe the overwritten file when a rename replaces an existing entry,
without needing a separate FS_DELETE event.

Assisted-by: Claude (Anthropic Claude Code)
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260428-dir-deleg-v3-7-5a0780ba9def@kernel.org
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agofsnotify: add fsnotify_modify_mark_mask()
Jeff Layton [Tue, 28 Apr 2026 07:09:50 +0000 (08:09 +0100)] 
fsnotify: add fsnotify_modify_mark_mask()

nfsd needs to be able to modify the mask on an existing mark when new
directory delegations are set or unset. Add an exported function that
allows the caller to set and clear bits in the mark->mask, and does
the recalculation if something changed.

Suggested-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260428-dir-deleg-v3-6-5a0780ba9def@kernel.org
Acked-by: Jan Kara <jack@suse.cz>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agofsnotify: new tracepoint in fsnotify()
Jeff Layton [Tue, 28 Apr 2026 07:09:49 +0000 (08:09 +0100)] 
fsnotify: new tracepoint in fsnotify()

Add a tracepoint so we can see exactly how this is being called.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260428-dir-deleg-v3-5-5a0780ba9def@kernel.org
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agocgroup: Defer kill_css_finish() in cgroup_apply_control_disable()
Tejun Heo [Tue, 5 May 2026 00:51:21 +0000 (14:51 -1000)] 
cgroup: Defer kill_css_finish() in cgroup_apply_control_disable()

Same race shape as the rmdir path that 93618edf7538 ("cgroup: Defer css
percpu_ref kill on rmdir until cgroup is depopulated") fixed: a task past
exit_signals() whose cset subsys[ssid] still pins the disabled controller's
css can be touching subsys state while ->css_offline() runs. The earlier
patches in this series built up the per-subsys-css deferral machinery and
routed cgroup_destroy_locked() through it. Apply the same shape to
cgroup_apply_control_disable():

kill_css_sync(css);
if (!css_is_populated(css))
kill_css_finish(css);

When the dying css is still populated, kill_css_finish() is deferred. The
walker in css_update_populated() fires kill_finish_work once the css's
hierarchical populated count drops to zero.

cgroup_lock_and_drain_offline()'s wait predicate switches from
percpu_ref_is_dying() to css_is_dying(). CSS_DYING is set by kill_css_sync()
and is a strict superset of percpu_ref_is_dying. Without this change, a +cpu
re-enable after a deferred -cpu disable would skip the drain (percpu_ref
isn't killed yet) and observe the still-CSS_DYING css through cgroup_css(),
treating it as live.

Signed-off-by: Tejun Heo <tj@kernel.org>
5 weeks agofilelock: add an inode_lease_ignore_mask helper
Jeff Layton [Tue, 28 Apr 2026 07:09:48 +0000 (08:09 +0100)] 
filelock: add an inode_lease_ignore_mask helper

Add a new routine that returns a mask of all dir change events that are
currently ignored by any leases. nfsd will use this to determine how to
configure the fsnotify_mark mask.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260428-dir-deleg-v3-4-5a0780ba9def@kernel.org
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agofilelock: add a tracepoint to start of break_lease()
Jeff Layton [Tue, 28 Apr 2026 07:09:47 +0000 (08:09 +0100)] 
filelock: add a tracepoint to start of break_lease()

...mostly to show the LEASE_BREAK_* flags.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260428-dir-deleg-v3-3-5a0780ba9def@kernel.org
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agofilelock: add support for ignoring deleg breaks for dir change events
Jeff Layton [Tue, 28 Apr 2026 07:09:46 +0000 (08:09 +0100)] 
filelock: add support for ignoring deleg breaks for dir change events

If a NFS client requests a directory delegation with a notification
bitmask covering directory change events, the server shouldn't recall
the delegation. Instead the client will be notified of the change after
the fact.

Add support for ignoring lease breaks on directory changes. Add a new
flags parameter to try_break_deleg() and teach __break_lease how to
ignore certain types of delegation break events.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260428-dir-deleg-v3-2-5a0780ba9def@kernel.org
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agofilelock: pass current blocking lease to trace_break_lease_block() rather than "new_fl"
Jeff Layton [Tue, 28 Apr 2026 07:09:45 +0000 (08:09 +0100)] 
filelock: pass current blocking lease to trace_break_lease_block() rather than "new_fl"

The break_lease_block tracepoint currently just shows the type of
"new_fl", which we can predict from the "flags" value. Switch it to
display info about "fl" instead, as that's the file_lease on which the
code is blocking.

For trace_break_lease_unblock(), pass it a NULL pointer. "fl" may have
been freed by that point, and passing it the info in new_fl is
deceptive.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260428-dir-deleg-v3-1-5a0780ba9def@kernel.org
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agocgroup: Add per-subsys-css kill_css_finish deferral
Tejun Heo [Tue, 5 May 2026 00:51:20 +0000 (14:51 -1000)] 
cgroup: Add per-subsys-css kill_css_finish deferral

93618edf7538 ("cgroup: Defer css percpu_ref kill on rmdir until cgroup is
depopulated") deferred kill_css_finish() at the cgroup level: rmdir waits
for the entire cgroup's populated count to drop to zero, then fires
kill_css_finish() on every subsystem css at once. Replace that with
per-subsys-css deferral. Each subsystem css now tracks its own hierarchical
populated count and independently defers its kill_css_finish() until its own
subtree drains.

The rmdir-race fix carries through unchanged in shape. The dying css's
->css_offline() still waits until no PF_EXITING task references it, and v2's
cgroup-level machinery goes away.

cgroup_apply_control_disable() has the same race shape (PF_EXITING tasks
pinning a css whose ->css_offline() is about to run) and stays synchronous
here. This patch lays the groundwork for fixing it - per-cgroup waiting
can't gate one subsys css being killed while the rest of the cgroup stays
live, but per-css can.

Subtree-wide invariant preserved: a dying ancestor css stays populated
through nr_populated_children until every dying descendant's task drains, so
the walker fires the ancestor's kill_finish_work only after all descendants
have drained.

Add paired smp_mb()s in kill_css_sync() and css_update_populated() to fence
the StoreLoad on (CSS_DYING, populated counter), guaranteeing that either
the walker queues kill_finish_work or the caller fires synchronously.
cgroup_destroy_locked() was implicitly fenced by an unrelated css_set_lock
pair; cgroup_apply_control_disable() in the next patch is not.

Signed-off-by: Tejun Heo <tj@kernel.org>
5 weeks agocgroup: Move populated counters to cgroup_subsys_state
Tejun Heo [Tue, 5 May 2026 00:51:19 +0000 (14:51 -1000)] 
cgroup: Move populated counters to cgroup_subsys_state

Later patches replace the cgroup-level finish_destroy_work deferral added
by 93618edf7538 ("cgroup: Defer css percpu_ref kill on rmdir until cgroup
is depopulated") with a per-subsys-css deferral. That needs each subsystem
css to track its own populated count. Move the populated counters from
cgroup onto cgroup_subsys_state. cgroup->self is itself a
cgroup_subsys_state and self.parent walks the same chain as cgroup_parent(),
so cgroup_update_populated() generalizes to a single css_update_populated()
taking a css. The cgroup-side bookkeeping runs only when the walk started
from a self css.

Keep nr_populated_{domain,threaded}_children on cgroup. Both sum to
self.nr_populated_children, but staying as dedicated fields to allow readers
like cgroup_can_be_thread_root() unlocked access.

css_set_update_populated() also walks the per-subsys-css chain so each
subsystem css's hierarchical populated count is maintained. No reader
consumes those counts yet.

Signed-off-by: Tejun Heo <tj@kernel.org>
5 weeks agocgroup: Annotate unlocked nr_populated_* accesses with READ_ONCE/WRITE_ONCE
Tejun Heo [Tue, 5 May 2026 00:51:18 +0000 (14:51 -1000)] 
cgroup: Annotate unlocked nr_populated_* accesses with READ_ONCE/WRITE_ONCE

cgroup_update_populated() updates nr_populated_csets,
nr_populated_domain_children, and nr_populated_threaded_children under
css_set_lock, but cgroup_has_tasks(), cgroup_is_populated(), and
cgroup_can_be_thread_root() read them without holding it. Use
READ_ONCE/WRITE_ONCE.

Signed-off-by: Tejun Heo <tj@kernel.org>
5 weeks agocgroup: Inline cgroup_has_tasks() in cgroup.h
Tejun Heo [Tue, 5 May 2026 00:51:17 +0000 (14:51 -1000)] 
cgroup: Inline cgroup_has_tasks() in cgroup.h

cpuset reads cs->css.cgroup->nr_populated_csets directly in two places to
test whether a cgroup has tasks. cgroup.c already has a matching helper,
cgroup_has_tasks(). Move it to cgroup.h as static inline and use that
instead. This is to prepare for relocation of cgroup->nr_populated_csets. No
semantic change.

Signed-off-by: Tejun Heo <tj@kernel.org>
5 weeks agoio_uring/net: punt IORING_OP_BIND async if it needs file create
Jens Axboe [Fri, 15 May 2026 16:19:09 +0000 (10:19 -0600)] 
io_uring/net: punt IORING_OP_BIND async if it needs file create

For two reasons:

1) An opcode cannot block inside io_uring_enter() doing submissions, as
   it'll stall the submission side pipeline.

2) Ending up in sb_start_write() -> __sb_start_write() ->
   percpu_down_read_freezable() introduces a new lockdep edge, which it
   correctly complains about.

Check if the socket type is AF_UNIX and has a non-empty pathname. If it
does, mark it REQ_F_FORCE_ASYNC to punt the submission to io-wq rather
than attempt to do it inline.

Fixes: 7481fd93fa0a ("io_uring: Introduce IORING_OP_BIND")
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 weeks agoriscv: dts: microchip: remove redudant enabling of syscontroller
Conor Dooley [Fri, 15 May 2026 16:16:31 +0000 (17:16 +0100)] 
riscv: dts: microchip: remove redudant enabling of syscontroller

The system controller is never disabled, there's no need to ever enable
it.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
5 weeks agobpf: make bpf_session_is_return() reference optional
Arnd Bergmann [Fri, 15 May 2026 11:32:32 +0000 (13:32 +0200)] 
bpf: make bpf_session_is_return() reference optional

Building without CONFIG_BPF_EVENTS produces a build-time
warning:

WARN: resolve_btfids: unresolved symbol bpf_session_is_return

The function is actually defined in kernel/trace/bpf_trace.o,
which is built conditionally based on configuration.

Make the reference to this function conditional as well,
as is already done in the bpf verifier for other functions.

Fixes: 8fe4dc4f6456 ("bpf: change prototype of bpf_session_{cookie,is_return}")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20260515113242.2706303-1-arnd@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
5 weeks agodrm/msm: Fix shrinker deadlock
Daniel J Blueman [Fri, 8 May 2026 06:57:21 +0000 (14:57 +0800)] 
drm/msm: Fix shrinker deadlock

With PROVE_LOCKING on an Snapdragon X1 and VM reclaim pressure, we see:

   ======================================================
   WARNING: possible circular locking dependency detected
   7.0.0-debug+ #43 Tainted: G        W
   ------------------------------------------------------
   kswapd0/82 is trying to acquire lock:
   ffff800080ec3870 (reservation_ww_class_acquire){+.+.}-{0:0}, at: msm_gem_shrinker_scan+0x17c/0x400 [msm]

   but task is already holding lock:
   ffffc31709b263b8 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x88/0x988

   which lock already depends on the new lock.

   the existing dependency chain (in reverse order) is:

   -> #2 (fs_reclaim){+.+.}-{0:0}:
          __lock_acquire+0x4d0/0xad0
          lock_acquire.part.0+0xc4/0x248
          lock_acquire+0x8c/0x248
          fs_reclaim_acquire+0xd0/0xf0
          dma_resv_lockdep+0x224/0x348
          do_one_initcall+0x84/0x5d0
          do_initcalls+0x194/0x1d8
          kernel_init_freeable+0x128/0x180
          kernel_init+0x2c/0x160
          ret_from_fork+0x10/0x20

   -> #1 (reservation_ww_class_mutex){+.+.}-{4:4}:
          __lock_acquire+0x4d0/0xad0
          lock_acquire.part.0+0xc4/0x248
          lock_acquire+0x8c/0x248
          dma_resv_lockdep+0x1a8/0x348
          do_one_initcall+0x84/0x5d0
          do_initcalls+0x194/0x1d8
          kernel_init_freeable+0x128/0x180
          kernel_init+0x2c/0x160
          ret_from_fork+0x10/0x20

   -> #0 (reservation_ww_class_acquire){+.+.}-{0:0}:
          check_prev_add+0x114/0x790
          validate_chain+0x594/0x6f0
          __lock_acquire+0x4d0/0xad0
          lock_acquire.part.0+0xc4/0x248
          lock_acquire+0x8c/0x248
          drm_gem_lru_scan+0x1ac/0x440
          msm_gem_shrinker_scan+0x17c/0x400 [msm]
          do_shrink_slab+0x150/0x4a0
          shrink_slab+0x144/0x460
          shrink_one+0x9c/0x1b0
          shrink_many+0x27c/0x5c0
          shrink_node+0x344/0x550
          balance_pgdat+0x2c0/0x988
          kswapd+0x11c/0x318
          kthread+0x10c/0x128
          ret_from_fork+0x10/0x20

   other info that might help us debug this:
   Chain exists of:
     reservation_ww_class_acquire --> reservation_ww_class_mutex --> fs_reclaim
    Possible unsafe locking scenario:
          CPU0                    CPU1
          ----                    ----
     lock(fs_reclaim);
                                  lock(reservation_ww_class_mutex);
                                  lock(fs_reclaim);
     lock(reservation_ww_class_acquire);

    *** DEADLOCK ***
   1 lock held by kswapd0/82:
    #0: ffffc31709b263b8 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x88/0x988

   stack backtrace:
   CPU: 4 UID: 0 PID: 82 Comm: kswapd0 Tainted: G        W           7.0.0-debug+ #43 PREEMPT(full)
   Tainted: [W]=WARN
   Hardware name: LENOVO 21BX0016US/21BX0016US, BIOS N3HET94W (1.66 ) 09/15/2025
   Call trace:
    show_stack+0x20/0x40 (C)
    dump_stack_lvl+0x9c/0xd0
    dump_stack+0x18/0x30
    print_circular_bug+0x114/0x120
    check_noncircular+0x178/0x198
    check_prev_add+0x114/0x790
    validate_chain+0x594/0x6f0
    __lock_acquire+0x4d0/0xad0
    lock_acquire.part.0+0xc4/0x248
    lock_acquire+0x8c/0x248
    drm_gem_lru_scan+0x1ac/0x440
    msm_gem_shrinker_scan+0x17c/0x400 [msm]
    do_shrink_slab+0x150/0x4a0
    shrink_slab+0x144/0x460
    shrink_one+0x9c/0x1b0
    shrink_many+0x27c/0x5c0
    shrink_node+0x344/0x550
    balance_pgdat+0x2c0/0x988
    kswapd+0x11c/0x318
    kthread+0x10c/0x128
    ret_from_fork+0x10/0x20

kswapd0 holding fs_reclaim calls the MSM shrinker, which calls
dma_resv_lock. This in turn acquires fs_reclaim.

Fix this deadlock by using dma_resv_trylock() instead, dropping the
subsequently unused passed wait-wound lock 'ticket'.

Cc: stable@vger.kernel.org
Signed-off-by: Daniel J Blueman <daniel@quora.org>
Fixes: fe4952b5f27c ("drm/msm: Convert vm locking")
Patchwork: https://patchwork.freedesktop.org/patch/723564/
Message-ID: <20260508065722.18785-1-daniel@quora.org>
[rob: fixup compile errors, replace lockdep splat with something legible]
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
5 weeks agoMAINTAINERS: Remove Jianjun Wang as PCIe mediatek maintainer
Hans Zhang [Fri, 15 May 2026 15:36:35 +0000 (23:36 +0800)] 
MAINTAINERS: Remove Jianjun Wang as PCIe mediatek maintainer

Email to Jianjun Wang <jianjun.wang@mediatek.com> bounces with error:
"550 Relaying mail to jianjun.wang@mediatek.com is not allowed".
Remove the address to avoid sending future kernel maintenance queries
to an unreachable destination.

The MediaTek PCIe driver remains supported by Ryder Lee.

Signed-off-by: Hans Zhang <18255117159@163.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20260515153635.136054-1-18255117159@163.com
5 weeks agoio_uring/epoll: disallow adding an epoll file to an epoll context
Jens Axboe [Thu, 23 Apr 2026 11:10:45 +0000 (05:10 -0600)] 
io_uring/epoll: disallow adding an epoll file to an epoll context

One of the nastier things about epoll is how it allows adding epoll
files to epoll contexts. This leads to all sorts of loop detection
code, and has been a source of issues in the past.

Arguably adding IORING_EPOLL_CTL is a historical mistake on the
io_uring side, but we're kind of stuck with it now as it does seem
to be in use according to code searches. But we can at least minimize
the damage a bit and just disallow this part of epoll, where nesting
issues can arise.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 weeks agoio_uring/epoll: switch to using do_epoll_ctl_file() interface
Jens Axboe [Thu, 23 Apr 2026 11:10:15 +0000 (05:10 -0600)] 
io_uring/epoll: switch to using do_epoll_ctl_file() interface

No functional changes in this patch.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 weeks agoMerge branch 'vfs-7.2.eventpoll' of git://git.kernel.org/pub/scm/linux/kernel/git...
Jens Axboe [Fri, 15 May 2026 15:57:30 +0000 (09:57 -0600)] 
Merge branch 'vfs-7.2.eventpoll' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs into for-7.2/io_uring-epoll

Merge the VFS epoll series, which has the required patches to do the
io_uring cleanup on top.

* 'vfs-7.2.eventpoll' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (21 commits)
  eventpoll: rename struct epoll_filefd to epoll_key
  eventpoll: add file based control interface
  eventpoll: export is_file_epoll()
  eventpoll: pass struct epoll_filefd through ep_find() and ep_insert()
  eventpoll: hoist CTL_ADD scratch state into struct ep_ctl_ctx
  eventpoll: use bool for predicate helpers
  eventpoll: rename epi->next and txlist for clarity
  eventpoll: wrap EP_UNACTIVE_PTR in typed sentinel helpers
  eventpoll: extract lock dance from do_epoll_ctl() into ep_ctl_lock()
  eventpoll: extract ep_deliver_event() from ep_send_events()
  eventpoll: split ep_clear_and_put() into drain helpers
  eventpoll: split ep_insert() into alloc + register stages
  eventpoll: relocate KCMP helpers near compat syscalls
  eventpoll: rename attach_epitem() to ep_attach_file()
  eventpoll: drop unused depth argument from epoll_mutex_lock()
  eventpoll: rename ep_refcount_dec_and_test() to ep_put()
  eventpoll: document ep_clear_and_put() two-pass pattern
  eventpoll: refresh epi_fget() / ep_remove_file() comments
  eventpoll: clarify POLLFREE handshake comments
  eventpoll: document loop-check / path-check globals
  ...

5 weeks agoALSA: hda/cs35l41: Fix firmware load work teardown
Cássio Gabriel [Mon, 11 May 2026 04:29:34 +0000 (01:29 -0300)] 
ALSA: hda/cs35l41: Fix firmware load work teardown

cs35l41_hda creates ALSA controls whose private data points at the
cs35l41_hda object. The firmware load control can also queue
fw_load_work.

Those controls are not removed on component unbind, and device remove
only cancels fw_load_work through cs35l41_remove_dsp(). That helper is
skipped when halo_initialized is false. With firmware_autostart
disabled, a firmware load can be requested before the DSP has been
initialized. If the component or device is removed before the queued
work runs, the worker can run after teardown and dereference driver
state that is no longer valid.

Track the created controls and remove them on unbind so no new control
callback can reach the driver data or queue more work. Then cancel
fw_load_work to drain any request that was already queued. Also cancel
the work unconditionally during device remove before runtime PM teardown.

Fixes: 47ceabd99a28 ("ALSA: hda: cs35l41: Support Firmware switching and reloading")
Fixes: 4c870513fbb0 ("ALSA: hda: cs35l41: Add read-only ALSA control for forced mute")
Cc: stable@vger.kernel.org
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Reviewed-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260511-alsa-hda-cs35l41-fw-work-teardown-v1-1-1184e9bc4f25@gmail.com
5 weeks agoMerge patch series "Casefold Fixes"
Christian Brauner [Fri, 15 May 2026 15:49:29 +0000 (17:49 +0200)] 
Merge patch series "Casefold Fixes"

Bring in a bunch of fixes for the casefold work.

* patches from https://patch.msgid.link/20260515153515.362266-1-cel@kernel.org:
  nfsd: Cap case-folding probe cost across READDIR entries
  nfsd: Map -ESTALE from case probe to NFS3ERR_STALE
  nfsd: Use kernel credentials for case-info probe
  fs: Clarify FS_CASEFOLD_FL semantics in UAPI header
  nfs: Skip pathconf probe when neither field is consumed
  nfs: Avoid transient zeroed case capability bits during probe
  tools headers UAPI: Sync case-sensitivity flags from linux/fs.h

Link: https://patch.msgid.link/20260515153515.362266-1-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agonfsd: Cap case-folding probe cost across READDIR entries
Chuck Lever [Fri, 15 May 2026 15:35:15 +0000 (11:35 -0400)] 
nfsd: Cap case-folding probe cost across READDIR entries

NFSv4 READDIR carries a per-entry attrmask. When the attrmask
includes FATTR4_CASE_INSENSITIVE or FATTR4_CASE_PRESERVING,
nfsd4_encode_fattr4() resolves each non-directory child's case
attributes by calling nfsd_get_case_info(), which dget_parent()s
back to the directory being read and re-runs the cred swap and LSM
probe per child. The encoder amplifies a single answer into one
prepare_kernel_cred() allocation, two LSM hooks, and one put_cred()
RCU callback for every non-directory entry.

No mainstream NFSv4 client has been observed to populate a READDIR
attrmask with these attributes; the Linux client queries them only
via SERVER_CAPS at mount time. The exposure is therefore to test
clients exploring corner cases and to hostile clients that submit
an attrmask designed to multiply server work by rd_dircount.

Probe the directory being read once and cache the result on
struct nfsd4_readdir for use by every non-directory child. The
probe targets the readdir filehandle's dentry, which is held for
the duration of the request, rather than dget_parent() of a
child's locklessly-acquired dentry; the latter could be moved out
of the directory by a concurrent rename and report attributes
from an unrelated parent. Directory entries continue to be
queried individually, because casefold-capable filesystems (ext4,
f2fs) report case state per directory. The other callers of
nfsd4_encode_fattr4() (single GETATTR, the buffer wrapper) pass
NULL for the cache pointer and behave as before.

Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260507-case-sensitivity-v14-0-e62cc8200435@oracle.com?part=14
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260515153515.362266-8-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agonfsd: Map -ESTALE from case probe to NFS3ERR_STALE
Chuck Lever [Fri, 15 May 2026 15:35:14 +0000 (11:35 -0400)] 
nfsd: Map -ESTALE from case probe to NFS3ERR_STALE

The PATHCONF switch in nfsd3_proc_pathconf() recognizes -EOPNOTSUPP
(filesystem does not expose case state) and maps -EACCES / -EPERM to
nfserr_stale, but lets every other errno fall through to
nfserr_serverfault. -ESTALE escapes the same way even though RFC 1813
lists NFS3ERR_STALE as a permitted PATHCONF status, so a probe of an
NFS-backed re-export whose parent dentry has been invalidated returns
SERVERFAULT and tells the client the server is broken when the handle
itself simply went stale.

Add an explicit -ESTALE arm that maps to nfserr_stale.

Fixes: a8de9c3b40e4 ("nfsd: Report export case-folding via NFSv3 PATHCONF")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260507-case-sensitivity-v14-0-e62cc8200435@oracle.com?part=13
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260515153515.362266-7-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agonfsd: Use kernel credentials for case-info probe
Chuck Lever [Fri, 15 May 2026 15:35:13 +0000 (11:35 -0400)] 
nfsd: Use kernel credentials for case-info probe

nfsd_get_case_info() takes prepare_creds() and overrides fsuid/fsgid
to GLOBAL_ROOT, intending to escape per-client policy on the parent
directory. prepare_creds() copies the calling task's full credential,
including the LSM security label, so only the DAC identity is
neutralized. With labeled NFS, where the active LSM context has been
mapped to the client, security_inode_file_getattr() can still deny the
probe with -EACCES even though the case-folding property the caller
wants is structural and identical for every client. The docblock
already states the intent ("the probe runs with kernel credentials"),
which the implementation does not deliver.

prepare_kernel_cred(&init_task) constructs a credential from
init_task's identity and security label, the kernel's own unconfined
context. Use it instead and drop the redundant fsuid/fsgid overrides
that init_task already supplies. The probe now matches the docblock,
LSM denials on the parent disappear, and the call sites that map an
unexpected error to NFS3ERR_SERVERFAULT or fail an NFSv4 GETATTR
outright stop seeing -EACCES from this path.

Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260507-case-sensitivity-v14-0-e62cc8200435@oracle.com?part=14
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260515153515.362266-6-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agofs: Clarify FS_CASEFOLD_FL semantics in UAPI header
Chuck Lever [Fri, 15 May 2026 15:35:12 +0000 (11:35 -0400)] 
fs: Clarify FS_CASEFOLD_FL semantics in UAPI header

The existing one-liner "Folder is case insensitive" leaves the
impression that FS_CASEFOLD_FL is reserved for directories.
That impression is wrong: filesystems that derive
case-insensitivity from mount or volume state report the bit on
non-directory inodes via i_op->fileattr_get, so userspace
inspecting FS_IOC_GETFLAGS can see it on any inode type.

Replace the one-liner with a block comment that names directories
as the typical case, records that non-directory inodes may also
report the bit, and notes FS_XFLAG_CASEFOLD as the read-only
companion exposed through FS_IOC_FSGETXATTR.

Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260507-case-sensitivity-v14-0-e62cc8200435@oracle.com?part=3
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260515153515.362266-5-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agonfs: Skip pathconf probe when neither field is consumed
Chuck Lever [Fri, 15 May 2026 15:35:11 +0000 (11:35 -0400)] 
nfs: Skip pathconf probe when neither field is consumed

The PATHCONF RPC issued from nfs_probe_fsinfo() supplies two pieces of
information: max_namelen, used only when server->namelen has not been
pinned by mount options, and the case_insensitive / case_preserving
fields, used only by the NFSv2/NFSv3 path. NFSv4 receives its case
sensitivity caps from the FATTR4_CASE_* attributes during the
set_capabilities probe, and a non-zero server->namelen short-circuits
the only other field of interest.

When both conditions hold (NFSv4 with namelen pinned), the pathconf
reply is discarded in full but the round-trip is still on the mount
critical path. Gate the call on version < 4 || namelen == 0 so that
mounts which cannot benefit from the reply do not pay for it.

Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260507-case-sensitivity-v14-0-e62cc8200435@oracle.com?part=10
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260515153515.362266-4-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agonfs: Avoid transient zeroed case capability bits during probe
Chuck Lever [Fri, 15 May 2026 15:35:10 +0000 (11:35 -0400)] 
nfs: Avoid transient zeroed case capability bits during probe

nfs_probe_fsinfo() clears NFS_CAP_CASE_INSENSITIVE and
NFS_CAP_CASE_NONPRESERVING ahead of the synchronous pathconf RPC and
sets them again only after the reply arrives. The code path is gated
by clp->rpc_ops->version < 4 and is therefore reached on NFSv2/v3
remount via nfs_reconfigure(), which calls nfs_probe_server() against
a live mount. Concurrent readers walking server->caps can observe the
cleared state for the duration of the round-trip and report the wrong
case-sensitivity attributes.

Compute the post-probe capability mask on the stack and assign it to
server->caps in a single store so readers see either the stale value
or the freshly computed one, never an intermediate zero. Preserve the
original behaviour of dropping the bits when the pathconf RPC itself
fails.

The analogous transient zero on the NFSv4 path lives in
nfs4_server_capabilities() and is left for a separate fix.

Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260507-case-sensitivity-v14-0-e62cc8200435@oracle.com?part=10
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260515153515.362266-3-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agotools headers UAPI: Sync case-sensitivity flags from linux/fs.h
Chuck Lever [Fri, 15 May 2026 15:35:09 +0000 (11:35 -0400)] 
tools headers UAPI: Sync case-sensitivity flags from linux/fs.h

The case-sensitivity series adds FS_XFLAG_CASEFOLD and
FS_XFLAG_CASENONPRESERVING to include/uapi/linux/fs.h, and
tools/perf/check-headers.sh would warn about the resulting drift
in the perf beauty copy.  Pick up only those two flags (and the
surrounding comment block) so the series does not introduce new
drift of its own.

This is not a full sync.  The perf copy is also missing the
FS_IOC_SHUTDOWN block added by commit 1f662195dbc0 ("fs: add
generic FS_IOC_SHUTDOWN definitions").  Because
tools/perf/check-headers.sh emits a single warning per file, that
warning will remain active until the older drift is picked up
too; closing it is left to a separate sync outside this series.

Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260507-case-sensitivity-v14-0-e62cc8200435@oracle.com?part=2
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260515153515.362266-2-cel@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agoMerge patch series "io_uring related epoll cleanups"
Christian Brauner [Fri, 15 May 2026 15:41:05 +0000 (17:41 +0200)] 
Merge patch series "io_uring related epoll cleanups"

Jens Axboe <axboe@kernel.dk> says:

One of the nastier things about epoll is how it allows nesting contexts
inside each other, leading to the necessity of loop detection and the
issues that have come with that.

I don't believe there's any reason to support nesting on the io_uring
side, in fact IORING_OP_EPOLL_CTL is a historical mistake, imho. But
let's at least try and contain the damage and disallow nested contexts
from our side.

Christian Brauner <brauner@kernel.org> says:

Bring in the eventpoll specific io_uring changes together with the
eventpoll cleanup I did this cycle. The io_uring changes can go on top
of both through the block tree.

* patches from https://patch.msgid.link/20260514140817.623026-1-axboe@kernel.dk:
  eventpoll: rename struct epoll_filefd to epoll_key
  eventpoll: add file based control interface
  eventpoll: export is_file_epoll()
  eventpoll: pass struct epoll_filefd through ep_find() and ep_insert()

Link: https://patch.msgid.link/20260514140817.623026-1-axboe@kernel.dk
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
5 weeks agoeventpoll: rename struct epoll_filefd to epoll_key
Jens Axboe [Thu, 14 May 2026 14:07:20 +0000 (08:07 -0600)] 
eventpoll: rename struct epoll_filefd to epoll_key

This more accurately describes what purpose this structure serves, as
a lookup key.

Suggested-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Link: https://patch.msgid.link/20260514140817.623026-5-axboe@kernel.dk
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agoeventpoll: add file based control interface
Jens Axboe [Thu, 14 May 2026 14:07:19 +0000 (08:07 -0600)] 
eventpoll: add file based control interface

Add do_epoll_ctl_file(), which takes a pre-resolved epoll file and a
struct epoll_filefd for the target rather than two integer file
descriptors. do_epoll_ctl() remains as a thin wrapper.

In preparation for using the file based interface from io_uring.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Link: https://patch.msgid.link/20260514140817.623026-4-axboe@kernel.dk
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agoeventpoll: export is_file_epoll()
Jens Axboe [Thu, 14 May 2026 14:07:18 +0000 (08:07 -0600)] 
eventpoll: export is_file_epoll()

Make is_file_epoll() available outside of epoll. This is in preparation
from using it from io_uring.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Link: https://patch.msgid.link/20260514140817.623026-3-axboe@kernel.dk
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agoeventpoll: pass struct epoll_filefd through ep_find() and ep_insert()
Jens Axboe [Thu, 14 May 2026 14:07:17 +0000 (08:07 -0600)] 
eventpoll: pass struct epoll_filefd through ep_find() and ep_insert()

Have ep_find() and ep_insert() take a struct epoll_filefd rather
than a file/fd tuple. Kill off ep_set_ffd() as it's now no longer
needed.

No functional change. This is a prep patch for adding a file based
do_epoll_ctl() variant.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Link: https://patch.msgid.link/20260514140817.623026-2-axboe@kernel.dk
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agodocs: admin-guide: add IGNORE_DIRS example for cscope
Cheng-Han Wu [Sun, 3 May 2026 10:14:29 +0000 (18:14 +0800)] 
docs: admin-guide: add IGNORE_DIRS example for cscope

The workload tracing guide shows how to build a cscope database by
running cscope command directly. The kernel build system also provides
a cscope target, which supports IGNORE_DIRS for excluding directories
from the generated database.

Mention make cscope and show how to exclude Documentation/ as an example.

Signed-off-by: Cheng-Han Wu <hank20010209@gmail.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260503101429.254394-5-hank20010209@gmail.com>

5 weeks agodocs: admin-guide: clarify perf bench all behavior
Cheng-Han Wu [Sun, 3 May 2026 10:14:28 +0000 (18:14 +0800)] 
docs: admin-guide: clarify perf bench all behavior

The workload tracing guide lists a fixed set of benchmarks for
"perf bench all". This list is stale and can become outdated when
perf adds, removes, or renames benchmark collections or individual
benchmarks.

Describe "perf bench all" as running all available benchmarks in the perf
bench framework instead. Also document how to list the collections and
benchmarks available on a given system.

Signed-off-by: Cheng-Han Wu <hank20010209@gmail.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260503101429.254394-4-hank20010209@gmail.com>

5 weeks agodocs: admin-guide: fix stress-ng command examples
Cheng-Han Wu [Sun, 3 May 2026 10:14:27 +0000 (18:14 +0800)] 
docs: admin-guide: fix stress-ng command examples

The workload tracing guide includes stress-ng command examples with a
stray "command." word at the end. This makes the examples invalid if they
are copied and run directly.

Remove the stray word from the stress-ng example. Also use "--" in the
perf record example to clearly separate perf record options from the
workload command being recorded.

Signed-off-by: Cheng-Han Wu <hank20010209@gmail.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260503101429.254394-3-hank20010209@gmail.com>

5 weeks agodocs: admin-guide: fix typos in workload tracing guide
Cheng-Han Wu [Sun, 3 May 2026 10:14:26 +0000 (18:14 +0800)] 
docs: admin-guide: fix typos in workload tracing guide

Fix several typos in the workload tracing guide:

  - sys_opennat() -> sys_openat()
  - annotate the to view -> annotate the output to view
  - sys_getegid -> sys_getegid()

Signed-off-by: Cheng-Han Wu <hank20010209@gmail.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260503101429.254394-2-hank20010209@gmail.com>

5 weeks agoMerge tag 'pxa1908-dt-for-7.2' of https://codeberg.org/pxa1908-mainline/linux into...
Arnd Bergmann [Fri, 15 May 2026 14:47:09 +0000 (16:47 +0200)] 
Merge tag 'pxa1908-dt-for-7.2' of https://codeberg.org/pxa1908-mainline/linux into soc/dt

PXA1908 DT changes for 7.2

This set consists of a bug fix and three QoL fixes:

* Fix touchscreen breakage in low ambient temperatures on coreprimevelte
* Free up most of the framebuffer memory on coreprimevelte
* Fill in some missing properties for pre-0.2 PSCI and coreprimevelte SDIO

* tag 'pxa1908-dt-for-7.2' of https://codeberg.org/pxa1908-mainline/linux:
  arm64: dts: marvell: samsung-coreprimevelte: Add missing SDIO properties
  arm64: dts: marvell: pxa1908: Add PSCI function IDs
  arm64: dts: marvell: samsung,coreprimevelte: Use memory-region for framebuffer
  arm64: dts: marvell: samsung-coreprimevelte: Increase touchscreen voltage

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
5 weeks agoblock: unexport bio_{set,check}_pages_dirty
Christoph Hellwig [Fri, 15 May 2026 04:55:34 +0000 (06:55 +0200)] 
block: unexport bio_{set,check}_pages_dirty

Only used in built-in code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260515045547.3790129-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 weeks agoblock: unexport blk_status_to_str
Christoph Hellwig [Fri, 15 May 2026 04:55:33 +0000 (06:55 +0200)] 
block: unexport blk_status_to_str

Only used in core block code, so unexport and move the prototype to
blk.h.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260515045547.3790129-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 weeks agoblock: unexport blk_io_schedule
Christoph Hellwig [Fri, 15 May 2026 04:55:32 +0000 (06:55 +0200)] 
block: unexport blk_io_schedule

Only used in built-in code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260515045547.3790129-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 weeks agoblock: remove bio_copy_data_iter
Christoph Hellwig [Fri, 15 May 2026 04:55:31 +0000 (06:55 +0200)] 
block: remove bio_copy_data_iter

Only used by bio_copy_data, so implement that directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260515045547.3790129-3-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 weeks agoblock: remove zero_fill_bio_iter
Christoph Hellwig [Fri, 15 May 2026 04:55:30 +0000 (06:55 +0200)] 
block: remove zero_fill_bio_iter

Only used to implement zero_fill_bio, so directly implement that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260515045547.3790129-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 weeks agoDocumentation: core-api/cpu_hotplug: Remove stale cpu0_hotplug docs
Chao Gao [Thu, 7 May 2026 13:47:31 +0000 (06:47 -0700)] 
Documentation: core-api/cpu_hotplug: Remove stale cpu0_hotplug docs

Commit e59e74dc48a3 ("x86/topology: Remove CPU0 hotplug option")
removed the 'cpu0_hotplug' option, but its documentation remained in
cpu_hotplug.rst. Remove the stale entry.

Reported-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Chao Gao <chao.gao@intel.com>
Message-ID: <20260507134732.254617-1-chao.gao@intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
5 weeks agoscripts/kernel-doc: Detect mismatched inline member documentation tags
Shuicheng Lin [Thu, 7 May 2026 02:32:32 +0000 (02:32 +0000)] 
scripts/kernel-doc: Detect mismatched inline member documentation tags

Add validation in check_sections() to verify that inline member
documentation tags (/** @member: description */) match actual struct/union
member names. Previously, kernel-doc only validated section headers against
the parameter list, but inline doc tags stored in parameterdescs were never
cross-checked, allowing stale or mistyped member names to go undetected.

The new check iterates over parameterdescs keys and warns about any that
don't appear in the parameter list, catching issues like renamed struct
members where the documentation tag was not updated to match.

This catches real issues such as:
  - xe_bo_types.h: @atomic_access (missing struct prefix, should be
    @attr.atomic_access)
  - xe_device_types.h: @usm.asid (member is actually asid_to_vm)

While at it, fix two long-standing issues with named variadic parameters
(macros like ``#define foo(fmt, args...)``) that the new check exposed:

  1. A description provided via the ``@args...:`` doc form was stored
     in parameterdescs under the unstripped key ``args...``, while
     push_parameter() stripped the trailing ``...`` and only added
     ``args`` to parameterlist.  As a result the user-supplied
     description was orphaned, parameterdescs[``args``] was auto-
     populated with the generic "variable arguments" text, and the
     user's actual description was silently discarded by the output
     stage.  Migrate the description from the unstripped to the
     stripped key inside push_parameter() so the user's text reaches
     the output and the new check does not flag the orphaned key.

  2. push_parameter() always auto-populated parameterdescs[param] with
     "variable arguments" for variadic parameters, which bypassed the
     existing "parameter not described" warning at line 549.  As a
     consequence, a named variadic with no matching ``@<name>:`` doc
     tag (or a mistyped one such as ``@args:`` for a parameter named
     ``arg``) went undetected.  Emit the standard "not described"
     warning for named variadics before applying the auto-fill, so
     missing or mistyped variadic docs are reported just like missing
     docs for any other parameter.  The bare ``@...:`` form is
     unaffected because it has no natural name for the user to
     document.

This second hunk surfaces one real pre-existing documentation gap in
include/linux/hashtable.h: hash_for_each_possible_rcu()'s ``cond...``
parameter has no matching ``@cond:`` doc entry.  No false positives were
observed across include/linux, kernel/, or drivers/gpu/drm.

v2: Skip variadic parameters whose documented key ends with ``...`` and
    whose stripped name is in parameterlist, to avoid false-positive
    "Excess function parameter 'args...'" warnings on macros like
    ``#define foo(fmt, args...)`` documented with ``@args...:``.

v3: The v2 special case in check_sections() only suppressed the warning
    while still letting the user's description be silently dropped from
    the generated output.  Replace it with a fix in push_parameter() that
    migrates the description from ``args...`` to ``args`` when the name
    is stripped, so the user's text is preserved end-to-end and the
    new excess-parameter check naturally finds nothing to flag.

v4: Also emit the standard "parameter not described" warning for named
    variadics that have no matching ``@<name>:`` doc tag.  Previously
    push_parameter()'s unconditional auto-fill bypassed that warning,
    so a missing or mistyped variadic doc went undetected. (Randy)

Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260507023232.4108680-1-shuicheng.lin@intel.com>

5 weeks agodocs: Update nosmt support for arm64
Jinjie Ruan [Fri, 17 Apr 2026 03:25:40 +0000 (11:25 +0800)] 
docs: Update nosmt support for arm64

commit eed4583bcf9a6 ("arm64: Kconfig: Enable HOTPLUG_SMT") enable
HOTPLUG_SMT for SMT control for arm64, but the documentation was
not updated accordingly to reflect that ARM64 now supports control SMT
via boot parameter and sysfs knobs:

1. Boot parameters:

nosmt:          Disable SMT, can be enabled via sysfs knobs.
nosmt=force:    Disable SMT, cannot be enabled via sysfs knobs.

2. Runtime sysfs controls:

Write "on", "off", "forceoff" or the number of SMT threads (1, 2, ...)
to /sys/devices/system/cpu/smt/control.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260417032540.3720627-1-ruanjinjie@huawei.com>

5 weeks agodocs: housekeeping: Fix struct member access in code example
Costa Shulyupin [Fri, 1 May 2026 04:38:46 +0000 (07:38 +0300)] 
docs: housekeeping: Fix struct member access in code example

No such array housekeeping_cpumasks

Fix to housekeeping.cpumasks.

Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260501043855.980567-1-costa.shul@redhat.com>

5 weeks agodocs: locking: Fix stale dquot.c path
Costa Shulyupin [Sun, 3 May 2026 16:02:22 +0000 (19:02 +0300)] 
docs: locking: Fix stale dquot.c path

The quota code was moved from fs/dquot.c to fs/quota/dquot.c
in commit 884d179dff3a ("quota: Move quota files into separate
directory"). Update the reference.

Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260503160221.1594319-2-costa.shul@redhat.com>

5 weeks agodrm/msm: Don't use UTS_RELEASE directly
Uwe Kleine-König (The Capable Hub) [Tue, 28 Apr 2026 14:45:53 +0000 (16:45 +0200)] 
drm/msm: Don't use UTS_RELEASE directly

UTS_RELEASE evaluates to a static string and changes quite easily (e.g.
uncommitted changes in the source tree or new commits). So when checking
if a patch introduces changes to the resulting binary each usage of
UTS_RELEASE is source of annoyance.

Instead of using UTS_RELEASE directly use init_utsname()->release which
evaluates to the same string but with that a change of UTS_RELEASE
doesn't affect msm_disp_snapshot_util.o or msm_gpu.o.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Patchwork: https://patchwork.freedesktop.org/patch/721948/
Message-ID: <20260428144553.1103785-2-u.kleine-koenig@baylibre.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
5 weeks agodocs: pt_BR: translate process/license-rules.rst
Daniel Pereira [Sun, 3 May 2026 16:03:50 +0000 (13:03 -0300)] 
docs: pt_BR: translate process/license-rules.rst

Translate the license-rules.rst document into Brazilian Portuguese.
This document provides guidelines on how licenses should be identified
and handled within the kernel source code.

Additionally, update the pt_BR/process/index.rst to include the new
translation in the documentation tree.

Signed-off-by: Daniel Pereira <danielmaraboo@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260503160352.160135-1-danielmaraboo@gmail.com>

5 weeks agokdoc: xforms: move context attrs to function_xforms list
Randy Dunlap [Tue, 5 May 2026 22:15:48 +0000 (15:15 -0700)] 
kdoc: xforms: move context attrs to function_xforms list

The context analysis macros are function attributes that should be
in the function_xforms list. Somewhere along the way they were
inserted into the struct_xforms list instead. This causes docs build
warnings to continue to be emitted for context macros.

Move the context analysis macros to the function_xforms list where
they should be to eliminate these warnings.

Documentation/core-api/kref:328: ../include/linux/kref.h:72: WARNING: Invalid C declaration: Expected end of definition. [error at 96]
  int kref_put_mutex (struct kref *kref, void (*release)(struct kref *kref), struct mutex *mutex) __cond_acquires(true# mutex)
Documentation/core-api/kref:328: ../include/linux/kref.h:94: WARNING: Invalid C declaration: Expected end of definition. [error at 92]
  int kref_put_lock (struct kref *kref, void (*release)(struct kref *kref), spinlock_t *lock) __cond_acquires(true# lock)

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260505221548.163751-1-rdunlap@infradead.org>

5 weeks agodocs: kernel-doc: python: strip __counted_by_ptr macro
Tudor Ambarus [Wed, 6 May 2026 11:04:12 +0000 (11:04 +0000)] 
docs: kernel-doc: python: strip __counted_by_ptr macro

The `__counted_by_ptr` macro was recently introduced [1] to extend
bounds checking semantics to standard dynamically allocated pointers.

However, the new Python implementation of kernel-doc does not currently
recognize it as a compiler attribute. When kernel-doc encounters a
struct member annotated with this macro, it fails to parse the variable
name correctly, resulting in false-positive warnings like:

  Warning: ... struct member '__counted_by_ptr(cmdcnt' not described

Add `__counted_by_ptr` to the `struct_xforms` regex list so it gets
safely stripped out during the parsing phase, mirroring the existing
behavior for `__counted_by`. Update the corresponding unit tests.

Link: https://git.kernel.org/torvalds/c/150a04d817d8
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Kees Cook <kees@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260506-kdoc-__counted_by_ptr-v1-1-70763486871f@linaro.org>

5 weeks agoDocumentation: fix typo and formattting in security/credentials.rst
Mayank Gite [Wed, 6 May 2026 22:59:24 +0000 (18:59 -0400)] 
Documentation: fix typo and formattting in security/credentials.rst

- Fixes a typo in "Keys and keyrings" section. Replaces "keying" with
  "keyring".
- Updates formatting of keyring types.

Signed-off-by: Mayank Gite <drapl0n.kernel@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260506225925.271163-1-drapl0n.kernel@gmail.com>

5 weeks agoMerge branch 'mauro' into docs-mw
Jonathan Corbet [Fri, 15 May 2026 14:06:56 +0000 (08:06 -0600)] 
Merge branch 'mauro' into docs-mw

This series improve the output at process/maintainers: instead of a
pure enriched text, the maintainer's file content is now converted
to a table, and has gained a javascript to allow filtering entries.

The initial patches change the logic to split parsing from
output generation. Then, everything is stored into a dict at
the parsing phase, and ona header description variable.

This way, it is easier to adjust the output handler to produce
a more structured document. Right now, the entries are sorted
alphabetically, per subsystem's name(*).

(*) Currently, MAINTAINERS file has several entries not sorted.
    One has to run:

 scripts/parse-maintainers.pl --input MAINTAINERS --output MAINTAINERS.new

    to sort it.

5 weeks agoio_uring: Use trace_call__##name() at guarded tracepoint call sites
Vineeth Pillai [Fri, 15 May 2026 13:59:03 +0000 (09:59 -0400)] 
io_uring: Use trace_call__##name() at guarded tracepoint call sites

Replace trace_foo() with the new trace_call__foo() at sites already
guarded by trace_foo_enabled(), avoiding a redundant
static_branch_unlikely() re-evaluation inside the tracepoint.
trace_call__foo() calls the tracepoint callbacks directly without
utilizing the static branch again.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Vineeth Pillai (Google) <vineeth@bitbyteword.org>
Assisted-by: Claude:claude-sonnet-4-6
Link: https://patch.msgid.link/20260515135903.2238731-1-vineeth@bitbyteword.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 weeks agoMAINTAINERS: use a URL for pin-init maintainer's profile entry
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:46 +0000 (08:56 +0200)] 
MAINTAINERS: use a URL for pin-init maintainer's profile entry

This maintainer's entry is not inside documentation nor is
ReST, preventing Sphinx to create a hyperlink to it.

Change it to point to the already-formatted URL.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <1bceee886b9027d66bbb48d9d6c8d1250ce8dbcb.1777987028.git.mchehab+huawei@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Acked-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <59144e7323b95166e61a7c7f84096a0b9bb5d26e.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agoMAINTAINERS: make clearer about what's expected for "P" field
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:45 +0000 (08:56 +0200)] 
MAINTAINERS: make clearer about what's expected for "P" field

The "P" field is meant to point to a subsystem maintainer's
profile, stored either at the Kernel documentation or on an
external site. Make it clearer.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <921e5e6a074f9d8cf77483d73e6801f49254bbb8.1777987027.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <21e6def8b69bac36795dcd4047d663bb31407dcb.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: better handle doc wildcards
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:44 +0000 (08:56 +0200)] 
docs: maintainers_include: better handle doc wildcards

As warned by sashiko-bot, the new logic doesn't handle wildcards
on Documentation/.

Change the logic to properly handle it, cleaning up the code
to remove some code duplication.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <eb575072d60c20243afee6f94ef71427ef7b2e79.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: better handle directories
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:43 +0000 (08:56 +0200)] 
docs: maintainers_include: better handle directories

The TOC tree needs to use paths relative to the document containing
the maintainers-profile-toc directive. Fix it.

While here, address a warning from sashiko-bot, which points
that using partition can be problematic if the root Linux path
ends being something like:

    foo/Documentation/linux/

causing the documentation dir to be at:

    foo/Documentation/linux/Documentation

Very unlikely, but fixing it is trivial: just use regex to
pick the last one.

Notice that I dropped the comment about using os.fspath() as
the logic already uses os.path.abspath() which should work
equally well.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <2b07e12eaa07bf81824ad427335783b170e01dba.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: don't ignore invalid profile entries
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:42 +0000 (08:56 +0200)] 
docs: maintainers_include: don't ignore invalid profile entries

Currently, there is a "P" entry for Rust pin-init that is
neither a valid ReST file inside Documentation nor an URL.

A proper fix is to either convert/move the file or point to
a URL. Yet, the parser should be able to pick what's there and
show on its output.

Add a logic to produce a warning when this happens.

Message-ID: <63228e005fcf3dc4583cee06905341e8bce84181.1777987027.git.mchehab+huawei@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <98915f35442fa12c6d59611083aea3adbf8c6aff.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: add a filtering javascript
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:41 +0000 (08:56 +0200)] 
docs: maintainers_include: add a filtering javascript

The maintainers table is big. Add a javascript to allow filtering
it. Such script is only added at the page which contains the
maintainers-include tag.

I opted to keep the search case-sensitive, as, this way,
upper case searches at subsystem.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <c435ef150f5d6ed16570969f43d92ba6fb857842.1777987027.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <6f87c233351595358fddba11d42171be464f0a65.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: properly handle file patterns
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:40 +0000 (08:56 +0200)] 
docs: maintainers_include: properly handle file patterns

handling asterisks inside file patterns atdescription part is
problematic, as ReST has special meaning for them. Due to
that, convert such patterns to literal strings.

Reported-by: Matteo Croce <teknoraver@meta.com>
Fixes: 420849332f9f ("get_maintainer: add ** glob pattern support")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <89127706fb3493d00ecb21e528c8a27081e5ed40.1777987027.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <abd5112fea4dd480f5e72ba46fe60c2463862829.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: store maintainers entries on a dict
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:39 +0000 (08:56 +0200)] 
docs: maintainers_include: store maintainers entries on a dict

Instead of creating just a big output data, store entries inside
a dictionary. Doing that simplifies the parser a little bit
and make the code clearer.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <4ad88179e03436984f29780ae380d50591f86c67.1777987027.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <f7d1a206475ee54f757b2642882013097cb5453a.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: do some coding style cleanups
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:38 +0000 (08:56 +0200)] 
docs: maintainers_include: do some coding style cleanups

Minor coding style adjustments to use the style most python
doc scripts are following.

No functional changes.

Assisted-by: pylint, black
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <460aabd0518f080b34e12fdc0beb7ec7685d5866.1777987027.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <e041be77fcda3f1a54fdb428b3f8703bbce5d6ff.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: clean most SPHINXDIRS=process warnings
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:37 +0000 (08:56 +0200)] 
docs: maintainers_include: clean most SPHINXDIRS=process warnings

building docs with SPHINXDIRS=process is too noisy, as it
generates lots of undefined refs. Fixing it is easy: just let
linkify generate html URLs for the broken links when SPHINXDIRS
is used.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <b57d83081c28aa52683b403f8836d098fcdd8530.1777987027.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <567200712771590d08e4da096b4def92bf729ffe.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: cleanup the code
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:36 +0000 (08:56 +0200)] 
docs: maintainers_include: cleanup the code

Simplify the logic without affecting the output result.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <24a83995778de8710cac40a3089c2f2fe5c38dbd.1777987027.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <5f48bf411925e923d206239a4de0a3e34592de88.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: split state machine on multiple funcs
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:35 +0000 (08:56 +0200)] 
docs: maintainers_include: split state machine on multiple funcs

Instead of one big __init__ code, split the MaintainersParser
code in a way that the state machine remains on __init__, but
the actual parser for descriptions and subsystems are moved
to separate functions.

To make parser easier, instead storing parsed results on a list,
place them directly on a string.

That granted 15% of performance increase(*) with Python 3.14 and
made the logic simpler.

(*) measured by creating a new directory under Documentation/,
    and placing justmaintainers.rst and an index file there,
    building it via sphinx-build-wrapper.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <0b72530cf496ce5e2987ca784058a50f4dc814d2.1777987027.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <26376e92a5e31e5d285b8676ed443a247b42e4c5.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: maintainers_include: keep hidden TOC sorted
Mauro Carvalho Chehab [Sat, 9 May 2026 06:56:34 +0000 (08:56 +0200)] 
docs: maintainers_include: keep hidden TOC sorted

There's no practical difference on keeping it sorted, but
it helps a lot when checking for differences after patches
to the tool.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <e6b302f2826e6a5c0124bb33cc517e8b5888252b.1777987027.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <2742993764f2193101536a1cea40e034d75e0539.1778309595.git.mchehab+huawei@kernel.org>

5 weeks agodocs: reporting-issues: replace "these advices" with "all of this advice"
Chen-Shi-Hong [Thu, 14 May 2026 08:27:33 +0000 (16:27 +0800)] 
docs: reporting-issues: replace "these advices" with "all of this advice"

"Advice" is an uncountable noun, so "these advices" is grammatically
incorrect.

Replace it with "all of this advice" instead, which keeps the sentence
grammatical while also making it clear that it refers to the full set of
recommendations in the paragraph.

Signed-off-by: Chen-Shi-Hong <eric039eric@gmail.com>
Reviewed-by: WangYuli <wangyl5933@chinaunicom.cn>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260514082808.655-1-eric039eric@gmail.com>

5 weeks agodocs: sphinx-static: fix typo "wich" -> "which"
Clinton Phillips [Wed, 13 May 2026 19:59:04 +0000 (15:59 -0400)] 
docs: sphinx-static: fix typo "wich" -> "which"

Trivial typo fix in a CSS comment for the documentation theme.

Signed-off-by: Clinton Phillips <clintdotphillips@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20260513195956.25307-1-clintdotphillips@gmail.com>

5 weeks agoASoC: Intel: sof_sdw: append dai type to dai link name unconditionally
Bard Liao [Fri, 15 May 2026 08:30:43 +0000 (16:30 +0800)] 
ASoC: Intel: sof_sdw: append dai type to dai link name unconditionally

The dai_type is used to select function topologies. Since the topology
stream name and DAI link name use partial matching, unconditionally
appending the dai_type provides necessary selection metadata
without breaking existing topologies.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20260515083043.1864426-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agospi: hisi-kunpeng: Use dev_err_probe() for host registration failure
Qiang Ma [Fri, 15 May 2026 10:26:20 +0000 (18:26 +0800)] 
spi: hisi-kunpeng: Use dev_err_probe() for host registration failure

When the SPI core registers the Kunpeng controller it may need to acquire
chip-select GPIO descriptors. If the GPIO provider has not probed yet,
spi_register_controller() returns -EPROBE_DEFER.

On a Kunpeng system this currently prints an alarming error even though the
next deferred-probe retry succeeds:

  hisi-kunpeng-spi HISI03E1:00: failed to register spi host, ret=-517
  hisi-kunpeng-spi HISI03E1:00: hw version:0x30 max-freq:12500 kHz

Use dev_err_probe() so that -EPROBE_DEFER is reported through the deferred
probe mechanism instead of as a hard error, while preserving normal error
reporting for real registration failures.

Fixes: c770d8631e18 ("spi: Add HiSilicon SPI Controller Driver for Kunpeng SoCs")
Signed-off-by: Qiang Ma <maqianga@uniontech.com>
Link: https://patch.msgid.link/20260515102620.1926930-1-maqianga@uniontech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: Merge up fixes
Mark Brown [Fri, 15 May 2026 13:39:50 +0000 (22:39 +0900)] 
ASoC: Merge up fixes

Merge up the fixes to help CI.

5 weeks agoMerge branch 'docs-fixes' into docs-mw
Jonathan Corbet [Fri, 15 May 2026 13:37:57 +0000 (07:37 -0600)] 
Merge branch 'docs-fixes' into docs-mw

Bring the new security-bugs/threat-model docs in so we can continue to
tweak them here.

5 weeks agocachefiles: Fix error return when vfs_mkdir() fails
Hongling Zeng [Wed, 13 May 2026 10:34:06 +0000 (18:34 +0800)] 
cachefiles: Fix error return when vfs_mkdir() fails

When vfs_mkdir() fails, the error code is not extracted from the
returned error pointer. This causes mkdir_error to be reached with
ret=0, which leads to returning ERR_PTR(0) (NULL) instead of a
proper error pointer.

Fix this by extracting the error code from the error pointer when
vfs_mkdir() fails.

Fixes: 406fad7698f5 ("cachefiles: Fix oops in vfs_mkdir from cachefiles_get_directory")
Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
Link: https://patch.msgid.link/20260513103406.202320-1-zenghongling@kylinos.cn
Signed-off-by: Christian Brauner <brauner@kernel.org>
5 weeks agoarm64: dts: ti: k3-am62-verdin: Add DSI to HDMI adapter overlay
Vitor Soares [Wed, 6 May 2026 14:34:26 +0000 (15:34 +0100)] 
arm64: dts: ti: k3-am62-verdin: Add DSI to HDMI adapter overlay

Add a device-tree overlay for the Toradex DSI to HDMI Adapter, an
accessory that connects to the Verdin DSI_1 interface and provides a
full-size HDMI Type-A output. The adapter is based on the Lontium
LT8912B DSI-to-HDMI bridge.

The overlay is also combined with the Verdin AM62 carrier board device
trees to provide ready-to-use DTBs for the Dahlia and Development Board
carriers, in both WiFi and non-WiFi SoM variants.

Link: https://developer.toradex.com/hardware/accessories/add-ons/dsi-hdmi-adapter
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Link: https://patch.msgid.link/20260506143427.348806-2-ivitro@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
5 weeks agosoc: ti: knav_qmss_queue: Implement resource cleanup in remove()
Md Shofiqul Islam [Wed, 6 May 2026 15:41:14 +0000 (18:41 +0300)] 
soc: ti: knav_qmss_queue: Implement resource cleanup in remove()

Implement the TODO in knav_queue_remove() by stopping PDSPs and
freeing queue regions and queue ranges before disabling runtime PM,
mirroring the cleanup performed in the probe error path.

Set device_ready to false before cleanup to prevent any further
use of the device during teardown.

This ensures resources are released on driver unbind and avoids
leaking queue/region state.

Suggested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
Link: https://lore.kernel.org/linux-arm-kernel/20260506154114.2288-1-shofiqtest@gmail.com/
Signed-off-by: Nishanth Menon <nm@ti.com>
5 weeks agosoc: ti: k3-ringacc: Fix access mode for k3_ringacc_ring_pop_tail_io/proxy
Siddharth Vadapalli [Fri, 1 May 2026 12:40:54 +0000 (18:10 +0530)] 
soc: ti: k3-ringacc: Fix access mode for k3_ringacc_ring_pop_tail_io/proxy

k3_ringacc_ring_pop_tail_io() and k3_ringacc_ring_pop_tail_proxy()
incorrectly use K3_RINGACC_ACCESS_MODE_POP_HEAD instead of
K3_RINGACC_ACCESS_MODE_POP_TAIL. This will result in ring elements being
popped in the reverse order of that which the caller expects. Fix this.

Fixes: 3277e8aa2504 ("soc: ti: k3: add navss ringacc driver")
Cc: stable@vger.kernel.org
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Hari Prasath Gujulan Elango <gehariprasath@ti.com>
Link: https://patch.msgid.link/20260501124129.362192-1-s-vadapalli@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
5 weeks agomedia: i2c: lm3560: Add proper support for LM3559
Svyatoslav Ryhel [Wed, 6 May 2026 06:48:47 +0000 (09:48 +0300)] 
media: i2c: lm3560: Add proper support for LM3559

The LM3559 is very similar to the LM3560, but it operates at much lower
currents. This may result in incorrect current selection if LM3560 ranges
are applied to the LM3559. Implement driver data matching to use
device-specific current configurations.

Since the driver no longer supports platform data and device configuration
is performed more granularly, move the remaining enums from the header
into the driver file and remove the header.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
5 weeks agomedia: i2c: lm3560: Add support for PM features
Svyatoslav Ryhel [Wed, 6 May 2026 06:48:46 +0000 (09:48 +0300)] 
media: i2c: lm3560: Add support for PM features

Add support for power management features to better control the LM3560
within the media framework. To achieve the desired PM support, the HWEN
GPIO and VIN power supply were added and configured into power on/off
sequences. Added PM operations along with the PM configuration setup.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
5 weeks agomedia: i2c: lm3560: Convert to use OF bindings
Svyatoslav Ryhel [Wed, 6 May 2026 06:48:45 +0000 (09:48 +0300)] 
media: i2c: lm3560: Convert to use OF bindings

Since there are no users of this driver via platform data, remove the
platform data support and switch to using Device Tree bindings.

Converting to Device Tree assumes dynamic and independent registration of
LEDs. To monitor the configured LEDs, a bitmap has been added. This makes
LED cleanup more robust and less context dependent.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
5 weeks agomedia: i2c: lm3560: Optimize mutex lock usage
Svyatoslav Ryhel [Wed, 6 May 2026 06:48:44 +0000 (09:48 +0300)] 
media: i2c: lm3560: Optimize mutex lock usage

Pass the device's own mutex lock to the control handler so that the media
framework can handle control access instead of managing it manually. The
lock must be common to both sub-devices since they share same hardware,
so the individual sub-device locks will not work here.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
5 weeks agomedia: i2c: lm3560: Fix v4l2 subdev registration
Svyatoslav Ryhel [Wed, 6 May 2026 06:48:43 +0000 (09:48 +0300)] 
media: i2c: lm3560: Fix v4l2 subdev registration

The existing driver does not call media subdev registration, making it
invisible to the media framework. Since the LM3560 supports two
independent LEDs, register each LED as a separate media entity.

Because registering LEDs before device initialization may cause access
attempts before the hardware is ready, lm3560_init_device has been moved
before the subdevice initializations.

An additional helper, lm3560_subdev_cleanup, was added to release LED0 if
the initialization of LED1 fails, and to deregister both LEDs in the
remove function.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
5 weeks agoMerge tag 'iio-fixes-for-7.1a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Fri, 15 May 2026 11:45:33 +0000 (13:45 +0200)] 
Merge tag 'iio-fixes-for-7.1a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus

Jonathan writes:

iio-fixes-for-7.a IIO: 1st set of fixes for the 7.1 cycle

Usual mixed bag of ancient issues and more recent.
Lots of new contributors this cycle and some of that work has
uncovered bugs in the code they were looking at.

core,buffer
- Add missing dma_fence_put()
- hw-consumer - Fix a use after free in cleaning up a list.
  core,inkern
- Fix return value  handling in iio_read_channel_processed_scale() that
  meant a correct result was treated as an error.

adi,ad3530r
- Fix powerdown mode strings for AD3531 and AD3531R.
adi,ad4695
- Fix ordering so by the time device transitions to offload mode
  all setup transfers are done. This avoids issues with offload
  controllers that cannot handle normal transfers after offload has
  begun.
adi,ad5686
- Fix wrong initialization of reference bit for single channel parts.
- Fix off by one in check on input raw value
adi,adis16260
- Fix division by zero triggerable from sysfs.
adi,adis16550
- Fix a stack leak to userspace.
amlogic,meson-adc
- Fix a buffer allocation leak in an error path.
bosch,bmp280
- Fix a stack leak to userspace.
capella,cm3323
- Fix wrong return value rather than register value being written
  data->reg_conf on write.
maxim,max5821
- Check correct length i2c_master_send() in max5821_sync_powerdown_mode().
mediatek,mt6359
- Fix potential uninitialized value.
nuvoton,npcm_adc
- Fix unbalance clk_disable_unprepare()
nxp,sar-adc
- Avoid a division by zero if the common clock framework is disabled.
- Fix a division by zero triggerable from sysfs.
- Ensure all of struct dma_slave_config is initialized.
qcom,spmi-adc-gen3
- Fix an off by one that leads to an out of bounds array read.
samsung,ssp_sensors
- Ensure work is cancelled during remove to avoid use after free.
sensiron,scd30
- Fix a division by zero triggerable from sysfs.
st,lsm6dsx
- Fix a stack leak to userspace.
st,magn
- Fix default value for data ready pin selection for devices that
  have no data ready pin selection.
vishay,veml6070
- Close a resource leak in an error path.
winsen,mhz19b
- Reject over-sized serial messages from device.
xilinx,xadc
- Fix sequencer handling for dual MUX cases

* tag 'iio-fixes-for-7.1a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (31 commits)
  iio: adc: viperboard: Fix error handling in vprbrd_iio_read_raw
  iio: gyro: itg3200: fix i2c read into the wrong stack location
  iio: dac: ad5686: fix powerdown control on dual-channel devices
  iio: dac: ad5686: acquire lock when doing powerdown control
  iio: temperature: tsys01: fix broken PROM checksum validation
  iio: dac: ad3530r: Fix AD3531/AD3531R powerdown mode strings
  iio: buffer: hw-consumer: fix use-after-free in error path
  iio: dac: ad5686: fix input raw value check
  iio: dac: ad5686: fix ref bit initialization for single-channel parts
  iio: ssp_sensors: cancel delayed work_refresh on remove
  iio: adc: meson-saradc: fix calibration buffer leak on error
  iio: dac: max5821: fix return value check in powerdown sync
  iio: adc: mt6359: fix unchecked return value in mt6358_read_imp
  iio: adc: qcom-spmi-adc5-gen3: Fix off by one in adc5_gen3_get_fw_channel_data()
  iio: imu: adis16550: fix stack leak in trigger handler
  iio: imu: st_lsm6dsx: fix stack leak in tagged FIFO buffer
  iio: pressure: bmp280: fix stack leak in bmp580 trigger handler
  iio: adc: nxp-sar-adc: zero-initialize dma_slave_config
  iio: light: cm3323: fix reg_conf not being initialized correctly
  iio: magnetometer: st_magn: fix default DRDY pin selection for LIS2MDL
  ...

5 weeks agoiio: adc: viperboard: Fix error handling in vprbrd_iio_read_raw
Salah Triki [Thu, 7 May 2026 19:07:51 +0000 (20:07 +0100)] 
iio: adc: viperboard: Fix error handling in vprbrd_iio_read_raw

The driver proceeds to the reception phase even if the preceding
transmission fails.

This uses a goto error label for an early bail out and ensures the mutex is
properly unlocked in case of failure.

Fixes: ffd8a6e7a778 ("iio: adc: Add viperboard adc driver")
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Reviewed-by: Maxwell Doose <m32285159@gmail.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
5 weeks agoiio: gyro: itg3200: fix i2c read into the wrong stack location
David Carlier [Tue, 5 May 2026 13:37:48 +0000 (14:37 +0100)] 
iio: gyro: itg3200: fix i2c read into the wrong stack location

itg3200_read_all_channels() takes `__be16 *buf' as a parameter and
fills the i2c_msg destination as `(char *)&buf'. Since `buf' is the
parameter (a pointer), `&buf' is the address of the local pointer
slot on the stack of itg3200_read_all_channels(), not the address
of the caller's scan buffer. The (char *) cast hides the type
mismatch.

i2c_transfer() therefore writes ITG3200_SCAN_ELEMENTS * sizeof(s16)
= 8 bytes into the parameter's stack slot, which is discarded when
the function returns. The caller's scan buffer in
itg3200_trigger_handler() is never written to, so
iio_push_to_buffers_with_timestamp() pushes uninitialised stack
contents to userspace via /dev/iio:deviceX every scan -- both a
functional bug (no actual gyroscope or temperature data is
delivered through the triggered buffer) and an information leak.

The non-buffered read_raw() path is unaffected: it goes through
itg3200_read_reg_s16() which uses `&out' on a local s16 value,
where that is correct.

Drop the spurious `&' so the i2c read writes into the caller's
buffer.

Fixes: 9dbf091da080 ("iio: gyro: Add itg3200")
Cc: stable@vger.kernel.org
Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
5 weeks agoiio: dac: ad5686: fix powerdown control on dual-channel devices
Rodrigo Alencar [Tue, 5 May 2026 12:35:05 +0000 (13:35 +0100)] 
iio: dac: ad5686: fix powerdown control on dual-channel devices

Fix powerdown control by using a proper bit shift for the powerdown mask
values. During initialization, powerdown bits are initialized so that
unused bits are set to 1 and the correct bit shift is used. Dual-channel
devices use one-hot encoding in the address and that reflects on the
position of the powerdown bits, which are not channel-index based
for that case. Quad-channel devices also use one-hot encoding for the
channel address but the result of log2(address) coincides with the channel
index value. Mask as 0x3U is used rather than 0x3, because shift can reach
value of 30 (last channel of a 16-channel device), which would mess with
the sign bit. The issue was introduced when first adding support for
dual-channel devices, which overlooked powerdown control differences.

Fixes: 7dc8faeab3e3 ("iio: dac: ad5686: add support for AD5338R")
Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
5 weeks agoiio: dac: ad5686: acquire lock when doing powerdown control
Rodrigo Alencar [Tue, 5 May 2026 12:35:04 +0000 (13:35 +0100)] 
iio: dac: ad5686: acquire lock when doing powerdown control

Protect access of pwr_down_mode and pwr_down_mask fields with existing
mutex lock. Each channel exposes their own attributes for controlling
powerdown modes and powerdown state. This fixes potential race conditions
as those the write functions perform non-atomic read-modify-write
operations to those pwr_down_* fields. This issue exists since the ad5686
driver was first introduced.

Fixes: c2f37c8dcadc ("iio: dac: New driver for AD5686R, AD5685R, AD5684R Digital to analog converters")
Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
5 weeks agoiio: temperature: tsys01: fix broken PROM checksum validation
Salah Triki [Tue, 5 May 2026 07:10:24 +0000 (08:10 +0100)] 
iio: temperature: tsys01: fix broken PROM checksum validation

The current implementation of tsys01_crc_valid() incorrectly sums the
first word (n_prom[0]) repeatedly instead of iterating over the 8 words
retrieved from the PROM. This leads to a checksum mismatch and probe
failure on hardware.

According to the TSYS01 datasheet, the PROM consists of 8 words. A valid
check must iterate through all 8 words to verify the integrity of the
calibration data. The current driver only checks the first word 8 times.

Note: This fix was identified during a code audit and is based on
datasheet specifications. It has not been tested on real hardware.

Fixes: 43e53407f680 ("Add tsys01 meas-spec driver support")
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
5 weeks agoiio: dac: ad3530r: Fix AD3531/AD3531R powerdown mode strings
Kim Seer Paller [Tue, 5 May 2026 04:34:32 +0000 (12:34 +0800)] 
iio: dac: ad3530r: Fix AD3531/AD3531R powerdown mode strings

The AD3531/AD3531R has different output operating modes from the
AD3530/AD3530R. According to the AD3531/AD3531R datasheet, the
powerdown modes are:
  01: 500 Ohm output impedance
  10: 3.85 kOhm output impedance
  11: 16 kOhm output impedance

The driver currently uses the AD3530R modes (1k, 7.7k, 32k) for all
variants, which is incorrect for AD3531/AD3531R.

Add AD3531R-specific powerdown mode strings and assign them to the
AD3531/AD3531R chip variants.

Fixes: 93583174a3df ("iio: dac: ad3530r: Add driver for AD3530R and AD3531R")
Signed-off-by: Kim Seer Paller <kimseer.paller@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>