summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-08-05xen/xenbus: log more information when device state got resetMarek Marczykowski-Górecki
Ease diagnosing what actually changed. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <20260803030822.4104093-1-marmarek@invisiblethingslab.com>
2026-08-05thermal: hwmon: Remove hwmon class device along with its parentRafael J. Wysocki
The current code creates one hwmon device per thermal zone type and that device is registered under the first thermal zone of the given type. That turns out to be problematic when the thermal zone holding the hwmon device is removed. For example, say that there are two ACPI thermal zones on a system /sys/devices/virtual/thermal/thermal_zone0/ /sys/devices/virtual/thermal/thermal_zone1/ The current code registers a hwmon class device for thermal_zone0 only: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/ because the type is "acpitz" for both of them, but it adds a sysfs attribute that belongs to thermal_zone1 under it: /sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp2_input There is also /sys/devices/virtual/thermal/thermal_zone0/hwmon0/temp1_input which belongs to thermal_zone0. When thermal_zone0 is removed, say because the ACPI thermal driver is unbound from the underlying platform device, thermal_remove_hwmon_sysfs() skips the removal of hwmon0 because of the temp2_input attribute belonging to thermal_zone1 which effectively prevents thermal_zone0 removal from making progress. Address this by making thermal_remove_hwmon_sysfs() remove the entire hwmon class device interface for the given thermal zone type when the thermal zone device holding it is removed. To prevent races with thermal_add_hwmon_sysfs() that may interfere with this, carry out the entire addition and removal of hwmon sysfs interfaces for thermal zones under thermal_hwmon_list_lock. Also adjust the layout of the labels in thermal_add_hwmon_sysfs() to the current kernel coding style to align with the new "unlock" label. Link: https://lore.kernel.org/linux-pm/20260402021828.16556-1-liujia6264@gmail.com/ Fixes: f6b6b52ef7a5 ("thermal_hwmon: Pass the originating device down to hwmon_device_register_with_info") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/5094738.GXAFRqVoOG@rafael.j.wysocki
2026-08-05Merge tag 'linux-cpupower-7.3-rc1' of ↵Rafael J. Wysocki
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility updates for 7.3-rc1 from Shuah Khan: "Adds support for generic CPPC display that depends only on standardized fields, improving AMD specific implementation for the same. Removes conditional return with no effect as part of tree-wide code clean up effort." * tag 'linux-cpupower-7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: remove conditional return with no effect cpupower: Add libm to cpupower for generic CPPC view cpupower: Print kernel and hardware frequency information cpupower: Build and call CPPC information on non-AMD processors cpupower: Add generic CPPC performance display
2026-08-05ASoC: amd: yc: Add DMI quirk for MSI Raider A18 HX A7VHGZhang Heng
Add a DMI quirk for the MSI Raider A18 HX A7VHG fixing the issue where the internal microphone was not detected. Link: https://bugzilla.kernel.org/show_bug.cgi?id=221574 Signed-off-by: Zhang Heng <zhangheng@kylinos.cn> Link: https://patch.msgid.link/20260805091600.318018-2-zhangheng@kylinos.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-05ASoC: amd: yc: Add DMI quirk for Xiaomi RedmiBook 16 2025Zhang Heng
Add a DMI quirk for the Xiaomi RedmiBook 16 2025 (AMD) fixing the issue where the internal microphone was not detected. Link: https://github.com/thesofproject/linux/issues/5860 Signed-off-by: Zhang Heng <zhangheng@kylinos.cn> Link: https://patch.msgid.link/20260805091600.318018-1-zhangheng@kylinos.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-05ASoC: Intel: Remove obsolete UAPI headersCezary Rojewski
Both target Intel's skylake-driver, previously found in sound/soc/intel which has been removed few years ago and succeeded by the avs-driver. snd_sst_tokens.h is succeeded by uapi/sound/intel/avs/tokens.h skl-tplg-interface.h to the best of my knowledge has no users. Its types are reflected in sound/soc/intel/avs/messages.h and are not intended for public use. Closest public equivalent would be the firmware's processing modules but in such case a user has to compile against Intel's AudioDSP headers, not Linux ones. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20260805064435.429654-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-05Revert "thermal/drivers/hwmon: Cleanup coding style a bit"Rafael J. Wysocki
Revert commit 030a48b0f6ce ("thermal/drivers/hwmon: Cleanup coding style a bit") that introduced a use-after-free into the error path of thermal_add_hwmon_sysfs() by removing a valid check from it. Link: https://lore.kernel.org/linux-hwmon/20260803183915.4ED7D1F000E9@smtp.kernel.org/ Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/5123895.31r3eYUQgx@rafael.j.wysocki
2026-08-05rust: pin-init: add `#[inline]` to small functionsGary Guo
Currently `pin-init` crate is missing many inline annotations. They are all generic so still get inlined in normal builds, but are not inlined in `-C opt-level=s` build. Mark these functions as `#[inline]` so they are considered for inlining regardless. Signed-off-by: Gary Guo <gary@garyguo.net>
2026-08-05rust: pin-init: remove `__pinned_init` method for `cfg(kernel)`Gary Guo
Remove `__pinned_init` for kernel configuration, with all users gone. Still perserve it temporarily as deprecated so other users have time to move off it. Link: https://patch.msgid.link/20260729-merge-init-v2-5-26adf47109e7@garyguo.net Signed-off-by: Gary Guo <gary@garyguo.net>
2026-08-05rust: treewide: replace `__pinned_init` with `raw_[try_]init`Gary Guo
The `__init` method is not designed to be a public API (existence of "__" is a hint for this); replace users with `pin_init::raw_[try_]init` which does the same thing. There are a few users of `__init` which are replaced as well. Acked-by: Miguel Ojeda <ojeda@kernel.org> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260729-merge-init-v2-4-26adf47109e7@garyguo.net Signed-off-by: Gary Guo <gary@garyguo.net>
2026-08-05rust: pin-init: add `raw_init` and `raw_try_init` and recommend over `__init`Gary Guo
The `__init` method is not designed to be a public API (existence of "__" is a hint for this); but currently there is no other API that allows raw initialization on pointers. Add `raw_init` and `raw_try_init` and recommend people to use this instead if raw pointer initialization is needed. Link: https://patch.msgid.link/20260729-merge-init-v2-3-26adf47109e7@garyguo.net [ Renamed from `ptr_[try_]init` to `raw_[try_]init`. - Gary ] Reviewed-by: Benno Lossin <lossin@kernel.org> Signed-off-by: Gary Guo <gary@garyguo.net>
2026-08-05selftests/bpf: Add load-acquire test for dst_reg == src_reg from ctxDaniel Borkmann
Add a verifier test that a load-acquire fetching into its own source register (dst_reg == src_reg) from a ctx pointer is rejected. # LDLIBS=-static PKG_CONFIG='pkg-config --static' ./vmtest.sh -- ./test_progs -t verifier_load_acquire [...] #614/1 verifier_load_acquire/load-acquire, 8-bit:OK #614/2 verifier_load_acquire/load-acquire, 8-bit @unpriv:OK #614/3 verifier_load_acquire/load-acquire, 16-bit:OK #614/4 verifier_load_acquire/load-acquire, 16-bit @unpriv:OK #614/5 verifier_load_acquire/load-acquire, 32-bit:OK #614/6 verifier_load_acquire/load-acquire, 32-bit @unpriv:OK #614/7 verifier_load_acquire/load-acquire, 64-bit:OK #614/8 verifier_load_acquire/load-acquire, 64-bit @unpriv:OK #614/9 verifier_load_acquire/load-acquire with uninitialized src_reg:OK #614/10 verifier_load_acquire/load-acquire with uninitialized src_reg @unpriv:OK #614/11 verifier_load_acquire/load-acquire with non-pointer src_reg:OK #614/12 verifier_load_acquire/load-acquire with non-pointer src_reg @unpriv:OK #614/13 verifier_load_acquire/misaligned load-acquire:OK #614/14 verifier_load_acquire/misaligned load-acquire @unpriv:OK #614/15 verifier_load_acquire/load-acquire from ctx pointer:OK #614/16 verifier_load_acquire/load-acquire from ctx pointer @unpriv:OK #614/17 verifier_load_acquire/load-acquire from ctx pointer, same dst and src register:OK #614/18 verifier_load_acquire/load-acquire from ctx pointer, same dst and src register @unpriv:OK #614/19 verifier_load_acquire/load-acquire with invalid register R15:OK #614/20 verifier_load_acquire/load-acquire with invalid register R15 @unpriv:OK #614/21 verifier_load_acquire/load-acquire from pkt pointer:OK #614/22 verifier_load_acquire/load-acquire from flow_keys pointer:OK #614/23 verifier_load_acquire/load-acquire from sock pointer:OK #614 verifier_load_acquire:OK Summary: 1/23 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/bpf/20260804201917.253491-2-daniel@iogearbox.net Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-05bpf: Check load-acquire src ptr type before the loadDaniel Borkmann
check_atomic_load() calls check_load_mem() before atomic_ptr_type_ok(). For a load-acquire that fetches into its own source register (dst_reg == src_reg), check_load_mem() overwrites src_reg's type with the type of the loaded value, so the subsequent atomic_ptr_type_ok() no longer sees the source pointer and fails to reject the disallowed types (ctx, pkt, flow_keys, sock). Since bpf_convert_ctx_accesses() does not rewrite atomic loads, the raw access to the underlying kernel object is left in place. The destination type is taken from the ctx access itself, so a load-acquire of the sk field of struct __sk_buff for example leaves the register typed as PTR_TO_SOCK_COMMON_OR_NULL, which type_is_sk_pointer() does not match either, while it actually holds unconverted struct sk_buff bytes. Once the NULL check has passed this is a type confusion, not just a leak of kernel data. Validate src_reg with check_reg_arg() and check the source pointer type with atomic_ptr_type_ok() before the load again, mirroring check_atomic_rmw(). Out-of-range register numbers are already rejected earlier by check_and_resolve_insns() (commit 503d21ef8eac ("bpf: Do register range validation early")), and the only exemption there, is_stack_arg_ldx(), requires BPF_LDX | BPF_MEM | BPF_DW and thus never matches a BPF_ATOMIC insn. atomic_ptr_type_ok() can therefore not dereference register state out of bounds, that is, the out-of-bounds read addressed by the Fixes commit below does not reappear (as proven also via selftest). Fixes: c03bb2fa327e ("bpf: Fix out-of-bounds read in check_atomic_load/store()") Reported-by: STAR Labs SG <info@starlabs.sg> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/bpf/20260804201917.253491-1-daniel@iogearbox.net Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-08-05fsnotify: Fix stale object mask after concurrent mark updatesYoungjae Kwon
When a mark gets a new event bit, fanotify and inotify may avoid recalculating the object mask if the cached aggregate already contains that bit. This is racy with a recalculation triggered by a concurrent update to another mark on the same connector. The concurrent scan can read the mark before the new bit is added, while the updater reads the old aggregate before that scan publishes its result. The updater then skips recalculation and the scan publishes a mask without the bit, leaving the object mask stale after both updates complete. This can be reproduced with two fanotify groups watching the same inode: one thread removes FAN_MODIFY from one existing mark while another thread adds FAN_MODIFY to the other mark. After both fanotify_mark() calls return, writes can fail to produce FAN_MODIFY for the group whose mark now contains the bit. This was reproduced on an unmodified v6.12.95 kernel. The equivalent inotify interleaving loses IN_MODIFY events. For normal fanotify additions, recalculate whenever the raw mark mask changes. The normal mask is not cleared asynchronously, so an unchanged addition cannot introduce missing interest. Always recalculate ignore-mask updates because FS_MODIFY handling may clear the ignore mask without taking mark->lock, making snapshot comparisons unreliable. Always recalculate after updating an existing inotify watch. Its replace path temporarily sets mark->mask to zero, so a concurrent scan can observe zero even when the old and final masks are equal. Assigning the replacement mask directly would avoid the transient zero, but existing-watch updates are infrequent, so unconditional recalculation is simpler. Link: https://lore.kernel.org/all/CACwKKmCZdiZDoFuYm6LZhQ=XvHPk0fNKH=X3LmoXMqakYqJaNw@mail.gmail.com/ Fixes: 63c882a05416 ("inotify: reimplement inotify using fsnotify") Fixes: 912ee3946c5e ("fanotify: do not call fanotify_update_object_mask in fanotify_add_mark") Cc: stable@vger.kernel.org # needs adjustments for <= 7.0 Suggested-by: Jan Kara <jack@suse.cz> Suggested-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Youngjae Kwon <yjkwon0026@snu.ac.kr> Link: https://patch.msgid.link/20260802015801.2426818-1-yjkwon0026@snu.ac.kr Signed-off-by: Jan Kara <jack@suse.cz>
2026-08-05drm/ttm: Use common ancestor of evictor and evictee as limit poolNatalie Vock
When checking whether to skip certain buffers because they're protected by dmem.low, we're checking the effective protection of the evictee's cgroup, but depending on how the evictor's cgroup relates to the evictee's, the semantics of effective protection values change. When testing against cgroups from different subtrees, page_counter's recursive protection propagates memory protection afforded to a parent down to the child cgroups, even if the children were not explicitly protected. This prevents cgroups whose parents were afforded no protection from stealing memory from cgroups whose parents were afforded more protection, without users having to explicitly propagate this protection. However, if we always calculate protection from the root cgroup, this breaks prioritization of sibling cgroups: If one cgroup was explicitly protected and its siblings were not, the protected cgroup should get higher priority, i.e. the protected cgroup should be able to steal from unprotected siblings. This only works if we restrict the protection calculation to the subtree shared by evictor and evictee. Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Natalie Vock <natalie.vock@gmx.de> Link: https://patch.msgid.link/20260804-dmemcg-aggressive-protect-v8-6-07af96681bf8@gmx.de
2026-08-05drm/ttm: Be more aggressive when allocating below protection limitNatalie Vock
When the cgroup's memory usage is below the low/min limit and allocation fails, try evicting some unprotected buffers to make space. Otherwise, application buffers may be forced to go into GTT even though usage is below the corresponding low/min limit, if other applications filled VRAM with their allocations first. Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Natalie Vock <natalie.vock@gmx.de> Link: https://patch.msgid.link/20260804-dmemcg-aggressive-protect-v8-5-07af96681bf8@gmx.de
2026-08-05drm/ttm: Split cgroup charge and resource allocationNatalie Vock
Coupling resource allocation and cgroup charging is racy when charging succeeds, but subsequent resource allocation fails. Certain eviction decisions are made on the basis of whether the allocating cgroup is protected, i.e. within its min/low limits, but with the charge being tied to resource allocation (and uncharged when the resource allocation fails), this check is done at a point where the allocation is not actually charged to the cgroup. This is subtly wrong if the allocation were to cause the cgroup to exceed the min/low protection, but it's even more wrong if the same cgroup tries allocating multiple buffers concurrently: In this case, the min/low protection may pass for all allocation attempts when the real min/low protection covers only some, or potentially none of the allocated buffers. Instead, charge the allocation to the cgroup once and keep the charge for as long as we try to allocate a ttm_resource, and only undo the charge if allocating the resource is ultimately unsuccessful and we move on to a different ttm_place. Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Natalie Vock <natalie.vock@gmx.de> Link: https://patch.msgid.link/20260804-dmemcg-aggressive-protect-v8-4-07af96681bf8@gmx.de
2026-08-05drm/ttm: Extract code for attempting allocation in a placeNatalie Vock
Move all code for attempting allocation for a specific place to ttm_bo_alloc_place. With subsequent patches, this logic is going to get more complicated, so it helps readability to have this separate. ttm_bo_alloc_at_place takes a pointer to a struct ttm_bo_alloc_state. This struct holds various state produced by the allocation (e.g. cgroup resource associated with the allocation) that the caller needs to keep track of (and potentially dispose of). This is just the limiting cgroup pool for now, but future patches will add more state needing to be tracked. ttm_bo_alloc_at_place also communicates via return codes if eviction using ttm_bo_evict_alloc should be attempted. This is preparation for attempting eviction in more cases than just force_space being set. No functional change intended. Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Natalie Vock <natalie.vock@gmx.de> Link: https://patch.msgid.link/20260804-dmemcg-aggressive-protect-v8-3-07af96681bf8@gmx.de
2026-08-05cgroup,cgroup/dmem: Add (dmem_)cgroup_common_ancestor helperNatalie Vock
This helps to find a common subtree of two resources, which is important when determining whether it's helpful to evict one resource in favor of another. To facilitate this, add a common helper to find the ancestor of two cgroups using each cgroup's ancestor array. Tested-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Natalie Vock <natalie.vock@gmx.de> Link: https://patch.msgid.link/20260804-dmemcg-aggressive-protect-v8-2-07af96681bf8@gmx.de
2026-08-05cgroup/dmem: Add queries for protection valuesNatalie Vock
Callers can use this feedback to be more aggressive in making space for allocations of a cgroup if they know it is protected. These are counterparts to memcg's mem_cgroup_below_{min,low}. Reviewed-by: Maarten Lankhorst <dev@lankhorst.se> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Natalie Vock <natalie.vock@gmx.de> Link: https://patch.msgid.link/20260804-dmemcg-aggressive-protect-v8-1-07af96681bf8@gmx.de
2026-08-05batman-adv: bla: fix freeing of claims on meshif deletionSven Eckelmann
When the mesh interface is getting deleted, then batadv_bla_del_backbone_claims() (via batadv_bla_purge_backbone_gw()) could make sure that all claims gets removed. But this function is only executed when bat_priv->bla.claim_hash is not NULL. And since batadv_bla_free() is always setting it to NULL before it is (indirectly) called, it was never actually executed. But the batadv_bla_purge_claims() -> batadv_handle_unclaim() is at the moment too fragile because the BLA code is not handling the rehashing in batadv_bla_update_orig_address(). The stored backbone address doesn't have to be the one actually used for the hash bucket selection during the initial adding of the backbone. The batadv_handle_unclaim() can therefore fail to find the respective backbone for the unclaim and then stop the deletion. But the actual backbone_gw object is not needed for the unclaim because all relevant information is always provided by the caller. And the check for the existence of the backbone_gw doesn't provide any additional security check for the deletion of a claim. Cc: stable@kernel.org Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05rtla/cli: Unify and improve handling of invalid option argumentsTomas Glozar
The current handling of invalid command line option arguments is inconsistent: - opt_llong_callback() treats non-numerical input the same as "-1", which might or might not be rejected later. - opt_int_callback() returns -1 on non-numerical input without an error message, which makes parsing fail silently (libsubcmd will automatically print the usage of the option only, no error message). - custom callbacks abort command line parsing using fatal(), which displays an error message and exits, without libsubcmd printing the usage. Unify this such that all invalid options, regardless of the format, print an error message similar to the out of range case: Error: --opt: 'value' is not a valid XY followed by the usage of the option, e.g.: $ rtla timerlat hist --period=1us Error: --period: '1us' is not a valid number Usage: rtla timerlat hist [<options>] [-h|--help] -p, --period <us> timerlat period in us As this is a libsubcmd help path, all option parsing failures now return the exit code of 129 (help). The unified handling is implemented using a new error message helper, opt_err(), which is called from two new CLI-specific parsing functions, strtoll_safe() and strtoi_safe(), as well as from custom helpers. Option callback tests are updated to cover the new behavior. Assisted-by: Claude:claude-opus-4-6 Reviewed-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/r/20260716144901.1187474-1-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2026-08-05rtla/cli: Unify and improve range validation logicTomas Glozar
Several RTLA options do range validation inside the CLI parser layer (e.g. -p/--period). When RTLA migrated CLI parsing to libsubcmd, this logic was moved unchanged inside opt_*() callbacks. Unify range validation so that all options use two newly added functions, check_llong_range() and check_int_range(), to validate the range. The new range validation returns -1 from opt_*() callbacks rather than hard-exit with fatal(), allowing the help message for the specific option to be automatically displayed by libsubcmd logic. Many options no longer need a custom callback, as they use the unified range validation of opt_llong_callback() and opt_int_callback(). Validation for several other options is improved: - timerlat -p/--period: lower bound raised from 1 to 100 us to match the kernel's timerlat_min_period in trace_osnoise.c. - timerlat -A/--aligned: reject negative values. - timerlat --deepest-idle-state: add range [-1, INT_MAX]; previously, values <= -2 were read as "option not set". - timerlat -p/--period, -A/--aligned, -b/--bucket-size: properly reject negative values instead of passing them to the tracer. Remove unit tests for removed callbacks and test the new range validation functionality of opt_llong_callback() and opt_int_callback(). Update runtime tests for histogram options to account for the new error messages and exit value. Assisted-by: Claude:claude-opus-4-6 Link: https://lore.kernel.org/r/20260710131554.338335-1-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2026-08-05rtla/tests: Test all tracer options in runtime testsTomas Glozar
Currently, runtime tests only test the osnoise period option (-p/--period of rtla-osnoise tools, backed by /sys/kernel/tracing/osnoise/period_us), using the check_with_osnoise_options function together with a hack relying on long period (pre-set) timing out if RTLA fails to reset it to the default value. Extend tracer option testing to all options used by RTLA; test both RTLA setting the default option by pre-setting the tracer to a different value and user-requested value. The tests are done using a script that reads the tracer values inside an --on-threshold action, like existing tests for runtime behavior already do. check_with_osnoise_option is modified to support grep filters, so that it can be used together with the script pattern. Assisted-by: Claude:claude-opus-4-6 Link: https://lore.kernel.org/r/20260709091755.58265-1-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2026-08-05Documentation/rtla: Document unsetting optionsTomas Glozar
Add an appendix documenting how to unset options in RTLA. For options where unsetting is currently not supported, add a note into the respective section. An additional note is added for --on-threshold trace. As it is considered distinct from --trace, it is not reverted by --no-trace. Reviewed-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/r/20260629083654.1548925-4-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2026-08-05rtla: Add unit tests for CLI with unsetTomas Glozar
Test parsing of command line that sets an option and then unsets it back to the default value in all tools. Only two CLI tests are added for each tool: short period option (-p ... --no-period) and long period option (--period ... --no-period). The logic specific for individual options is tested in opt callback tests already. Reviewed-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/r/20260629083654.1548925-3-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2026-08-05rtla: Add unit tests for unset in opt callbacksTomas Glozar
Test for each opt callback that implements the unset option whether the option sets the specified default value back correctly. Reviewed-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/r/20260629083654.1548925-2-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2026-08-05rtla: Allow unsetting non-list custom-callback CLI optionsTomas Glozar
libsubcmd implicitly allows the user to unset already set options using a "no-" prefix for long options. For example, if I set the period like this: $ rtla timerlat -D Loading BPF program reading osnoise/timerlat_period_us returned 1000 setting osnoise/timerlat_period_us to 1000 reading osnoise/print_stack returned 0 setting osnoise/print_stack to 0 ... <timerlat top> it can be unset by a subsequent --no-debug: $ rtla timerlat -D --no-debug ... <timerlat top> Currently, this works only for boolean options. Extend the feature for all options by implementing handling of the "unset" argument in opt_*() callbacks defined in cli_p.h, except for list options, i.e. options that can be passed multiple times (--event, --filter, --trigger, --on-threshold, --on-end). This allows, for example, unsetting of int/long long options, e.g. "-p": $ rtla timerlat -D -p100 --no-period ... setting osnoise/timerlat_period_us to 1000 ... By default, options in params struct are reset to zero. A constant is added for every parameter with a different default value, which is then used both in <tool>_hist_args() while setting the initial value and in opt_*() when unsetting the option. This refactoring ensures there is no duplicate "magic number". The default value for opt_llong_callback() and opt_int_callback() is passed in struct option's defval field; new macros RTLA_OPT_{LLONG,INT}{,_DEFVAL} are added to define the field conveniently. The default value for other callbacks is hardcoded inside each callback's unset logic. Reviewed-by: Wander Lairson Costa <wander@redhat.com> Link: https://lore.kernel.org/r/20260629083654.1548925-1-tglozar@redhat.com Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2026-08-05ALSA: hda/realtek: Limit Legion AW88399 playback to stereoAaron Ma
The Legion AW88399 speaker routing sends a stereo FL/FR stream to both speaker pairs. A four-channel stream leaves the front pair silent, so advertising four channels exposes an unusable playback mode. Limit the analogue PCM and the multi-output runtime constraint to two channels for the affected Legion codec SSIDs. This exposes the usable stereo configuration and rejects four-channel playback. Signed-off-by: Aaron Ma <mapengyu@gmail.com> Reviewed-by: Marco Giunta <marco_giunta@outlook.it> Tested-by: Marco Giunta <marco_giunta@outlook.it> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260804185325.22861-2-mapengyu@gmail.com
2026-08-05ALSA: hda/realtek: Fix headset mic on Legion AW88399 laptopsAaron Ma
The ALC287 codec on Lenovo Legion AW88399 laptops does not mark the combo-jack microphone as a headset mic, so the HDA parser treats it as a plain microphone. The headset microphone route and inline headset buttons are therefore unavailable. Enable Realtek headset mode without treating the jack as a headphone microphone, and enable headset jack button handling. Suppress automatic microphone selection so the internal microphone remains selectable while a headset is connected. The existing 0x1d override is redundant: firmware already marks that pin unused, and the override triggers a "SKU not ready 0x411111f0" warning. Drop it. Signed-off-by: Aaron Ma <mapengyu@gmail.com> Reviewed-by: Marco Giunta <marco_giunta@outlook.it> Tested-by: Marco Giunta <marco_giunta@outlook.it> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260804185325.22861-1-mapengyu@gmail.com
2026-08-05batman-adv: mcast: linearize skbuff for packet generationSven Eckelmann
batadv_mcast_forw_packet() and batadv_mcast_forw_scrape() is not only called (indirectly) by the unsharing+linearizing batadv_recv_mcast_packet() handler. When it is called (indirectly) by batadv_mcast_forw_mcsend() then it will be unshared but not linearized. The SKB_LINEAR_ASSERT() can therefore cause a fatal BUG(). The linearization should happen during the expansion of the head because the scrape function can be hit already during the initial batadv_mcast_forw_mode() selection code: * batadv_interface_tx * batadv_mcast_forw_mode * batadv_mcast_forw_mode_by_count() * batadv_mcast_forw_push() -> calls batadv_mcast_forw_expand_head() before everything else * batadv_mcast_forw_push_tvlvs() * batadv_mcast_forw_push_dests() * batadv_mcast_forw_push_adjust_padding() * batadv_mcast_forw_scrape() Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Fixes: 90039133221e ("batman-adv: mcast: implement multicast packet generation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05batman-adv: mcast: ensure unshared skb for multicast packetsSven Eckelmann
When a packet is transmitted via a batman-adv interface and has already enough room for the header then nothing will make sure that the skbuff is unshared. But it is not allowed to modify a currently shared skbuff. Always make sure that the pskb_expand_head() is not only called for a too small header but also for shared skbuffs. Cc: stable@vger.kernel.org Fixes: 90039133221e ("batman-adv: mcast: implement multicast packet generation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05batman-adv: fix TX priority extraction for BATADV_FORW_MCASTSven Eckelmann
batadv_mcast_forw_mode_by_count() pushs the skb->data for BATADV_FORW_MCAST forwarding via batadv_mcast_forw_mcsend(). But the batadv_skb_set_priority() expects the ethernet header directly before (skb->data + offset). With the moved skb->data, just some random data would be accessed to get the priority data. Move the batadv_skb_set_priority() before the decision about the handling multicast packets and potential header modifications. Cc: stable@vger.kernel.org Fixes: 90039133221e ("batman-adv: mcast: implement multicast packet generation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05batman-adv: dat: atomically update mac addressesSven Eckelmann
When a MAC address is updated in batadv_dat_entry_add(), it is done using a simple copy function. A parallel reader might only see parts of this update. In worst case, the reader is transporting the half updated MAC address over the network or is creating an ARP response using it - poisoning the ARP cache. atomic64_t can be used to store the 48 bit of a mac address. A reader will then either see the old mac address or the new one - never a mixture of both. Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Fixes: 2f1dfbe18507 ("batman-adv: Distributed ARP Table - implement local storage") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05batman-adv: dat: avoid unaligned fault in IP extractionSven Eckelmann
Independent of the alignment of the ARP packet in the SKB, either the batadv_arp_ip_src or the batadv_arp_ip_dst will have an unaligned access (on HW without native unaligned read support). Use get_unaligned() to handle this properly on all architectures. Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Fixes: 5c3a0e553593 ("batman-adv: Distributed ARP Table - add ARP parsing functions") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05batman-adv: bla: prevent CRC corruptions after claim flushSven Eckelmann
When batadv_bla_del_backbone_claims() tried to remove all claims of a backbone, it sets the CRC to 0. It assumes that the it had the last reference of the claims because batadv_claim_release() (which runs after the last reference was released), is XORing the crc16 of the claim address with the backbone CRC. If there would be a parallel holder of any of these references, it could happen that the backbone CRC is (0 ^ crc16(delayed_released_claim)). Which is the wrong starting point for the new claims it may receive when the remote answers the claim request from batadv_bla_send_request(). This reinitializations can be completely dropped to avoid this problem. batadv_claim_release() will take care of fixing the backbone CRC. Cc: stable@vger.kernel.org Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05batman-adv: bla: avoid CRC corruption due to parallel claim addSven Eckelmann
batadv_bla_add_claim() is used to add claims and modify the backbone of claims for CLAIM frames from remote backbones and local packets. When it handles a claim, it needs to either * add the new claim's CRC to the backbone CRC * remove the already existing claim's CRC from the old backbone and add it to the new backbone But when the "new" claim code was running in parallel to the "change backbone" code, it can happen that the CRC was invalid because the backbone_gw of the claim was changed twice in the "new" claim code path: * CPU0 creates the claim for gateway A and publishes it in the claim hash. The crc16 of the address has not yet been added to A's crc at this point. * CPU1 processes a claim frame of gateway B for the same client, finds the just published claim, and performs the ownership change: it switches the pointer to B, removes the crc16 from A's crc - which never contained it - and adds it to B's crc. * CPU0 continues behind the creation branch, unconditionally switches the pointer back to A without compensating B's crc (its remove_crc is false for the creation path), and finally adds the crc16 to A's crc The CRC is then wrong for both: * claim belongs to A: but CRC is not part of backbone A's CRC * claim doesn't belong to B: CRC is still part of backbone B's CRC This wrong CRC is never recomputated from the stored claims. For local backbone claims, this can also not recovered using syncs. To avoid this, split the functionality in clear separate parts: * new claim which always adds claim CRC to the backbone CRC (but never changes the already set backbone_gw of the claim back) * update of existing claim which automatically changes the backbone_gw entry and only updates both backbone CRCs when there was an actual change Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05batman-adv: fix stale receive device on merged fragmentsZhiling Zou
Fragment reassembly reuses the skb from the highest-numbered buffered fragment as the merged packet. When that fragment was received on a hard interface which is deleted before the chain completes, the merged skb can re-enter the receive path with a stale skb->dev and skb_iif. batadv_batman_skb_recv() passes such merged packets through the normal receive handlers again. DAT and bridge loop avoidance both derive the ARP header length from skb->dev, so they can dereference the freed net_device before the packet reaches the local mesh interface. Refresh the receive device metadata from the current receive device before running the packet handlers. This keeps internally reinjected merged fragments consistent with the normal receive path after hard interface teardown. Fixes: 610bfc6bc99b ("batman-adv: Receive fragmented packets and merge") Cc: stable@vger.kernel.org Reported-by: Vega <vega@nebusec.ai> Signed-off-by: Zhiling Zou <zhilinz@nebusec.ai> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05batman-adv: remove negative returns for batadv_send_skb_unicastSven Eckelmann
The kernel documentation for batadv_send_skb_unicast() states that only the return values NET_XMIT_DROP and NET_XMIT_SUCCESS are valid. Functions like batadv_dat_snoop_incoming_arp_request() are only checking if the return is not NET_XMIT_DROP to check if send was successful or not. Negative values were therefore also handled as success. Similar functions are not returning the batadv_send_skb_to_orig() return value directly but are checking if it is a direct success and only then marking the return as such. This must also be adopted for batadv_send_skb_unicast(). The callers of this function are mostly not affected. Only packet counting in batadv_dat_snoop_incoming_arp_request() will now work as expected in case of a negative return value from batadv_send_skb_to_orig(). Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05ALSA: FCP: do not copy out an uninitialised init responseBaul Lee
fcp_ioctl_init() allocates its response buffer with kmalloc() and copies the whole buffer back to userspace: buf_size = init.step0_resp_size + init.step2_resp_size; void *resp __free(kfree) = kmalloc(buf_size, GFP_KERNEL); ... if (copy_to_user(arg->resp, resp, buf_size)) return -EFAULT; Nothing clears the buffer, and the only writer of its leading step0_resp_size bytes is the step-0 control transfer: err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), FCP_USB_REQ_STEP0, USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN, 0, private->bInterfaceNumber, step0_resp, private->step0_resp_size); if (err < 0) return err; usb_fill_control_urb() does not set URB_SHORT_NOT_OK, so a short or zero-length data stage completes with status 0 and snd_usb_ctl_msg() returns a small actual_length. The only check is err < 0, so a short transfer is accepted as success. snd_usb_ctl_msg() copies the full size back unconditionally: buf = kmemdup(data, size, GFP_KERNEL); ... memcpy(data, buf, size); Bytes the device never wrote are therefore restored into resp unchanged and copied to userspace. step0_resp_size and step2_resp_size are each validated only to 1..255, so the caller also picks the slab cache, from kmalloc-8 up to kmalloc-512. On 7.2.0-rc5 (arm64), device answering step 0 with a zero-length data stage, s0 = s2 = 255: # init_on_alloc off, no spray step0 window [0,255): nonzero=94/255 000: 00 80 60 06 00 00 ff ff 18 00 00 00 57 01 ea 01 010: 08 78 22 13 00 00 ff ff a8 c4 5f 80 00 80 ff ff # same kernel, kmalloc-512 pre-seeded with an 8-byte tag step0 window [0,255): nonzero=219/255 tagbytes=232 # identical run, init_on_alloc=1 step0 window [0,255): nonzero=0/255 tagbytes=0 # all three runs step2 window [255,510): device words matched=62/62 a8 c4 5f 80 00 80 ff ff is the little-endian kernel text address ffff8000805fc4a8. The step-2 window is unaffected, so the disclosure is exactly the step-0 region. Zero the buffer, and require the step-0 transfer to deliver the full step0_resp_size bytes so a short data stage is reported as an error. Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com> Fixes: 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver") Reported-by: Federico Kirschbaum <federico.kirschbaum@xbow.com> Reported-by: Baul Lee <baul.lee@xbow.com> Cc: stable@vger.kernel.org Signed-off-by: Baul Lee <baul.lee@xbow.com> Link: https://patch.msgid.link/20260805013804.38839-1-baul.lee@xbow.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-05ALSA: usx2y: bound the hwdep mmap fault offsetBaul Lee
snd_us428ctls_vm_fault() turns the faulting page offset into a kernel address with no bound of any kind: offset = vmf->pgoff << PAGE_SHIFT; vaddr = (char *)(...)->us428ctls_sharedmem + offset; page = virt_to_page(vaddr); get_page(page); vmf->page = page; return 0; snd_us428ctls_mmap() checks only the length of the mapping, never the offset, and us428ctls_sharedmem is a single page from alloc_pages_exact(). For a character device file_mmap_size_max() returns ULONG_MAX, so the mm layer imposes no ceiling either. Every page offset above zero resolves to a struct page outside the object, and the handler installs it into the caller's address space read-write; the vma is not marked read-only. The caller picks the page frame with a single mmap() argument and gets read-write access to a page of kernel memory it does not own; an offset that lands in an unpopulated vmemmap region oopses instead. A process that can open the hwdep node of an attached US-X2Y reaches this after loading the FPGA image through the same node; no capability check is involved. On 7.2.0-rc5 (arm64), mmap() with a large offset: Unable to handle kernel paging request at virtual address fffffdffc45d5ac8 pc : snd_us428ctls_vm_fault+0x68/0x140 [snd_usb_usx2y] Call trace: snd_us428ctls_vm_fault+0x68/0x140 [snd_usb_usx2y] __do_fault __handle_mm_fault handle_mm_fault el0_da Reject any offset outside the shared region. The pcm hwdep handler in usx2yhwdeppcm.c computes its address the same way and needs the same bound. Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Federico Kirschbaum <federico.kirschbaum@xbow.com> Reported-by: Baul Lee <baul.lee@xbow.com> Cc: stable@vger.kernel.org Signed-off-by: Baul Lee <baul.lee@xbow.com> Link: https://patch.msgid.link/20260805013445.38283-1-baul.lee@xbow.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-05ALSA: usb-audio: fix OOB write on Type II inbound URBsBaul Lee
data_ep_set_params() sizes each URB transfer buffer before it adds the Format Type II transfer delimiter: u->packets = urb_packs; u->buffer_size = maxsize * u->packets; if (fmt->fmt_type == UAC_FORMAT_TYPE_II) u->packets++; /* for transfer delimiter */ u->urb = usb_alloc_urb(u->packets, GFP_KERNEL); buffer_size is computed from the pre-increment packet count and never recomputed, so for a Type II endpoint the buffer is one packet short of the packet count the URB is built with. prepare_inbound_urb() then lays out one iso frame per packet and never consults buffer_size: offs = 0; for (i = 0; i < urb_ctx->packets; i++) { urb->iso_frame_desc[i].offset = offs; urb->iso_frame_desc[i].length = ep->curpacksize; offs += ep->curpacksize; } urb->transfer_buffer_length = offs; urb->number_of_packets = urb_ctx->packets; The last descriptor therefore points one packet past the end of the transfer buffer, where the host controller writes device data on every inbound transfer. prepare_silent_urb() and prepare_playback_urb() bound their fill loops by ctx->buffer_size, so only capture is affected. fmt_type comes from the device's audio streaming descriptors, so any device advertising a Type II capture format hits this once userspace sets hw_params on the stream. KASAN on 7.2.0-rc5 (arm64) with a dummy_hcd/raw-gadget device, one report per inbound transfer: BUG: KASAN: slab-out-of-bounds in dummy_timer Write of size 64 at addr ffff0000186171c0 by task cons02/166 __asan_memcpy dummy_timer hrtimer_run_softirq Allocated by task 166: usb_alloc_coherent snd_usb_endpoint_set_params The buggy address is located 0 bytes to the right of allocated 64-byte region [ffff000018617180, ffff0000186171c0) Compute buffer_size after the delimiter packet has been accounted for, and bound the fill loop by buffer_size, as prepare_silent_urb() already does on the outbound side. This grows every Type II URB allocation by one maxsize packet. Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com> Fixes: 8fdff6a319e7 ("ALSA: snd-usb: implement new endpoint streaming model") Reported-by: Federico Kirschbaum <federico.kirschbaum@xbow.com> Reported-by: Baul Lee <baul.lee@xbow.com> Cc: stable@vger.kernel.org Signed-off-by: Baul Lee <baul.lee@xbow.com> Link: https://patch.msgid.link/20260805013441.38245-1-baul.lee@xbow.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-05ALSA: bcd2000: clear the URB pointers on disconnectBaul Lee
bcd2000_free_usb_related_resources() frees both URBs and leaves the pointers behind: usb_kill_urb(bcd2k->midi_out_urb); usb_kill_urb(bcd2k->midi_in_urb); usb_free_urb(bcd2k->midi_out_urb); usb_free_urb(bcd2k->midi_in_urb); The rawmidi device outlives that call. A substream that is still open when the device is unplugged reaches bcd2000_midi_send() from the trigger path on close. That function writes to the freed URB and then hands it to the USB core: bcd2k->midi_out_urb->transfer_buffer_length = BUFSIZE; ... ret = usb_submit_urb(bcd2k->midi_out_urb, GFP_ATOMIC); usb_kill_urb() does not stop a later submission either, so a submit that races the disconnect can requeue the URB after it has been reaped. midi_in_urb is exposed the same way: bcd2000_input_complete() resubmits it from the completion handler. KASAN on 7.2.0-rc5 (arm64): BUG: KASAN: slab-use-after-free in bcd2000_midi_send [snd_bcd2000] Write of size 4 at addr ffff00001827d388 by task bpoc/168 __asan_store4 bcd2000_midi_send [snd_bcd2000] bcd2000_midi_output_trigger [snd_bcd2000] snd_rawmidi_kernel_write1 close_substream.part.0 Freed by task 168: usb_free_urb bcd2000_disconnect [snd_bcd2000] BUG: KASAN: slab-use-after-free in usb_submit_urb Read of size 8 at addr ffff00001827d3b8 by task bpoc/168 Clear both pointers after freeing and test them on the paths that can still run. Poison the URBs before freeing them: usb_poison_urb() waits for a running completion handler and rejects any later submission, so after it returns the input path is quiesced and only the rawmidi trigger path can still reach bcd2000_midi_send(). No unpoison is needed; the URBs are freed on the next line. Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com> Fixes: b47a22290d58 ("ALSA: MIDI driver for Behringer BCD2000 USB device") Reported-by: Federico Kirschbaum <federico.kirschbaum@xbow.com> Reported-by: Baul Lee <baul.lee@xbow.com> Cc: stable@vger.kernel.org Signed-off-by: Baul Lee <baul.lee@xbow.com> Link: https://patch.msgid.link/20260805013428.38204-1-baul.lee@xbow.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-05ALSA: 6fire: bound the MIDI event length from the deviceBaul Lee
usb6fire_comm_receiver_handler() forwards a MIDI event using a length byte the device supplies, with no bound and no check that the transfer delivered that many bytes: if (!urb->status) { if (rt->receiver_buffer[0] == 0x10) /* midi in event */ if (midi_rt) midi_rt->in_received(midi_rt, rt->receiver_buffer + 2, rt->receiver_buffer[1]); } receiver_buffer is a 64-byte kzalloc() buffer (COMM_RECEIVER_BUFSIZE), so only 62 bytes follow the two-byte header. receiver_buffer[1] is a u8 the device chooses, so a device that answers with 0x10 and a length of 0xFF makes snd_rawmidi_receive() read 255 bytes starting two bytes into a 64-byte object. The bytes past the buffer are handed to userspace through the rawmidi read path. urb->actual_length is not consulted either, so a short transfer leaves both the type byte and the length byte at their previous values and the handler acts on stale data. The receiver URB is submitted from usb6fire_comm_init() at probe, so the read happens on plug with no user action; forwarding to userspace also needs a MIDI input substream open, since usb6fire_midi_in_received() only calls snd_rawmidi_receive() when rt->in is set. KASAN on 7.2.0-rc5 (arm64), single packet from an emulated device: BUG: KASAN: slab-out-of-bounds in snd_rawmidi_receive Read of size 255 at addr ffff000009f64682 by task bash/183 __asan_memcpy snd_rawmidi_receive usb6fire_midi_in_received [snd_usb_6fire] usb6fire_comm_receiver_handler [snd_usb_6fire] Allocated by task 11: usb6fire_comm_init [snd_usb_6fire] usb6fire_chip_probe [snd_usb_6fire] The buggy address is located 2 bytes inside of allocated 64-byte region [ffff000009f64680, ffff000009f646c0) Reject the event when the length exceeds the bytes that follow the header, and require the transfer to have delivered the header plus that many bytes. The receiver URB is submitted with a 64-byte transfer_buffer_length, so a genuine device cannot deliver an event longer than those 62 bytes and nothing valid is dropped. Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com> Fixes: c6d43ba816d1 ("ALSA: usb/6fire - Driver for TerraTec DMX 6Fire USB") Reported-by: Federico Kirschbaum <federico.kirschbaum@xbow.com> Reported-by: Baul Lee <baul.lee@xbow.com> Cc: stable@vger.kernel.org Signed-off-by: Baul Lee <baul.lee@xbow.com> Link: https://patch.msgid.link/20260805013423.38175-1-baul.lee@xbow.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-05ALSA: control: add ioctl to retrieve full card componentsMaciej Strozek
The fixed-size components field in SNDRV_CTL_IOCTL_CARD_INFO can be too small on systems with many audio devices. Keep the existing struct snd_ctl_card_info ABI intact and add a new ioctl SNDRV_CTL_IOCTL_CARD_BYTES that carries a variable-length payload selected by a type discriminator. The first defined type SND_CTL_CARD_BTYPE_COMPONENTS returns the full components string. The ioctl is designed to be reused for other variable-length card payloads in the future. The user-space caller may set data_allocated == 0 (or data == NULL) to query the required length; otherwise the kernel copies the payload into the user buffer and writes back the actual length in data_len. When the legacy components field in struct snd_ctl_card_info is truncated, '>' is written just before the NUL terminator to signal to user-space that the full string is available via the new ioctl. card->components is now dynamically allocated and grown in 32 byte increments via krealloc(), capped at 512 bytes. Link: https://github.com/alsa-project/alsa-lib/pull/494 Suggested-by: Jaroslav Kysela <perex@perex.cz> Suggested-by: Takashi Iwai <tiwai@suse.com> Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260720103505.1860399-2-mstrozek@opensource.cirrus.com
2026-08-05ALSA: control: tidy up whitespacesMaciej Strozek
Clean up trailing whitespace in preparation for the card components changes. Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260720103505.1860399-1-mstrozek@opensource.cirrus.com
2026-08-05batman-adv: correct NET_RX_* NET_XMIT_* confusionSven Eckelmann
batadv_recv_icmp_ttl_exceeded() is a receive function. It must therefore return NET_RX_* and not NET_XMIT_*. And batadv_send_skb_to_orig() is an xmit function and is returning NET_XMIT_*. This doesn't change the behavior because both NET_RX_SUCCESS and NET_RX_SUCCESS are using the same underlying value (0). Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05batman-adv: handle errors in batadv_init()Minhong He
batadv_init() ignores errors from several initialization helpers, so the module can load without those registrations in place. Check the fallible init steps and unwind prior initialization in reverse order of acquisition on failure. Signed-off-by: Minhong He <heminhong@kylinos.cn> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-08-05drm/bridge: remove unneeded 'fast_io' parameter in regmap_configWolfram Sang
When using MMIO with regmap, fast_io is implied. No need to set it again. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20260705163536.1850-6-wsa+renesas@sang-engineering.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
2026-08-05gpu: nova-core: pass WPR metadata ownership to FmcBootArgsEliot Courtney
`FmcBootArgs` logically owns this, so pass ownership to it instead of storing a reference. Signed-off-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260804-blackwell-fixes-v4-5-ac858b6a1935@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>