summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-06-03thermal/drivers/amlogic: Add missing dependency on MESON_SMRonald Claveau
The amlogic thermal driver calls meson_sm_get() and meson_sm_get_thermal_calib() which are exported by the meson_sm driver. Without CONFIG_MESON_SM enabled, the build fails with undefined references to these symbols. Add a proper Kconfig dependency on MESON_SM instead of relying on stub functions, which makes the dependency explicit and prevents invalid configurations. Closes: https://lore.kernel.org/oe-kbuild-all/202605291530.en7aGn7w-lkp@intel.com/ Reported-by: Mark Brown <broonie@kernel.org> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr> Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org> Link: https://lore.kernel.org/oe-kbuild-all/202605291530.en7aGn7w-lkp@intel.com/ Link: https://patch.msgid.link/20260602-fix-missing-meson_sm-symbol-v3-1-6f7f69cd7d6c@aliel.fr
2026-06-03Merge patch series "super: retire sget()"refs/merge-window/3e57ed20c0db4bc381e695c33b3235c6a948b4f8Christian Brauner
Christian Brauner <brauner@kernel.org> says: CIFS plus the two ext4 KUnit tests (extents-test, mballoc-test) were the last in-tree callers, and all three convert cleanly to sget_fc(). That lets sget() and its prototype come out, taking ~60 lines that only existed to be kept in lockstep with sget_fc() on every publish-path change. * patches from https://patch.msgid.link/20260529-work-sget-v2-0-57bbe08604e4@kernel.org: fs: retire sget() smb: client: convert cifs_smb3_do_mount() to sget_fc() ext4: convert mballoc KUnit test to sget_fc() ext4: convert extents KUnit test to sget_fc() Link: https://patch.msgid.link/20260529-work-sget-v2-0-57bbe08604e4@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-06-03fs: retire sget()Christian Brauner
sget() and sget_fc() have lived side by side as near-duplicate find-or-create-and-publish helpers for the legacy and fs_context mount APIs. The three remaining in-tree callers (CIFS plus the ext4 extents and mballoc KUnit tests) have all been moved to sget_fc(). Nothing calls sget() anymore. Delete sget() from fs/super.c and the prototype in <linux/fs.h>. Update the two comments that referred to "sget()" or "sget{_fc}()" to just say "sget_fc()". This removes ~60 lines of code that only existed to be kept in lockstep with sget_fc() on every superblock publish-path change. Link: https://patch.msgid.link/20260529-work-sget-v2-4-57bbe08604e4@kernel.org Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-06-03smb: client: convert cifs_smb3_do_mount() to sget_fc()Christian Brauner
The CIFS mount path already runs through fs_context: smb3_get_tree() calls smb3_get_tree_common() with a struct fs_context * in hand. But the fc is dropped on the way to sget(). Plumb it through to sget_fc() so the legacy sget() interface can go. cifs_smb3_do_mount() now takes (struct fs_context *, struct smb3_fs_context *). The old (fs_type, flags) pair is reconstructed from fc->fs_type and fc->sb_flags. The flags argument was always passed as 0 by the sole caller anyway. The cifs_dbg diagnostic now prints fc->sb_flags directly. cifs_match_super() and cifs_set_super() were the two void-data callbacks for sget(). The match callback now takes (struct super_block *, struct fs_context *) and reads struct cifs_mnt_data out of fc->sget_key. The set callback is gone entirely: sget_fc() pre-populates sb->s_fs_info from fc->s_fs_info before invoking set() so set_anon_super_fc() (which just allocates an anon bdev) is sufficient. Before sget_fc() we stash cifs_sb in fc->s_fs_info, the per-mount data in fc->sget_key and force fc->sb_flags to SB_NODIRATIME | SB_NOATIME to reproduce the previous hard-coded behaviour (alloc_super() reads fc->sb_flags). The original sb_flags is saved and restored around the call so the rest of the mount path sees the same fc semantics as before. mnt_data.flags keeps its historical value of 0 so the CIFS_MS_MASK comparison in compare_mount_options() returns the same (always-equal) result. No functional change. With this in place sget() has no remaining CIFS caller. Link: https://patch.msgid.link/20260529-work-sget-v2-3-57bbe08604e4@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-06-03ext4: convert mballoc KUnit test to sget_fc()Christian Brauner
Same treatment as the extents KUnit test. The mballoc test uses sget() as a thin "give me an initialized superblock" wrapper for a fake file_system_type. Move it onto sget_fc() so sget() can go away. Add a no-op mbt_init_fs_context() so fs_context_for_mount() has something to call on the fake fs_type. mbt_set() now takes a struct fs_context * (still a no-op). mbt_ext4_alloc_super_block() allocates the fc, hands it to sget_fc() and drops the fc reference once the sb is published. No functional change. Link: https://patch.msgid.link/20260529-work-sget-v2-2-57bbe08604e4@kernel.org Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-06-03ext4: convert extents KUnit test to sget_fc()Christian Brauner
The extents KUnit test uses sget() to get an initialized superblock for its fake file_system_type. sget() predates fs_context and we want to retire it. Switch this caller over to sget_fc(). Add a no-op ext_init_fs_context() so fs_context_for_mount() has something to call on the fake fs_type. ext_set() now takes a struct fs_context * (still a no-op). extents_kunit_init() allocates the fc, hands it to sget_fc() and drops the fc reference once the sb is published. sget_fc() does not retain a pointer to it. No functional change for the test. Link: https://patch.msgid.link/20260529-work-sget-v2-1-57bbe08604e4@kernel.org Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-06-03dma-mapping: direct: fix missing mapping for THRU_HOST_BRIDGE segmentsLi RongQing
In dma_direct_map_sg(), the case PCI_P2PDMA_MAP_THRU_HOST_BRIDGE incorrectly used 'break' instead of falling through to MAP_NONE. As a result, segments traversing the host bridge skipped the required dma_direct_map_phys() call entirely, leaving sg->dma_address uninitialized and leading to DMA failures. Fix this by using 'fallthrough;'. Fixes: a25e7962db0d79 ("PCI/P2PDMA: Refactor the p2pdma mapping helpers") Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Signed-off-by: Li RongQing <lirongqing@baidu.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20260603013723.2439-1-lirongqing@baidu.com
2026-06-03wifi: rtw89: usb: add serial_number and uuid sysfs attributes for 0x28de:0x2432Johnson Tsai
Expose the device's Serial Number (SN) and UUID from EFUSE via two read-only sysfs attributes, `serial_number` and `uuid`, on the ieee80211 phy device under the `rtw89_usb` attribute group. This hardware identification information is essential for user-space applications to uniquely identify, track, and manage specific Wi-Fi adapters. For example, in automated factory provisioning or device management systems, user-space tools rely on the EFUSE serial number and UUID to bind configurations to specific physical adapters. Currently, standard wireless APIs do not expose this low-level hardware information, making these sysfs nodes the only viable solution for user space to extract this data. The attributes are gated behind a new RTW89_QUIRK_HW_INFO_SYSFS quirk, enabled only for the VID 0x28de / PID 0x2432 device via the dev_id_quirks field in rtw89_driver_info. Example usage from user-space: $ cat /sys/class/ieee80211/phy0/rtw89_usb/serial_number 3642000123 $ cat /sys/class/ieee80211/phy0/rtw89_usb/uuid aaec2b7c-0a55-4727-8de0-b30febccbbaa Cc: Elliot Saba <sabae@valvesoftware.com> Cc: Charles Lohr <charlesl@valvesoftware.com> Signed-off-by: Johnson Tsai <wenjie.tsai@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260529075032.16807-3-pkshih@realtek.com
2026-06-03wifi: rtw89: add dev_id_quirks to driver_info for per-device quirk controlJohnson Tsai
Add a dev_id_quirks field to rtw89_driver_info so that per-device (VID/PID) quirks can be expressed independently of chip-level default_quirks. Apply the bitmap in rtw89_alloc_ieee80211_hw() so both USB and PCI probes benefit automatically. All existing driver_info structs initialize dev_id_quirks to 0; no behavior change. Signed-off-by: Johnson Tsai <wenjie.tsai@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260529075032.16807-2-pkshih@realtek.com
2026-06-03wifi: rtw89: usb: skip ACPI capability check for USB devicesDavid Lee
Skip the ACPI capability check for all USB devices by default, allowing them to use their default configurations. For USB dongles, customers will manage their own compliance and certification. This initial patch focuses on the generic USB skip infrastructure; specific customer certifications and localized configurations will be handled by quirks afterward. Signed-off-by: David Lee <sc.lee@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260525082636.31105-1-pkshih@realtek.com
2026-06-03Merge tag 'amd-drm-next-7.2-2026-05-29' of ↵Dave Airlie
https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-7.2-2026-05-29: amdgpu: - GEM_OP warning fix - GEM_OP locking fix - Userq fixes - DCN 2.1 refclk fix - SI fixes - HMM fixes - Add DC KUNIT tests - UML fixes - Switch to system_dfl_wq - Old DC power state cleanup - RAS fixes amdkfd: - svm_range_set_attr locking fix - CRIU restore fix - KFD debugger fix radeon: - Use struct drm_edid instead of struct edid Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patch.msgid.link/20260529214346.2328355-1-alexander.deucher@amd.com
2026-06-03wifi: rtw89: 8851bu: add Mercusys MA60XNB (2c4e:0128)Ping-Ke Shih
Add the specific USB device ID which adapter tested fully functional on Fedora 44 with kernel 7.0.8-200.fc44.x86_64 and linux-firmware 20260410-1.fc44. Reported-by: Guillermo Servera Negre <guillem@gservera.com> Tested-by: Guillermo Servera Negre <guillem@gservera.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260525011728.6836-1-pkshih@realtek.com
2026-06-03Merge tag 'drm-intel-gt-next-2026-05-29' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Cross-subsystem Changes: - Backmerge of drm-next to pull in a commit to revert Driver Changes: - Avoid skipping already signaled fence after reset (Sebastian) - Fix potential UAF in TTM object purge (Janusz) - Fix refcount underflow in intel_engine_park_heartbeat (Sebastian) - Drop check for changed VM in EXECBUF (Joonas) - Revert the "else vma = NULL" patch for being superseded (Joonas) - Selfest improvements (Janusz, Krzysztof) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patch.msgid.link/ahlc1R5bzJvmBLlZ@jlahtine-mobl
2026-06-03batman-adv: tt: directly retrieve wifi flags of net_deviceSven Eckelmann
batadv_tt_local_add() tries to retrieve the wifi flags of an interface to mark the TT entry as wifi client for the AP isolation feature. In the past, it was necessary to look up the batadv_hard_iface because the wifi_flags were stored inside this struct. But with the batadv_wifi_net_devices rhashtable, it is preferred to directly retrieve the wifi_flags instead of the indirect route via batadv_hard_iface - which at the end only provides the net_device (which we used to find the batadv_hard_iface). This will also be essential when the global batadv_hardif_list is removed and each lookup via batadv_hardif_get_by_netdev() will require the RTNL lock. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tt: sync local and global tvlv preparation return valuesSven Eckelmann
The batadv_tt_prepare_tvlv_local_data() and batadv_tt_prepare_tvlv_global_data() functions are supposed to work the same - just with different sources for the TT entries. But both handled the return values completely different. The global variant only made sure that the *tt_len parameter was set to 0 and didn't care about the actual return value of the function. The local function never made sure that the *tt_len value was set to some value when the operation failed. The callers were handling these differences and made sure that they didn't access the incorrectly initialized variable. Sync both function as good as possible to avoid problems with new code which might not be aware of these differences in the behavior. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: prevent ELP transmission interval underflowSven Eckelmann
batadv_v_elp_start_timer() enqeues a delayed work. The time when it starts is randomly chosen between (elp_interval - BATADV_JITTER) and (elp_interval + BATADV_JITTER). The configured elp_interval must therefore be larger or equal to BATADV_JITTER to avoid that it causes an underflow of the unsigned integer. If this would happen, then a "fast" ELP interval would turn into a "day long" delay. At the same time, it must not be larger than the maximum value the variable can store. Cc: stable@kernel.org Fixes: a10800829040 ("batman-adv: Add elp_interval hardif genl configuration") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: bla: annotate lasttime access with READ/WRITE_ONCESven Eckelmann
The lasttime field for claim, backbone_gw, and loopdetect tracks the jiffies value of the most recent activity and is used to detect timeouts. These accesses are not consistently protected by a lock, so READ_ONCE/WRITE_ONCE must be used to prevent data races caused by compiler optimizations. Cc: stable@kernel.org Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03dma: map_benchmark: turn dma_sg_map_param buf into a flexible arrayRosen Penev
The buf pointer was kmalloc_array()'d immediately after the parent struct allocation, with the count (granule, validated to 1..1024 by the ioctl) trivially available beforehand. Move buf to the struct tail as a flexible array member and fold the two allocations into a single kzalloc_flex(), dropping the kfree(params->buf) in both the prepare error path and unprepare. Add __counted_by for extra runtime analysis. Assisted-by: Claude:Opus-4.7 Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Qinxin Xia <xiaqinxin@huawei.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20260603031758.290538-1-rosenp@gmail.com
2026-06-03batman-adv: tp_meter: consolidate congestion control variablesSven Eckelmann
Congestion control variables in batadv_tp_sender were scattered across the struct without clear grouping, making it difficult to reason about which fields require cwnd_lock (now "cc_lock") protection. These should be combined in a structure to make it more easily visible which variable should be read/modified with the cc_lock held. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tp_meter: use locking for all congestion control variablesSven Eckelmann
Some variables used atomic_t for concurrent access while others relied on cwnd_lock, leading to an inconsistent locking model. This can be simplified by: * keeping all congestion control decisions inside the cc_lock * variables which can be accessed without a lock must use READ_ONCE/WRITE_ONE This is only possible, by extracting the congestion control logic from batadv_tp_recv_ack() into a new helper batadv_tp_handle_ack(). Its decisions are returned as a batadv_tp_ack_reaction enum value and then applied by the caller. This separates the algorithm (deciding what to do) from the mechanism (actually doing it). Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tp_meter: split vars into sender and receiver typesSven Eckelmann
The monolithic batadv_tp_vars struct holds fields for both sender and receiver roles, distinguished only by a runtime enum role. This makes it easy to accidentally access a field intended for the opposite role, since neither the compiler nor the type system provide any guard against such mistakes. The role check also adds unnecessary branching in several code paths. Introduce batadv_tp_vars_common to hold fields shared across both roles, then derive two separate types (sender/receiver) from it. The functions can operate on them without any ambiguity about the available fields. This also reduces the memory footprint of receiver sessions, which no longer carry the substantial sender-only fields. Care must be taken to prevent concurrent TP sessions between the same two peers in opposite directions, since sender and receiver sessions are now tracked in separate lists and a lookup in one list no longer detects a session in the other. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tp_meter: add only finished tp_vars to listsSven Eckelmann
When the receiver variables (aka "session") are initialized, then they are added to the list of sessions before the timer is set up. A RCU protected reader could therefore find the entry and run mod_setup before batadv_tp_init_recv() finished the timer initialization. The same is true for batadv_tp_start(), which must first initialize the finish_work and the test_length to avoid a similar problem. Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tp_meter: handle seqno wrap-around for fast recovery detectionSven Eckelmann
The recover variable and the last_sent sequence number are initialized on purpose as a really high value which will wrap-around after the first 2000 bytes. The fast recovery precondition must therefore not use simple integer comparisons but use helpers which are aware of the sequence number wrap-arounds. Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tp_meter: fix fast recovery preconditionSven Eckelmann
The fast recovery precondition checks if the recover (initialized to BATADV_TP_FIRST_SEQ) is bigger than the received ack. But since recover is only updated when this check is successful, it will never enter the fast recovery mode. According to RFC6582 Section 3.2 step 2, the check should actually be different: > When the third duplicate ACK is received, the TCP sender first > checks the value of recover to see if the Cumulative > Acknowledgment field covers more than recover The precondition must therefore check if recover is smaller than the received ack - basically swapping the operands of the current check. Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tp_meter: avoid divide-by-zero for dec_cwndSven Eckelmann
The cwnd is always MSS <= cwnd <= 0x20000000. But the calculation in batadv_tp_update_cwnd() assumes unsigned 32 bit arithmetics. ((mss * 8) ** 2) / (cwnd * 8) In case cwnd is actually 0x20000000, it will be shifted by 3 bit to the left end up at 0x100000000 or U32_MAX + 1. It will therefore wrap around and be 0 - resulting in: ((mss * 8) ** 2) / 0 This is of course invalid and cannot be calculated. The calculation should must be simplified to avoid this overflow: (mss ** 2) * 8 / cwnd It will keep the precision enhancement from the scaling (by 8) but avoid the overflow in the divisor. In theory, there could still be an overflow in the dividend. It is at the moment fixed to BATADV_TP_PLEN in batadv_tp_recv_ack() - so it is not an imminent problem. But allowing it to use the whole u32 bit range, would mean that it can still use up to 67 bits. To keep this calculation safe for 32 bit arithmetic, mss must never use more than floor((32 - 3) / 2) bits - or in other words: must never be larger than 16383. Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tp_meter: avoid window underflowSven Eckelmann
In batadv_tp_avail(), win_left is calculated with 32-bit unsigned arithmetic: win_left = win_limit - tp_vars->last_sent; During Fast Recovery, cwnd is inflated and last_sent advances rapidly. When Fast Recovery ends, cwnd drops abruptly back to ss_threshold. If the newly shrunk win_limit is less than last_sent, the unsigned subtraction will underflow, wrapping to a massive positive value. Instead of returning that the window is full (unavailable), it returns that the sender can continue sending. To handle this situation, it must be checked whether the windows end sequence number (win_limit) has to be compared with the last sent sequence number. If it would be before the last sent sequence number, then more acks are needed before the transmission can be started again. Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tp_meter: initialize dec_cwnd explicitlySven Eckelmann
When batadv_tp_update_cwnd() is called, dec_cwnd is increased. But dec_cwnd is only initialixed (to 0) when a duplicate Ack was received or when cwnd is below the ss_threshold. Just initialize the cwnd during the initialization to avoid any potential access of uninitialized data. Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tp_meter: initialize dup_acks explicitlySven Eckelmann
When an ack with a sequence number equal to the last_acked is received, the dup_acks counter is increased to decide whether fast retransmit should be performed. Only when the sequence numbers are not equal, the dup_acks is set to the initial value (0). But if the initial packet would have the sequence number BATADV_TP_FIRST_SEQ, dup_acks would not be initialized and atomic_inc would operate on an undefined starting value. It is therefore required to have it explicitly initialized during the start of the sender session. Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03batman-adv: tp_meter: keep unacked list in ascending orderedSven Eckelmann
When batadv_tp_handle_out_of_order inserts a new entry in the list of unacked (out of order) packets, it searches from the entry with the newest sequence number towards oldest sequence number. If an entry is found which is older than the newly entry, the new entry has to be added after the found one to keep the ascending order. But for this operation list_add_tail() was used. But this function adds an entry _before_ another one. As result, the list would contain a lot of swapped sequence numbers. The consumer of this list (batadv_tp_ack_unordered()) would then fail to correctly ack packets. Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann <sven@narfation.org>
2026-06-03Merge tag 'drm-misc-next-2026-05-28' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/misc/kernel into drm-next drm-misc-next for v7.2-rc1: UAPI Changes: - amdxdna: Revert read-only user-pointer BO mappings. - panthor: Add eviction and reclaim info to fdinfo. Cross-subsystem Changes: - Convert DMA-buf system and cma heap allocators to module. Core Changes: - Cleanup driver misuses of drm/exec. Driver Changes: - Add LG LP129WT232166, AM-1280800W8TZQW-T00H, NEC NL6448BC33-70C, Riverdi RVT70HSLNWCA0 and RVT101HVLNWC00 panels. - Add support for RZ/T2H SoC to renesas. - Add cursor plane support to verisilicon. - Support DVI outputs in ite-it66121 bridge. - Assorted bugfixes, docbook updates and improvements to ivpu, tegra, host1x, nouveau. - Add DSC quirk for ASUS DC301 USB-C dock. - Use drm client buffer for tegra framebuffer. - Add support for GA100 to nouveau. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patch.msgid.link/ef65f43c-becf-473c-a5cc-203fdfecd491@linux.intel.com
2026-06-02ipv6: anycast: insert aca into global hash under idev->lockJiayuan Chen
syzbot reported a splat [1]: a slab-use-after-free in ipv6_chk_acast_addr(), which walks the global inet6_acaddr_lst[] hash under RCU and dereferences a struct ifacaddr6 that has already been freed while still linked in the hash, so a later reader walks into a dangling node. In __ipv6_dev_ac_inc() the aca is allocated with refcount 1, then aca_get() bumps it to 2 to keep it alive across the unlocked region. It is published to idev->ac_list under idev->lock, but ipv6_add_acaddr_hash() runs after write_unlock_bh(). A concurrent teardown (ipv6_ac_destroy_dev() from addrconf_ifdown(), under RTNL) can slip into that window: CPU0 __ipv6_dev_ac_inc CPU1 ipv6_ac_destroy_dev (RTNL) ------------------------------ ------------------------------------ aca_alloc() refcnt 1 aca_get() refcnt 2 write_lock_bh(idev->lock) add aca to ac_list write_unlock_bh(idev->lock) write_lock_bh(idev->lock) pull aca off ac_list write_unlock_bh(idev->lock) ipv6_del_acaddr_hash(aca) hlist_del_init_rcu() is a no-op, aca is not in the hash yet aca_put() refcnt 2->1 ipv6_add_acaddr_hash(aca) aca now inserted into the hash aca_put() refcnt 1->0 call_rcu(aca_free_rcu) -> kfree(aca) The hash removal becomes a no-op because the insertion has not happened yet, so once CPU0 inserts and drops the last reference, the aca is freed while still linked in inet6_acaddr_lst[], and readers dereference freed memory after the slab slot is reused. This window opened once RTNL stopped serializing the join path against device teardown. Move ipv6_add_acaddr_hash() inside the idev->lock section so the ac_list and hash insertions are atomic with respect to teardown: a racing remover now either misses the aca entirely or finds it in both lists. acaddr_hash_lock is now nested under idev->lock, which is acquired in softirq context, so switch all acaddr_hash_lock sites to spin_lock_bh() to avoid the irq lock inversion reported in [2]. [1] https://syzkaller.appspot.com/bug?extid=a01df04303c131efbf3a [2] https://lore.kernel.org/netdev/6a194ef7.ba3b1513.1890b4.0000.GAE@google.com/ Reported-by: syzbot+819eb928d120d2bdad0e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/6a191f87.ce022c6e.138e56.0003.GAE@google.com/T/ Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Fixes: eb1ac9ff6c4a ("ipv6: anycast: Don't hold RTNL for IPV6_JOIN_ANYCAST.") Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20260529152219.235475-1-jiayuan.chen@linux.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-02selftests/net: bind_bhash: fix memory leak in bind_socketlonglong yan
The getaddrinfo() call in bind_socket() dynamically allocates memory for the result linked list that must be freed with freeaddrinfo(). However, none of the code paths after a successful getaddrinfo() call free this memory, causing a leak in every invocation of bind_socket(). Signed-off-by: longlong yan <yanlonglong@kylinos.cn> Link: https://patch.msgid.link/20260601013927.1835-1-yanlonglong@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-02net: stmmac: Improve Tx timer arm logic furtherNazim Amirul
Calling hrtimer_start() on an already-active txtimer is unnecessary and expensive. Skip the restart if the timer is already active by adding an hrtimer_active() check before hrtimer_start(). Previously, each packet reset the timer to tx_coal_timer in the future, acting as a sliding window that delayed NAPI under burst traffic. With this change, an already-active timer is left to fire sooner, scheduling NAPI within tx_coal_timer of the first packet and freeing TX descriptors earlier. There is no race concern: hrtimer_start() is internally serialized and safe to call on an active timer. In the event of a race between hrtimer_active() and hrtimer_start(), the worst case is calling hrtimer_start() on an already-active timer, which is identical to the pre-patch behaviour. Performance on Cyclone V with dwmac-socfpga (iperf3 -u -b 0 -l 64): Before: ~45200 pps After: ~52300 pps (~15% improvement) Additionally, ~10% improvement in UDP throughput observed on Agilex5, with hrtimer CPU usage reduced from ~8% to ~0.6%. Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com> Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260529064659.32287-1-muhammad.nazim.amirul.nazle.asmade@altera.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-02Merge branch 'dpaa2-switch-various-improvements'Jakub Kicinski
Ioana Ciornei says: ==================== dpaa2-switch: various improvements This patch set is a comprised of improvements and fixes for long-standing bugs which were only caught by sashiko while reviewing the LAG support patches for the dpaa2-switch: https://lore.kernel.org/all/20260512131554.952971-1-ioana.ciornei@nxp.com/ In order to not just add to the already big set, I am submitting these before any v3 of the LAG support patches. The individual patches tackle FDB and VLAN management in the dpaa2-switch driver as well as removal of some duplicated code. The error path of the dpaa2_switch_rx() is also improved. ==================== Link: https://patch.msgid.link/20260528173452.1953102-1-ioana.ciornei@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-02dpaa2-switch: fix handling of NAPI on the remove pathIoana Ciornei
All the NAPI instances for a DPSW device are attached to the first switch port's net_device but shared by all ports. The NAPI instances get disabled only once the last port goes down. This causes an issue on the .remove() path where each port is unregistered and freed one at a time, causing the NAPI instances to be deleted even though they are not disabled. In order to avoid this, split up the unregister_netdev() calls from the free_netdev() so that we make sure all ports go down before we attempt a deletion of NAPI instances. Also, make the netif_napi_del() explicit as it is on the .probe() path. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://patch.msgid.link/20260528173452.1953102-6-ioana.ciornei@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-02dpaa2-switch: support VLAN flag changes on existing VIDsIoana Ciornei
The switchdev core notifies the driver on VLAN flag changes on existing VIDs through the changed field of the switchdev_obj_port_vlan structure. Without this patch, the driver was erroring out from the start if the same VID was inserted twice, from its perspective, even though the second call was actually a flag change. $ bridge vlan add dev eth2 vid 30 untagged $ bridge vlan add dev eth2 vid 30 [ 458.589534] fsl_dpaa2_switch dpsw.0 eth2: VLAN 30 already configured This patch fixes the above behavior by, first of all, removing the checks and return of errors on a VLAN already being installed. The patch also moves the sequence of code which checks if there is space for a new VLAN so that the verification is being done only for VLANs not know by the switch and not flag changes. A new parameter is added to the dpaa2_switch_port_add_vlan() function so that we pass the vlan->changed necessary information. Based on this new parameter and the flags value, the untagged flag will be added or removed from a VLAN installed on a port. The same thing is also extended to the PVID configuration. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://patch.msgid.link/20260528173452.1953102-5-ioana.ciornei@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-02dpaa2-switch: remove duplicated check for the maximum number of VLANsIoana Ciornei
The check for the maximum number of VLANs is exactly duplicated twice in the dpaa2_switch_port_vlans_add() function. Remove one of the instances so that we do not have dead code. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://patch.msgid.link/20260528173452.1953102-4-ioana.ciornei@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-02dpaa2-switch: fix the error path in dpaa2_switch_rx()Ioana Ciornei
In case of an error in dpaa2_switch_rx(), the dpaa2_switch_free_fd() function is called in order to free the FD. This is incorrect since the dpaa2_switch_free_fd() is intended to be used on Tx frame descriptors, meaning that it expects in the software annotation area of the FD data to find a valid skb pointer on which to call dev_kfree_skb(). Fix this by extracting the dma_unmap_page() from dpaa2_switch_build_linear_skb() directly into the dpaa2_switch_rx() function. This allows us to directly use free_pages() in case of an error before an SKB was created and kfree_skb() afterwards. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://patch.msgid.link/20260528173452.1953102-3-ioana.ciornei@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-02dpaa2-switch: rework FDB management on the bridge leave pathIoana Ciornei
On bridge leave, the dpaa2_switch_port_set_fdb() function always allocates a new FDB for the port which is becoming standalone. In case no FDB is found, then the port leaving a bridge will continue to use the current one. The above logic does not cover the case in which there are multiple bridges which have ports from the same DPSW instance. In this case, when the last port leaves bridge #1, it finds an unused FDB to switch to, but the old FDB is not marked as unused. Since the number of FDBs is equal to the number of DPSW interfaces, this will eventually lead to multiple ports sharing the same FDB. Fix this by changing how we are managing the FDBs on the leave path. Instead of directly allocating a new FDB, first verify if the current port is the last one to leave a bridge. If this is the case, then continue to use the current FDB and only allocate another FDB if there are other ports remaining in the bridge. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://patch.msgid.link/20260528173452.1953102-2-ioana.ciornei@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-06-03riscv: dts: sophgo: reduce SG2042 MSI count to 16Icenowy Zheng
The SG2042 MSI controller has one 32-bit doorbell register, and each bit corresponds to an interrupt. At a glance, it seems that the MSI controller can support 32 interrupts; however the PCI MSI capability only supports 16-bit messages, which makes the high 16 interrupts unusable in such way. Reduce the MSI count to 16 to prevent producing MSI message values that cannot fit 16-bit integers. Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Reviewed-by: Chen Wang <unicorn_wang@outlook.com> Tested-by: Chen Wang <unicorn_wang@outlook.com> on Pioneerbox. Link: https://patch.msgid.link/20260407160143.1182430-1-zhengxingda@iscas.ac.cn Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2026-06-03riscv: dts: sophgo: sg2042: use hex for CPU unit addressInochi Amaoto
Previous the CPU unit address cpu of sg2042 use decimal, it is not following the general convention for unit addresses of the OF. Convent the unit address to hex to resolve this problem. The introduces a small change for the CPU node name, but it should affect nothing since there is no direct full-path reference to these CPU nodes. Fixes: ae5bac370ed4 ("riscv: dts: sophgo: Add initial device tree of Sophgo SRD3-10") Tested-by: Chen Wang <unicorn_wang@outlook.com> # Pioneerbox. Reviewed-by: Guo Ren <guoren@kernel.org> Reviewed-by: Chen Wang <unicorn_wang@outlook.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Tested-by: Chen Wang <unicorn_wang@outlook.com> on Pioneerbox. Link: https://patch.msgid.link/20260426013449.694435-3-inochiama@gmail.com Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2026-06-03riscv: dts: sophgo: sg2044: use hex for CPU unit addressInochi Amaoto
Previous the CPU unit address cpu of sg2044 use decimal, it is not following the general convention for unit addresses of the OF. Convent the unit address to hex to resolve this problem. The introduces a small change for the CPU node name, but it should nothing since there is no direct full-path reference to these CPU nodes. Fixes: 967a94a92aaa ("riscv: dts: add initial Sophgo SG2042 SoC device tree") Reviewed-by: Chen Wang <unicorn_wang@outlook.com> Reviewed-by: Guo Ren <guoren@kernel.org> Link: https://patch.msgid.link/20260426013449.694435-2-inochiama@gmail.com Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2026-06-02kbuild: Remove unnecessary 'T' modifier in cmd_ar_builtin_fixupNathan Chancellor
In cmd_ar_builtin_fixup, the 'T' modifier was added to '$(AR) mPi' to work around a bug in llvm-ar that caused thin archives to be silently converted to full archives [1]. Since commit 20c098928356 ("kbuild: Bump minimum version of LLVM for building the kernel to 15.0.0"), all supported versions of llvm-ar have this issue fixed, so the 'T' modifier and comment can be removed. Link: https://github.com/llvm/llvm-project/commit/d17c54d17de22d2961a04163f3dbc8e973de89b8 [1] Signed-off-by: Nathan Chancellor <nathan@kernel.org>
2026-06-03soc: aspeed: cleanup dead default for ASPEED_SOCINFOJulian Braha
The same kconfig 'default' statement appears twice for ASPEED_SOCINFO, which is unnecessary. This dead code was found by kconfirm, a static analysis tool for Kconfig. Signed-off-by: Julian Braha <julianbraha@gmail.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
2026-06-02n64cart: use strscpy in n64cart_probeThorsten Blum
strcpy() has been deprecated [1] because it performs no bounds checking on the destination buffer, which can lead to buffer overflows. While the current code works correctly, replace strcpy() with the safer strscpy() to follow secure coding best practices. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20260517172617.3954-2-thorsten.blum@linux.dev Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-06-02io_uring/nop: Drop a wrong comment in struct io_nopGabriel Krisman Bertazi
This was copy-pasted from io_rw, where the comment actually makes sense. Here, we don't have struct kiocb. Drop the comment. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://patch.msgid.link/20260602215327.1885109-4-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-06-02io_uring/net: Remove async_size for OP_LISTENGabriel Krisman Bertazi
OP_LISTEN does not use async_data. Remove it. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://patch.msgid.link/20260602215327.1885109-3-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-06-02io_uring/net: Avoid msghdr on op_connect/op_bind async dataGabriel Krisman Bertazi
Both IORING_OP_CONNECT and IORING_OP_BIND reuse the msghdr object just to store the sockaddr. Beyond allocating a much larger object than needed, msghdr can also wrap an iovec, which will be recycled unnecessarily. This uses the sockaddr directly. Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://patch.msgid.link/20260602215327.1885109-2-krisman@suse.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-06-02Input: atkbd - add DMI quirk for Lenovo Yoga Air 14 (83QK)Zeyu WANG
The Lenovo Yoga Air 14 (83QK) laptop keyboard becomes unresponsive after the standard atkbd init sequence. Controlled testing on the actual hardware shows the F5 (ATKBD_CMD_RESET_DIS / deactivate) command specifically corrupts the EC state, causing zero IRQ1 interrupts after init. Skipping only the deactivate command (while keeping F4 ENABLE) resolves the issue completely: both keystroke input and CapsLock LED toggle work correctly. The reverse test - skipping only F4 while keeping F5 - makes the problem worse (zero keystroke interrupts), confirming F5 is the sole culprit. Add a DMI quirk entry for LENOVO/83QK using the existing atkbd_deactivate_fixup callback, consistent with the existing entries for LG Electronics and HONOR FMB-P that address the same EC F5 deactivate issue. Signed-off-by: Zeyu WANG <zeyu.thomas.wang@gmail.com> Link: https://patch.msgid.link/20260602170909.14725-1-zeyu.thomas.wang@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-06-03Merge tag 'drm-intel-next-2026-05-28' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/i915/kernel into drm-next Xe related: - Fix Xe oops in suspend/shutdown when display was disabled (Jani) Display in general: - More general refactor towards display separation (Jani) - Preparation for fix Adaptive-Sync SDP for PR with Link ON + Auxless-ALPM (Ankit) - PSR related fixes and improvements (Jouni) - Use polling when irqs are unavailable (Michal) - Split bandwidth params into platform- and display-IP-specific structs (Gustavo) - Revert "drm/i915/backlight: Remove try_vesa_interface" (Suraj) - Casf & scaler refactoring (Michal) - Add support for pipe background color (Maarten) - General clean-ups (Maarten) - Sanitize DP link capability change handling (Imre) - Multiple BW QGV fixes (Ville) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patch.msgid.link/ahhFE5Co5PdZQKG8@intel.com