Skip to content

[Deepin-Kernel-SIG] [linux 6.6-y] [Upstream] Update kernel base to 6.6.134-p1#1626

Merged
opsiff merged 100 commits intodeepin-community:linux-6.6.yfrom
opsiff:linux-stable-update-6.6.134-p1
Apr 14, 2026
Merged

[Deepin-Kernel-SIG] [linux 6.6-y] [Upstream] Update kernel base to 6.6.134-p1#1626
opsiff merged 100 commits intodeepin-community:linux-6.6.yfrom
opsiff:linux-stable-update-6.6.134-p1

Conversation

@opsiff
Copy link
Copy Markdown
Member

@opsiff opsiff commented Apr 14, 2026

Update kernel base to 6.6.134.

git log --oneline v6.6.133..v6.6.134~61 |wc
100 930 7476

Summary by Sourcery

Update various kernel subsystems and drivers to align with upstream Linux 6.6.134 base, incorporating bug fixes, safety checks, and small feature additions across networking, wireless, input, crypto, debugging, and platform-specific code.

Bug Fixes:

  • Fix ath11k RX TID buffer allocation and cleanup to use non-coherent DMA-safe handling and correct unaligned address tracking.
  • Improve ath11k monitor status ring handling to safely skip or reclaim buffers when DMA done status is missing, avoiding lockups.
  • Bound nf_flow_rule action growth, propagate allocation failures, and return errors from flow offload helpers to prevent rule construction overruns.
  • Rework conntrack expectation helper association to store helper and zone directly on expectations and use proper RCU/net namespace handling, avoiding crashes and races.
  • Fix lec ATM LAN emulation to safely reference the LEC daemon VCC using RCU and avoid use-after-free on close and message handling paths.
  • Make mlx5 firmware version query tolerant to unsupported or failing MCAM registers and report partial results via logging instead of hard errors.
  • Avoid dereferencing NULL QAIC users in deactivate handling and correctly process device-originated deactivate messages even after userspace disappeared.
  • Handle unaligned SPI reads and proper scan buffer layout in ti-adc161s626 and vcnl4035 IIO drivers, preventing alignment faults and data corruption.
  • Add error checking and clock rollback to ep93xx I2S enable/resume paths, preventing clock leaks on failure.
  • Ensure Bluetooth LE connection parameter request handling and SMP pairing respect device state, locking and MITM requirements, avoiding races and weak auth.
  • Fix HSR VLAN add VID unwind logic to correctly remove VLANs from both slave ports on failure.
  • Convert qrtr tx flow tracking from radix tree to xarray and ensure cleanup/poll paths no longer use RCU after release, fixing races during unregister.
  • Prevent SCO socket double-bind and stale connection use, and harden SCO connect paths against concurrent state changes.
  • Tighten xtables family checks to reject non-ARP matches/targets on ARP tables, avoiding misconfiguration.
  • Correct OCC hwmon power average and extended sensor formatting, and handle zero-sample cases robustly.
  • Fix various netfilter conntrack expectation, broadcast, and SIP/H.323 helper interactions to avoid helper mismatches, leaks, or invalid helper lookups.
  • Guard ARP/ND bridge proxy reply path against non-linear skbs and ensure ND replies are constructed from a valid parsed NS header.
  • Handle Bluetooth HCI command sync destroy callbacks correctly when called from within the cmd_sync workqueue itself.
  • Fix ath11k HAL copyright and add SRNG source next-peek helper used to safely inspect next descriptors without advancing pointers.
  • Handle ath11k dp_rx TID DMA buffers with unaligned non-coherent allocations and syncs, and ensure AMPDU stop uses correct TID state.
  • Prevent netem from corrupting memory when injecting bit errors on zero-length skbs.
  • Avoid object tool infinite recursion on jump tables by relaxing unconditional jump constraint in backtracking.
  • Fix IPv6 control message option length accounting when overwriting dst options and routing headers, avoiding length drift.
  • Correct IPv6 flowlabel lifetime handling by not freeing exclusive options based solely on flags during release.
  • Reset IPv6 ICMP and IPv4 ICMPv6 error skb control blocks when reusing skbs for translated errors to avoid cross-family contamination.
  • Ensure IPv6 ND user option netlink messages are correctly initialised with zeroed padding.
  • Fix ip6_tunnel ICMP error path to validate inner IPv4 header before using it.
  • Fix RDS IB MR allocation to reject missing connection state.
  • Prevent MIPS r4k TLB uniquify from sleeping in atomic context by using GFP_ATOMIC after boot.
  • Fix AST DP501 analog init to write back to the correct SCU register.
  • Prevent DRM compat ioctl array index speculation by using array_index_nospec.
  • Respect enhanced framing capability in g4x DP based on pipe config rather than raw DPCD flag.
  • Correct ADXL355 temperature channel sign, BNO055 channel count, and MPU3050 IRQ free path to use trigger as cookie.
  • Fix IIO buffer and set_fifo_odr handling across multiple drivers to respect sensor indices and scan layouts.
  • Fix CAAM hash setkey paths to correctly allocate aligned key buffers when hashing long keys without overrunning kmemdup size.
  • Fix FEC PTP PPS enable to allow any channel matching configuration instead of a single hardcoded index.
  • Ensure mlx5 lag debugfs creation checks for existent lag device before creating per-device entries.
  • Fix PN532 UART receive path to avoid skb overrun by trimming when no tailroom is left before pushing a byte.
  • Fix X25 reassembly logic to guard against fraglen overflow and reset fraglen when purging queues, avoiding memory corruption and stale state.
  • Fix HFSC runtime service curve arithmetic to use 64-bit division for potentially large values.
  • Fix Tegra I2C runtime PM IRQ-safe use when pinctrl is present to avoid sleeping in atomic context.
  • Fix AF_ALG tsgl chaining to unmark previous end-of-list before chaining a new segment list.
  • Fix pmbus device ID validation for TPS53676 and ensure PXE1610 probing errors when page selection fails.
  • Fix TDA IO SPDIF-in index mapping on X-Fi to correctly expose second SPDIF input.
  • Fix various USB serial and HID quirks, including new device IDs and LPM disable for specific webcams.
  • Fix NBD, ipset, cgroup, rateest path string handling to validate length and avoid non-terminated copies.

Enhancements:

  • Increase nf_flow_rule maximum action entries and convert many flow offload helpers to return error codes, improving robustness of hardware offload rule construction for NAT and tunnels.
  • Refine netfilter nf_tables verdict handling to reject direct NF_QUEUE immediates in expression initialisation, aligning with nft_queue usage.
  • Strengthen xt_cgroup match support with path length validation and better error reporting for invalid cgroup paths.
  • Extend ipset APIs and list:set type to pass nlattr directly for set lookup, clarifying ownership and avoiding unsafe string ops.
  • Store net namespace and optional zone directly in nf_conntrack_expect and reuse helpers via RCU pointers, simplifying expectation lookups and zone comparisons.
  • Improve conntrack netlink expectation handling to look up helpers via master connection help, store helper on expectation, and expose helper name consistently in dumps and filters.
  • Switch qrtr tx flow tracking from radix tree to xarray and simplify iteration and wakeup logic during endpoint unregister and node teardown.
  • Allow shared classifier blocks to require explicit mark/baseclass when attaching fw and flow classifiers, preventing ambiguous filter attachments in tc.
  • Improve Bluetooth mgmt mesh send validation of payload length and adv_data_len, and enforce LTK key size constraints.
  • Modernize lecd pointer usage in LEC ATM driver to use RCU, synchronize on close, and gate all use sites with rcu_access_pointer.
  • Make mlx5 firmware version query non-fatal and log errors while still providing whatever version info is available for devlink info reporting.
  • Enhance qaic control path to gracefully handle interrupted waits and missed deactivate notifications from the device by locally cleaning up DBC state.
  • Add new device IDs and quirks for xpad, option, io_edgeport, and USB core to support additional game controllers, LTE modems, and serial adapters.
  • Update multiple device-tree bindings and driver Kconfig to correct properties such as #interrupt-cells and unevaluatedProperties usage.
  • Adjust MIPS multi-precision multiply helper enablement for wider GCC versions to avoid suboptimal __multi3 calls on mips64r6.
  • Harden sk_psock verdict data_ready against NULL socket races by using RCU to fetch sk_socket and ops, improving BPF sockmap safety.
  • Improve hci_cmd_sync_run destroy handling when called reentrantly from cmd_sync workqueue.
  • Refine SMP pairing logic to use explicit MITM flag tracking, forcing MITM when high security is requested and Just Works would otherwise be used.

peppergrayxyz and others added 30 commits April 14, 2026 18:06
[ Upstream commit d499e9627d70b1269020d59b95ed3e18bee6b8cd ]

DW_CFA_advance_loc4 is defined but no handler is implemented. Its
CFA opcode defaults to EDYNSCS_INVALID_CFA_OPCODE triggering an
error which wrongfully prevents modules from loading.

Link: https://bugs.gentoo.org/971060
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 7b56b67776520bdd0a4a499020ae712043271e48)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 2f1763f62909ccb6386ac50350fa0abbf5bb16a9 ]

The wacom_intuos_bt_irq() function processes Bluetooth HID reports
without sufficient bounds checking. A maliciously crafted short report
can trigger an out-of-bounds read when copying data into the wacom
structure.

Specifically, report 0x03 requires at least 22 bytes to safely read
the processed data and battery status, while report 0x04 (which
falls through to 0x03) requires 32 bytes.

Add explicit length checks for these report IDs and log a warning if
a short report is received.

Signed-off-by: Benoît Sevens <bsevens@google.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 8bd690ac1242332c73cba10dacdad6c6642bbb94)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 922814879542c2e397b0e9641fd36b8202a8e555 ]

A race condition exists between lec_atm_close() setting priv->lecd
to NULL and concurrent access to priv->lecd in send_to_lecd(),
lec_handle_bridge(), and lec_atm_send(). When the socket is freed
via RCU while another thread is still using it, a use-after-free
occurs in sock_def_readable() when accessing the socket's wait queue.

The root cause is that lec_atm_close() clears priv->lecd without
any synchronization, while callers dereference priv->lecd without
any protection against concurrent teardown.

Fix this by converting priv->lecd to an RCU-protected pointer:
- Mark priv->lecd as __rcu in lec.h
- Use rcu_assign_pointer() in lec_atm_close() and lecd_attach()
  for safe pointer assignment
- Use rcu_access_pointer() for NULL checks that do not dereference
  the pointer in lec_start_xmit(), lec_push(), send_to_lecd() and
  lecd_attach()
- Use rcu_read_lock/rcu_dereference/rcu_read_unlock in send_to_lecd(),
  lec_handle_bridge() and lec_atm_send() to safely access lecd
- Use rcu_assign_pointer() followed by synchronize_rcu() in
  lec_atm_close() to ensure all readers have completed before
  proceeding. This is safe since lec_atm_close() is called from
  vcc_release() which holds lock_sock(), a sleeping lock.
- Remove the manual sk_receive_queue drain from lec_atm_close()
  since vcc_destroy_socket() already drains it after lec_atm_close()
  returns.

v2: Switch from spinlock + sock_hold/put approach to RCU to properly
    fix the race. The v1 spinlock approach had two issues pointed out
    by Eric Dumazet:
    1. priv->lecd was still accessed directly after releasing the
       lock instead of using a local copy.
    2. The spinlock did not prevent packets being queued after
       lec_atm_close() drains sk_receive_queue since timer and
       workqueue paths bypass netif_stop_queue().

Note: Syzbot patch testing was attempted but the test VM terminated
    unexpectedly with "Connection to localhost closed by remote host",
    likely due to a QEMU AHCI emulation issue unrelated to this fix.
    Compile testing with "make W=1 net/atm/lec.o" passes cleanly.

Reported-by: syzbot+f50072212ab792c86925@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=f50072212ab792c86925
Link: https://lore.kernel.org/all/20260309093614.502094-1-kartikey406@gmail.com/T/ [v1]
Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260309155908.508768-1-kartikey406@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit b256d055da47258e63f8b40965f276c5f23d229a)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 77603ab10429fe713a03345553ca8dbbfb1d91c6 ]

Shin'ichiro reported sporadic hangs when running generic/013 in our CI
system. When enabling lockdep, there is a lockdep splat when calling
btrfs_get_dev_zone_info_all_devices() in the mount path that can be
triggered by i.e. generic/013:

  ======================================================
  WARNING: possible circular locking dependency detected
  7.0.0-rc1+ deepin-community#355 Not tainted
  ------------------------------------------------------
  mount/1043 is trying to acquire lock:
  ffff8881020b5470 (&vblk->vdev_mutex){+.+.}-{4:4}, at: virtblk_report_zones+0xda/0x430

  but task is already holding lock:
  ffff888102a738e0 (&fs_devs->device_list_mutex){+.+.}-{4:4}, at: btrfs_get_dev_zone_info_all_devices+0x45/0x90

  which lock already depends on the new lock.

  the existing dependency chain (in reverse order) is:

  -> #4 (&fs_devs->device_list_mutex){+.+.}-{4:4}:
	 __mutex_lock+0xa3/0x1360
	 btrfs_create_pending_block_groups+0x1f4/0x9d0
	 __btrfs_end_transaction+0x3e/0x2e0
	 btrfs_zoned_reserve_data_reloc_bg+0x2f8/0x390
	 open_ctree+0x1934/0x23db
	 btrfs_get_tree.cold+0x105/0x26c
	 vfs_get_tree+0x28/0xb0
	 __do_sys_fsconfig+0x324/0x680
	 do_syscall_64+0x92/0x4f0
	 entry_SYSCALL_64_after_hwframe+0x76/0x7e

  -> #3 (btrfs_trans_num_extwriters){++++}-{0:0}:
	 join_transaction+0xc2/0x5c0
	 start_transaction+0x17c/0xbc0
	 btrfs_zoned_reserve_data_reloc_bg+0x2b4/0x390
	 open_ctree+0x1934/0x23db
	 btrfs_get_tree.cold+0x105/0x26c
	 vfs_get_tree+0x28/0xb0
	 __do_sys_fsconfig+0x324/0x680
	 do_syscall_64+0x92/0x4f0
	 entry_SYSCALL_64_after_hwframe+0x76/0x7e

  -> #2 (btrfs_trans_num_writers){++++}-{0:0}:
	 lock_release+0x163/0x4b0
	 __btrfs_end_transaction+0x1c7/0x2e0
	 btrfs_dirty_inode+0x6f/0xd0
	 touch_atime+0xe5/0x2c0
	 btrfs_file_mmap_prepare+0x65/0x90
	 __mmap_region+0x4b9/0xf00
	 mmap_region+0xf7/0x120
	 do_mmap+0x43d/0x610
	 vm_mmap_pgoff+0xd6/0x190
	 ksys_mmap_pgoff+0x7e/0xc0
	 do_syscall_64+0x92/0x4f0
	 entry_SYSCALL_64_after_hwframe+0x76/0x7e

  -> #1 (&mm->mmap_lock){++++}-{4:4}:
	 __might_fault+0x68/0xa0
	 _copy_to_user+0x22/0x70
	 blkdev_copy_zone_to_user+0x22/0x40
	 virtblk_report_zones+0x282/0x430
	 blkdev_report_zones_ioctl+0xfd/0x130
	 blkdev_ioctl+0x20f/0x2c0
	 __x64_sys_ioctl+0x86/0xd0
	 do_syscall_64+0x92/0x4f0
	 entry_SYSCALL_64_after_hwframe+0x76/0x7e

  -> #0 (&vblk->vdev_mutex){+.+.}-{4:4}:
	 __lock_acquire+0x1522/0x2680
	 lock_acquire+0xd5/0x2f0
	 __mutex_lock+0xa3/0x1360
	 virtblk_report_zones+0xda/0x430
	 blkdev_report_zones_cached+0x162/0x190
	 btrfs_get_dev_zones+0xdc/0x2e0
	 btrfs_get_dev_zone_info+0x219/0xe80
	 btrfs_get_dev_zone_info_all_devices+0x62/0x90
	 open_ctree+0x1200/0x23db
	 btrfs_get_tree.cold+0x105/0x26c
	 vfs_get_tree+0x28/0xb0
	 __do_sys_fsconfig+0x324/0x680
	 do_syscall_64+0x92/0x4f0
	 entry_SYSCALL_64_after_hwframe+0x76/0x7e

  other info that might help us debug this:

  Chain exists of:
    &vblk->vdev_mutex --> btrfs_trans_num_extwriters --> &fs_devs->device_list_mutex

   Possible unsafe locking scenario:

	 CPU0                    CPU1
	 ----                    ----
    lock(&fs_devs->device_list_mutex);
				 lock(btrfs_trans_num_extwriters);
				 lock(&fs_devs->device_list_mutex);
    lock(&vblk->vdev_mutex);

   *** DEADLOCK ***

  3 locks held by mount/1043:
   #0: ffff88811063e878 (&fc->uapi_mutex){+.+.}-{4:4}, at: __do_sys_fsconfig+0x2ae/0x680
   #1: ffff88810cb9f0e8 (&type->s_umount_key#31/1){+.+.}-{4:4}, at: alloc_super+0xc0/0x3e0
   #2: ffff888102a738e0 (&fs_devs->device_list_mutex){+.+.}-{4:4}, at: btrfs_get_dev_zone_info_all_devices+0x45/0x90

  stack backtrace:
  CPU: 2 UID: 0 PID: 1043 Comm: mount Not tainted 7.0.0-rc1+ deepin-community#355 PREEMPT(full)
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-9.fc43 06/10/2025
  Call Trace:
   <TASK>
   dump_stack_lvl+0x5b/0x80
   print_circular_bug.cold+0x18d/0x1d8
   check_noncircular+0x10d/0x130
   __lock_acquire+0x1522/0x2680
   ? vmap_small_pages_range_noflush+0x3ef/0x820
   lock_acquire+0xd5/0x2f0
   ? virtblk_report_zones+0xda/0x430
   ? lock_is_held_type+0xcd/0x130
   __mutex_lock+0xa3/0x1360
   ? virtblk_report_zones+0xda/0x430
   ? virtblk_report_zones+0xda/0x430
   ? __pfx_copy_zone_info_cb+0x10/0x10
   ? virtblk_report_zones+0xda/0x430
   virtblk_report_zones+0xda/0x430
   ? __pfx_copy_zone_info_cb+0x10/0x10
   blkdev_report_zones_cached+0x162/0x190
   ? __pfx_copy_zone_info_cb+0x10/0x10
   btrfs_get_dev_zones+0xdc/0x2e0
   btrfs_get_dev_zone_info+0x219/0xe80
   btrfs_get_dev_zone_info_all_devices+0x62/0x90
   open_ctree+0x1200/0x23db
   btrfs_get_tree.cold+0x105/0x26c
   ? rcu_is_watching+0x18/0x50
   vfs_get_tree+0x28/0xb0
   __do_sys_fsconfig+0x324/0x680
   do_syscall_64+0x92/0x4f0
   entry_SYSCALL_64_after_hwframe+0x76/0x7e
  RIP: 0033:0x7f615e27a40e
  RSP: 002b:00007fff11b18fb8 EFLAGS: 00000246 ORIG_RAX: 00000000000001af
  RAX: ffffffffffffffda RBX: 000055572e92ab10 RCX: 00007f615e27a40e
  RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000003
  RBP: 00007fff11b19100 R08: 0000000000000000 R09: 0000000000000000
  R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
  R13: 000055572e92bc40 R14: 00007f615e3faa60 R15: 000055572e92bd08
   </TASK>

Don't hold the device_list_mutex while calling into
btrfs_get_dev_zone_info() in btrfs_get_dev_zone_info_all_devices() to
mitigate the issue. This is safe, as no other thread can touch the device
list at the moment of execution.

Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit c9fc98beeedf0266d6f92ba1a3bc7dbdc1383ebb)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit e4c00ba7274b613e3ab19e27eb009f0ec2e28379 ]

On some systems (e.g. iMac 20,1 with BCM57766), the tg3 driver reads
a default placeholder mac address (00:10:18:00:00:00) from the
mailbox. The correct value on those systems are stored in the
'local-mac-address' property.

This patch, detect the default value and tries to retrieve
the correct address from the device_get_mac_address
function instead.

The patch has been tested on two different systems:
- iMac 20,1 (BCM57766) model which use the local-mac-address property
- iMac 13,2 (BCM57766) model which can use the mailbox,
    NVRAM or MAC control registers

Tested-by: Rishon Jonathan R <mithicalaviator85@gmail.com>

Co-developed-by: Vincent MORVAN <vinc@42.fr>
Signed-off-by: Vincent MORVAN <vinc@42.fr>
Signed-off-by: Paul SAGE <paul.sage@42.fr>
Signed-off-by: Atharva Tiwari <atharvatiwarilinuxdev@gmail.com>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20260314215432.3589-1-atharvatiwarilinuxdev@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 960159a9f84686fc2280a8c4637255fe110f9286)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 4e5019216402ad0b4a84cff457b662d26803f103 ]

With Clang, there can be a conditional forward jump between the load of
the jump table address and the indirect branch.

Fixes the following warning:

  vmlinux.o: warning: objtool: ___bpf_prog_run+0x1c5: sibling call from callable instruction with modified stack frame

Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/a426d669-58bb-4be1-9eaa-6f3d83109e2d@app.fastmail.com
Link: https://patch.msgid.link/7d8600caed08901b6679767488acd639f6df9688.1773071992.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit e9126544fd7798aa509a0397ebb0bb783b47cb89)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit e716edafedad4952fe3a4a273d2e039a84e8681a ]

It is possible for a malicious (or clumsy) device to respond to a
specific report's feature request using a completely different report
ID.  This can cause confusion in the HID core resulting in nasty
side-effects such as OOB writes.

Add a check to ensure that the report ID in the response, matches the
one that was requested.  If it doesn't, omit reporting the raw event and
return early.

Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit c7a27bb4d0f6573ca0f9c7ef0b63291486239190)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit ec69c9e88315c4be70c283f18c2ff130da6320b5 ]

I2C devices with associated pinctrl states (DPAUX I2C controllers)
will change pinctrl state during runtime PM. This requires taking
a mutex, so these devices cannot be marked as IRQ safe.

Add PINCTRL as dependency to avoid build errors.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reported-by: Russell King <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/all/E1vsNBv-00000009nfA-27ZK@rmk-PC.armlinux.org.uk/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit b404e6b9863ea7f769820ce2a89be1da32c8b8a3)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit b17b79ff896305fd74980a5f72afec370ee88ca4 ]

[BUG]
When recovering relocation at mount time, merge_reloc_root() and
btrfs_drop_snapshot() both use BUG_ON(level == 0) to guard against
an impossible state: a non-zero drop_progress combined with a zero
drop_level in a root_item, which can be triggered:

------------[ cut here ]------------
kernel BUG at fs/btrfs/relocation.c:1545!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 1 UID: 0 PID: 283 ... Tainted: 6.18.0+ deepin-community#16 PREEMPT(voluntary)
Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
Hardware name: QEMU Ubuntu 24.04 PC v2, BIOS 1.16.3-debian-1.16.3-2
RIP: 0010:merge_reloc_root+0x1266/0x1650 fs/btrfs/relocation.c:1545
Code: ffff0000 00004589 d7e9acfa ffffe8a1 79bafebe 02000000
Call Trace:
 merge_reloc_roots+0x295/0x890 fs/btrfs/relocation.c:1861
 btrfs_recover_relocation+0xd6e/0x11d0 fs/btrfs/relocation.c:4195
 btrfs_start_pre_rw_mount+0xa4d/0x1810 fs/btrfs/disk-io.c:3130
 open_ctree+0x5824/0x5fe0 fs/btrfs/disk-io.c:3640
 btrfs_fill_super fs/btrfs/super.c:987 [inline]
 btrfs_get_tree_super fs/btrfs/super.c:1951 [inline]
 btrfs_get_tree_subvol fs/btrfs/super.c:2094 [inline]
 btrfs_get_tree+0x111c/0x2190 fs/btrfs/super.c:2128
 vfs_get_tree+0x9a/0x370 fs/super.c:1758
 fc_mount fs/namespace.c:1199 [inline]
 do_new_mount_fc fs/namespace.c:3642 [inline]
 do_new_mount fs/namespace.c:3718 [inline]
 path_mount+0x5b8/0x1ea0 fs/namespace.c:4028
 do_mount fs/namespace.c:4041 [inline]
 __do_sys_mount fs/namespace.c:4229 [inline]
 __se_sys_mount fs/namespace.c:4206 [inline]
 __x64_sys_mount+0x282/0x320 fs/namespace.c:4206
 ...
RIP: 0033:0x7f969c9a8fde
Code: 0f1f4000 48c7c2b0 fffffff7 d8648902 b8ffffff ffc3660f
---[ end trace 0000000000000000 ]---

The bug is reproducible on 7.0.0-rc2-next-20260310 with our dynamic
metadata fuzzing tool that corrupts btrfs metadata at runtime.

[CAUSE]
A non-zero drop_progress.objectid means an interrupted
btrfs_drop_snapshot() left a resume point on disk, and in that case
drop_level must be greater than 0 because the checkpoint is only
saved at internal node levels.

Although this invariant is enforced when the kernel writes the root
item, it is not validated when the root item is read back from disk.
That allows on-disk corruption to provide an invalid state with
drop_progress.objectid != 0 and drop_level == 0.

When relocation recovery later processes such a root item,
merge_reloc_root() reads drop_level and hits BUG_ON(level == 0). The
same invalid metadata can also trigger the corresponding BUG_ON() in
btrfs_drop_snapshot().

[FIX]
Fix this by validating the root_item invariant in tree-checker when
reading root items from disk: if drop_progress.objectid is non-zero,
drop_level must also be non-zero. Reject such malformed metadata with
-EUCLEAN before it reaches merge_reloc_root() or btrfs_drop_snapshot()
and triggers the BUG_ON.

After the fix, the same corruption is correctly rejected by tree-checker
and the BUG_ON is no longer triggered.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: ZhengYuan Huang <gality369@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 295f8075d00442d71dc9ccae421ace1c0d2d9224)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 8c89a077ca796a2fe248c584e9d7e66cff0388c8 ]

The current interrupt handler only checks the GENI main IRQ status
(m_irq) before deciding to return IRQ_NONE. This can lead to spurious
IRQ_NONE returns when DMA interrupts are pending but m_irq is zero.

Move the DMA TX/RX status register reads to the beginning of the ISR,
right after reading m_irq. Update the early return condition to check
all three status registers (m_irq, dma_tx_status, dma_rx_status) before
returning IRQ_NONE.

Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260313-spi-geni-qcom-fix-dma-irq-handling-v1-1-0bd122589e02@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit ea553dfb630e182339b2765fd80b780362c21fa4)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…mmon property warning

[ Upstream commit 398c0c8bbc8f5a9d2f43863275a427a9d3720b6f ]

Change additionalProperties to unevaluatedProperties because it refs to
/schemas/input/matrix-keymap.yaml.

Fix below CHECK_DTBS warnings:
arch/arm/boot/dts/nxp/imx/imx6dl-victgo.dtb: keypad@70 (holtek,ht16k33): 'keypad,num-columns', 'keypad,num-rows' do not match any of the regexes: '^pinctrl-[0-9]+$'
        from schema $id: http://devicetree.org/schemas/auxdisplay/holtek,ht16k33.yaml#

Fixes: f12b457 ("dt-bindings: auxdisplay: ht16k33: Convert to json-schema")
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 90afe0af4452b9a173d86b06ea404e5f95447c82)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 4c2b796 ]

If STATUS_BUFFER_DONE is not set for a monitor status ring entry,
we don't process the status ring until STATUS_BUFFER_DONE set
for that status ring entry.

During LMAC reset it may happen that hardware will not write
STATUS_BUFFER_DONE tlv in status buffer, in that case we end up
waiting for STATUS_BUFFER_DONE leading to backpressure on monitor
status ring.

To fix the issue, when HP (Head Pointer) + 1 entry is peeked and if DMA is not
done and if HP + 2 entry's DMA done is set, replenish HP + 1 entry and start
processing in next interrupt. If HP + 2 entry's DMA done is not set, poll onto
HP + 1 entry DMA done to be set.

Also, during monitor attach HP points to the end of the ring and TP (Tail
Pointer) points to the start of the ring.  Using ath11k_hal_srng_src_peek() may
result in processing invalid buffer for the very first interrupt. Since, HW
starts writing buffer from TP.

To avoid this issue call ath11k_hal_srng_src_next_peek() instead of
calling ath11k_hal_srng_src_peek().

Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1

Signed-off-by: Venkateswara Naralasetty <quic_vnaralas@quicinc.com>
Co-developed-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240429073624.736147-1-quic_tamizhr@quicinc.com
Stable-dep-of: e225b36f83d7 ("wifi: ath11k: Pass the correct value of each TID during a stop AMPDU session")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 12322d8654cf9b74001c167ec6996ac488072f21)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit eeadc6b ]

Currently, the driver allocates cacheable DMA buffers for the rx_tid
structure using kzalloc() and dma_map_single(). These buffers are
long-lived and can persist for the lifetime of the peer, which is not
advisable. Instead of using kzalloc() and dma_map_single() for allocating
cacheable DMA buffers, utilize the dma_alloc_noncoherent() helper for the
allocation of long-lived cacheable DMA buffers, such as the peer's rx_tid.
Since dma_alloc_noncoherent() returns unaligned physical and virtual
addresses, align them internally before use within the driver. This
ensures proper allocation of non-coherent memory through the kernel
helper.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3

Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
Tested-by: Tim Harvey <tharvey@gateworks.com>
Link: https://patch.msgid.link/20250119164219.647059-3-quic_ppranees@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Stable-dep-of: e225b36f83d7 ("wifi: ath11k: Pass the correct value of each TID during a stop AMPDU session")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 18e28353074a3b20f7c92cbe62e78c2d918f8206)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…session

[ Upstream commit e225b36f83d7926c1f2035923bb0359d851fdb73 ]

During ongoing traffic, a request to stop an AMPDU session
for one TID could incorrectly affect other active sessions.
This can happen because an incorrect TID reference would be
passed when updating the BA session state, causing the wrong
session to be stopped. As a result, the affected session would
be reduced to a minimal BA size, leading to a noticeable
throughput degradation.

Fix this issue by passing the correct argument from
ath11k_dp_rx_ampdu_stop() to ath11k_peer_rx_tid_reo_update()
during a stop AMPDU session. Instead of passing peer->tx_tid, which
is the base address of the array, corresponding to TID 0; pass
the value of &peer->rx_tid[params->tid], where the different TID numbers
are accounted for.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1

Fixes: d5c6515 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Reshma Immaculate Rajkumar <reshma.rajkumar@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20260319065608.2408179-1-reshma.rajkumar@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 4073217be3df0c71121f99cdeafb97fe4b3fbc56)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 5ddfdcbe10dc5f97afc4e46ca22be2be717e8caf ]

When a key longer than block size is supplied, it is copied and then
hashed into the real key.  The memory allocated for the copy needs to
be rounded to DMA cache alignment, as otherwise the hashed key may
corrupt neighbouring memory.

The rounding was performed, but never actually used for the allocation.
Fix this by replacing kmemdup with kmalloc for a larger buffer,
followed by memcpy.

Fixes: 199354d ("crypto: caam - Remove GFP_DMA and add DMA alignment padding")
Reported-by: Paul Bunyan <pbunyan@redhat.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit a7ecf06d3ee06e9b3322e1e7b003ea5c6f6e135a)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 80688afb9c35b3934ce2d6be9973758915e2e0ef ]

When a key longer than block size is supplied, it is copied and then
hashed into the real key.  The memory allocated for the copy needs to
be rounded to DMA cache alignment, as otherwise the hashed key may
corrupt neighbouring memory.

The copying is performed using kmemdup, however this leads to an overflow:
reading more bytes (aligned_len - keylen) from the keylen source buffer.
Fix this by replacing kmemdup with kmalloc, followed by memcpy.

Fixes: 199354d ("crypto: caam - Remove GFP_DMA and add DMA alignment padding")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 31022cfde5235c45fa765f0aabeff5f0652852f2)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 62397b493e14107ae82d8b80938f293d95425bcb ]

The AF_ALG interface fails to unmark the end of a Scatter/Gather List (SGL)
when chaining a new af_alg_tsgl structure. If a sendmsg() fills an SGL
exactly to MAX_SGL_ENTS, the last entry is marked as the end. A subsequent
sendmsg() allocates a new SGL and chains it, but fails to clear the end
marker on the previous SGL's last data entry.

This causes the crypto scatterwalk to hit a premature end, returning NULL
on sg_next() and leading to a kernel panic during dereference.

Fix this by explicitly unmarking the end of the previous SGL when
performing sg_chain() in af_alg_alloc_tsgl().

Fixes: 8ff5909 ("crypto: algif_skcipher - User-space interface for skcipher operations")
Signed-off-by: Norbert Szetei <norbert@doyensec.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 7cdf2c6381b21ab5ccf8116750d5582fcd6c0f49)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit e8e44c98f789dee45cfd24ffb9d4936e0606d7c6 ]

When the PPS channel configuration was implemented, the channel
index for the periodic outputs was configured as the hardware
channel number.

The sysfs interface uses a logical channel index, and rejects numbers
greater than `n_per_out` (see period_store() in ptp_sysfs.c).
That property was left at 1, since the driver implements channel
selection, not simultaneous operation of multiple PTP hardware timer
channels.

A second check in fec_ptp_enable() returns -EOPNOTSUPP when the two
channel numbers disagree, making channels 1..3 unusable from sysfs.

Fix by removing this redundant check in the FEC PTP driver.

Fixes: 566c2d8 ("net: fec: make PPS channel configurable")
Signed-off-by: Buday Csaba <buday.csaba@prolan.hu>
Link: https://patch.msgid.link/8ec2afe88423c2231f9cf8044d212ce57846670e.1774359059.git.buday.csaba@prolan.hu
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 3e52e1b121c28a6120309c65d5e079328a45f059)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…leak

[ Upstream commit 2428083101f6883f979cceffa76cd8440751ffe6 ]

__radix_tree_create() allocates and links intermediate nodes into the
tree one by one. If a subsequent allocation fails, the already-linked
nodes remain in the tree with no corresponding leaf entry. These orphaned
internal nodes are never reclaimed because radix_tree_for_each_slot()
only visits slots containing leaf values.

The radix_tree API is deprecated in favor of xarray. As suggested by
Matthew Wilcox, migrate qrtr_tx_flow from radix_tree to xarray instead
of fixing the radix_tree itself [1]. xarray properly handles cleanup of
internal nodes — xa_destroy() frees all internal xarray nodes when the
qrtr_node is released, preventing the leak.

[1] https://lore.kernel.org/all/20260225071623.41275-1-jiayuan.chen@linux.dev/T/
Reported-by: syzbot+006987d1be3586e13555@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/000000000000bfba3a060bf4ffcf@google.com/T/
Fixes: 5fdeb0d ("net: qrtr: Implement outgoing flow control")
Signed-off-by: Jiayuan Chen <jiayuan.chen@shopee.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260324080645.290197-1-jiayuan.chen@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 0fda873092b541bb5a9b87d728a2429f863f8cfa)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…ields to zero to prevent an info-leak

[ Upstream commit ae05340ccaa9d347fe85415609e075545bec589f ]

When processing Router Advertisements with user options the kernel
builds an RTM_NEWNDUSEROPT netlink message. The nduseroptmsg struct
has three padding fields that are never zeroed and can leak kernel data

The fix is simple, just zeroes the padding fields.

Fixes: 3191057 ("[IPv6]: Export userland ND options through netlink (RDNSS support)")
Signed-off-by: Yochai Eisenrich <echelonh@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260324224925.2437775-1-echelonh@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 7f56d87e527bb5a13c3e8b0d5840cb6332822f6d)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 5e67ba9bb531e1ec6599a82a065dea9040b9ce50 ]

ioam6_fill_trace_data() stores the schema contribution to the trace
length in a u8. With bit 22 enabled and the largest schema payload,
sclen becomes 1 + 1020 / 4, wraps from 256 to 0, and bypasses the
remaining-space check. __ioam6_fill_trace_data() then positions the
write cursor without reserving the schema area but still copies the
4-byte schema header and the full schema payload, overrunning the trace
buffer.

Keep sclen in an unsigned int so the remaining-space check and the write
cursor calculation both see the full schema length.

Fixes: 8c6f6fa ("ipv6: ioam: IOAM Generic Netlink API")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Justin Iurman <justin.iurman@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit d1b041080086e91d3733a5438a8c51ad5d3d8e09)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit bb417456c7814d1493d98b7dd9c040bf3ce3b4ed ]

When driver signals carrier up via netif_carrier_on() its internal
link_up state isn't updated immediately. This leads to inconsistent
speed/duplex in /proc/net/bonding/bondX where the speed and duplex
is shown as unknown while ethtool shows correct values. Fix this by
using netif_carrier_ok() for link checking in get_ksettings function.

Fixes: 84421b9 ("tg3: Update link_up flag for phylib devices")
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit c64dc67d70da69427d8ff46077ea6470d7cfdbe2)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 86ab3e55673a7a49a841838776f1ab18d23a67b5 ]

Sashiko AI-review observed:

  In ip6_err_gen_icmpv6_unreach(), the skb is an outer IPv4 ICMP error packet
  where its cb contains an IPv4 inet_skb_parm. When skb is cloned into skb2
  and passed to icmp6_send(), it uses IP6CB(skb2).

  IP6CB interprets the IPv4 inet_skb_parm as an inet6_skb_parm. The cipso
  offset in inet_skb_parm.opt directly overlaps with dsthao in inet6_skb_parm
  at offset 18.

  If an attacker sends a forged ICMPv4 error with a CIPSO IP option, dsthao
  would be a non-zero offset. Inside icmp6_send(), mip6_addr_swap() is called
  and uses ipv6_find_tlv(skb, opt->dsthao, IPV6_TLV_HAO).

  This would scan the inner, attacker-controlled IPv6 packet starting at that
  offset, potentially returning a fake TLV without checking if the remaining
  packet length can hold the full 18-byte struct ipv6_destopt_hao.

  Could mip6_addr_swap() then perform a 16-byte swap that extends past the end
  of the packet data into skb_shared_info?

  Should the cb array also be cleared in ip6_err_gen_icmpv6_unreach() and
  ip6ip6_err() to prevent this?

This patch implements the first suggestion.

I am not sure if ip6ip6_err() needs to be changed.
A separate patch would be better anyway.

Fixes: ca15a07 ("sit: generate icmpv6 error when receiving icmpv4 error")
Reported-by: Ido Schimmel <idosch@nvidia.com>
Closes: https://sashiko.dev/#/patchset/20260326155138.2429480-1-edumazet%40google.com
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Oskar Kjos <oskar.kjos@hotmail.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260326202608.2976021-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 3d5127d998de617b130aae96b138dba22ac6a8a7)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 2edfa31769a4add828a7e604b21cb82aaaa05925 ]

Oskar Kjos reported the following problem.

ip4ip6_err() calls icmp_send() on a cloned skb whose cb[] was written
by the IPv6 receive path as struct inet6_skb_parm. icmp_send() passes
IPCB(skb2) to __ip_options_echo(), which interprets that cb[] region
as struct inet_skb_parm (IPv4). The layouts differ: inet6_skb_parm.nhoff
at offset 14 overlaps inet_skb_parm.opt.rr, producing a non-zero rr
value. __ip_options_echo() then reads optlen from attacker-controlled
packet data at sptr[rr+1] and copies that many bytes into dopt->__data,
a fixed 40-byte stack buffer (IP_OPTIONS_DATA_FIXED_SIZE).

To fix this we clear skb2->cb[], as suggested by Oskar Kjos.

Also add minimal IPv4 header validation (version == 4, ihl >= 5).

Fixes: c4d3efa ("[IPV6] IP6TUNNEL: Add support to IPv4 over IPv6 tunnel.")
Reported-by: Oskar Kjos <oskar.kjos@hotmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20260326155138.2429480-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit a0c4ce9900a108eaf55d0f3b399cb55999647d39)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit a01aee7cafc575bb82f5529e8734e7052f9b16ea ]

br_nd_send() parses neighbour discovery options from ns->opt[] and
assumes that these options are in the linear part of request.

Its callers only guarantee that the ICMPv6 header and target address
are available, so the option area can still be non-linear. Parsing
ns->opt[] in that case can access data past the linear buffer.

Linearize request before option parsing and derive ns from the linear
network header.

Fixes: ed842fa ("bridge: suppress nd pkts on BR_NEIGH_SUPPRESS ports")
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Tested-by: Ao Zhou <n05ec@lzu.edu.cn>
Co-developed-by: Yuan Tan <tanyuan98@outlook.com>
Signed-off-by: Yuan Tan <tanyuan98@outlook.com>
Suggested-by: Xin Liu <bird@lzu.edu.cn>
Signed-off-by: Yang Yang <n05ec@lzu.edu.cn>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20260326034441.2037420-2-n05ec@lzu.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 658261898130da620fc3d0fbb0523efb3366cb55)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 4576100b8cd03118267513cafacde164b498b322 ]

m2sm() converts a u32 slope to a u64 scaled value.  For large inputs
(e.g. m1=4000000000), the result can reach 2^32.  rtsc_min() stores
the difference of two such u64 values in a u32 variable `dsm` and
uses it as a divisor.  When the difference is exactly 2^32 the
truncation yields zero, causing a divide-by-zero oops in the
concave-curve intersection path:

  Oops: divide error: 0000
  RIP: 0010:rtsc_min (net/sched/sch_hfsc.c:601)
  Call Trace:
   init_ed (net/sched/sch_hfsc.c:629)
   hfsc_enqueue (net/sched/sch_hfsc.c:1569)
   [...]

Widen `dsm` to u64 and replace do_div() with div64_u64() so the full
difference is preserved.

Fixes: 1da177e ("Linux-2.6.12-rc2")
Reported-by: Weiming Shi <bestswngs@gmail.com>
Signed-off-by: Xiang Mei <xmei5@asu.edu>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/20260326204310.1549327-1-xmei5@asu.edu
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit c56f78614e7781aaceca9bd3cb2128bf7d45c3bd)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…failure

[ Upstream commit 622363757b2286dd2c2984b0d80255cbb35a0495 ]

ep93xx_i2s_enable() calls clk_prepare_enable() on three clocks in
sequence (mclk, sclk, lrclk) without checking the return value of any
of them. If an intermediate enable fails, the clocks that were already
enabled are never rolled back, leaking them until the next disable cycle
— which may never come if the stream never started cleanly.

Change ep93xx_i2s_enable() from void to int. Add error checking after
each clk_prepare_enable() call and unwind already-enabled clocks on
failure. Propagate the error through ep93xx_i2s_startup() and
ep93xx_i2s_resume(), both of which already return int.

Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
Fixes: f4ff6b5 ("ASoC: cirrus: i2s: Prepare clock before using it")
Link: https://patch.msgid.link/20260324210909.45494-1-jihed.chaibi.dev@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 584d8648f859fb76d7b11c5fc0085267d8c31dc8)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit fd63f185979b047fb22a0dfc6bd94d0cab6a6a70 ]

The mentioned helper try to warn the user about an exceptional
condition, but the message is delivered too late, accessing the ipv6
after its possible deletion.

Reorder the statement to avoid the possible UaF; while at it, place the
warning outside the idev->lock as it needs no protection.

Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://sashiko.dev/#/patchset/8c8bfe2e1a324e501f0e15fef404a77443fd8caf.1774365668.git.pabeni%40redhat.com
Fixes: f1705ec ("net: ipv6: Make address flushing on ifdown optional")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Link: https://patch.msgid.link/ef973c3a8cb4f8f1787ed469f3e5391b9fe95aa0.1774601542.git.pabeni@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 7d9f2f4aabd116ca68fbdab5d8fb8dac74c2ea1e)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
… zero to prevent an info-leak

[ Upstream commit e6e3eb5ee89ac4c163d46429391c889a1bb5e404 ]

When building netlink messages, tc_chain_fill_node() never initializes
the tcm_info field of struct tcmsg. Since the allocation is not zeroed,
kernel heap memory is leaked to userspace through this 4-byte field.

The fix simply zeroes tcm_info alongside the other fields that are
already initialized.

Fixes: 32a4f5e ("net: sched: introduce chain object to uapi")
Signed-off-by: Yochai Eisenrich <echelonh@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/20260328211436.1010152-1-echelonh@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit e35f5195cd44ff4053fbc5d71ea97681728a0099)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
[ Upstream commit 30fe3f5f6494f827d812ff179f295a8e532709d6 ]

pn532_receive_buf() appends every incoming byte to dev->recv_skb and
only resets the buffer after pn532_uart_rx_is_frame() recognizes a
complete frame. A continuous stream of bytes without a valid PN532 frame
header therefore keeps growing the skb until skb_put_u8() hits the tail
limit.

Drop the accumulated partial frame once the fixed receive buffer is full
so malformed UART traffic cannot grow the skb past
PN532_UART_SKB_BUFF_LEN.

Fixes: c656aa4 ("nfc: pn533: add UART phy driver")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260326142033.82297-1-pengpeng@iscas.ac.cn
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 2c1fadd221b21d8038acfe6a0f56291881d5ff76)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
dlech and others added 17 commits April 14, 2026 18:07
commit 24869650dff34a6fc8fd1cc91b2058a72f9abc95 upstream.

Rework ti_adc_trigger_handler() to properly handle data on big-endian
architectures. The scan data format is 16-bit CPU-endian, so we can't
cast it to a int * on big-endian and expect it to work. Instead, we
introduce a local int variable to read the data into, and then copy it
to the buffer.

Since the buffer isn't passed to any SPI functions, we don't need it to
be DMA-safe. So we can drop it from the driver data struct and just
use stack memory for the scan data.

Since there is only one data value (plus timestamp), we don't need an
array and can just declare a struct with the correct data type instead.

Also fix alignment of iio_get_time_ns() to ( while we are touching this.

Fixes: 4d671b7 ("iio: adc: ti-adc161s626: add support for TI 1-channel differential ADCs")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 7759f105e9c899463ad2f929dde0c4be68f3dd4e)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit 2f42c1a6161646cbd29b443459fd635d29eda634 upstream.

Ast's DP501 initialization reads the register SCU2C at offset 0x1202c
and tries to set it to source data from VGA. But writes the update to
offset 0x0, with unknown results. Write the result to SCU instead.

The bug only happens in ast_init_analog(). There's similar code in
ast_init_dvo(), which works correctly.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 83c6620 ("drm/ast: initial DP501 support (v0.2)")
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v3.16+
Link: https://patch.msgid.link/20260327133532.79696-2-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 32ac48642e71e8455c9fce0a6307e99ad74a3511)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
… eDP

commit 9c9a57e4e337f94e23ddf69263fd0685c91155fb upstream.

Looks like I missed the drm_dp_enhanced_frame_cap() in the ivb/hsw CPU
eDP code when I introduced crtc_state->enhanced_framing. Fix it up so
that the state we program to the hardware is guaranteed to match what
we computed earlier.

Cc: stable@vger.kernel.org
Fixes: 3072a24 ("drm/i915: Introduce crtc_state->enhanced_framing")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260325135849.12603-3-ville.syrjala@linux.intel.com
Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
(cherry picked from commit 799fe8dc2af52f35c78c4ac97f8e34994dfd8760)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit beadc871ccf868b153580f496a3e6269eac9ede4)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit 0e01c3416eb863ee7f156a9d7e7421ec0a9f68a0 upstream.

The Blackbox 724-746-5500 USB Director USB-RS-232 HUB, part number
IC135A, is a rebadged Edgeport/4 with its own USB device id.

Signed-off-by: Frej Drejhammar <frej@stacken.kth.se>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d3f78e9cd0bbeed03e4a8168cbee0fc871b11ded)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit 01e8d0f742222f1e68f48180d5480097adf7ae9f upstream.

Add VID/PID 33f8:1003 for the Rolling Wireless RW135R-GL M.2 module,
which is used in laptop debug cards with MBIM interface for
Linux/Chrome OS. The device supports mbim, pipe functionalities.

Here are the outputs of usb-devices:
T:  Bus=04 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=33f8 ProdID=1003 Rev=05.15
S:  Manufacturer=Rolling Wireless S.a.r.l.
S:  Product=Rolling RW135R-GL Module
S:  SerialNumber=12345678
C:  #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=896mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option
E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms

Signed-off-by: Wanquan Zhong <wanquan.zhong@fibocom.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 619d8d1cc4688467e37463c84a02799daffb3c2f)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit 8b7a42ecdcdeb55580d9345412f7f8fc5aca3f6c upstream.

The Razer Kiyo Pro (1532:0e05) is a USB 3.0 UVC webcam whose firmware
does not handle USB Link Power Management transitions reliably. When LPM
is active, the device can enter a state where it fails to respond to
control transfers, producing EPIPE (-32) errors on UVC probe control
SET_CUR requests. In the worst case, the stalled endpoint triggers an
xHCI stop-endpoint command that times out, causing the host controller
to be declared dead and every USB device on the bus to be disconnected.

This has been reported as Ubuntu Launchpad Bug #2061177. The failure
mode is:

  1. UVC probe control SET_CUR returns -32 (EPIPE)
  2. xHCI host not responding to stop endpoint command
  3. xHCI host controller not responding, assume dead
  4. All USB devices on the affected xHCI controller disconnect

Disabling LPM prevents the firmware from entering the problematic low-
power states that precede the stall. This is the same approach used for
other webcams with similar firmware issues (e.g., Logitech HD Webcam C270).

Cc: stable <stable@kernel.org>
Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2061177
Signed-off-by: JP Hein <jp@jphein.com>
Link: https://patch.msgid.link/20260331003806.212565-2-jp@jphein.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 624e292e74769adad674631367ebf89cc1575977)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit 768461517a28d80fe81ea4d5d03a90cd184ea6ad upstream.

Add a DMA-safe buffer and use it for spi_read() instead of a stack
memory. All SPI buffers must be DMA-safe.

Since we only need up to 3 bytes, we just use a u8[] instead of __be16
and __be32 and change the conversion functions appropriately.

Fixes: 4d671b7 ("iio: adc: ti-adc161s626: add support for TI 1-channel differential ADCs")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit fa64aab25aba47296aa8d12bb4c88ec3fecb2054)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit 7adaaee5edd35a423ae199c41b86bd1ed60ed483 upstream.

Lock f54->data_mutex when entering the function statement since jumping
to the 'error' label when checking report_size fails causes that mutex
to be unlocked.

This bug has been detected by the Clang thread-safety checker.

Fixes: 3a762db ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260223215118.2154194-16-bvanassche@acm.org
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a6d5d972460ca821a293e8d71ab609982f9936b9)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…k table

commit 5839419cffc7788a356428d321e3ec18055c0286 upstream.

The device occasionally wakes up from suspend with missing input on the
internal keyboard and the following suspend attempt results in an instant
wake-up. The quirks fix both issues for this device.

Signed-off-by: Christoffer Sandberg <cs@tuxedo.de>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Link: https://patch.msgid.link/20260223142054.50310-1-wse@tuxedocomputers.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 92b1a928570023bb5513dba59ed6140ef8f2a9a4)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
… mode

commit 0d9363a764d9d601a05591f9695cea8b429e9be3 upstream.

BETOP's BTP-KP50B and BTP-KP50C controller's wireless dongles are both
working as standard Xbox 360 controllers. Add USB device IDs for them to
xpad driver.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Link: https://patch.msgid.link/TY4PR01MB14432B4B298EA186E5F86C46B9855A@TY4PR01MB14432.jpnprd01.prod.outlook.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6260b66c005faaa140f500523c7dead28b0d55d1)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit e2b0ae529db4766584e77647cefe3ec15c3d842e upstream.

Add device IDs for the Razer Wolverine V3 Pro controller in both
wired (0x0a57) and wireless 2.4 GHz dongle (0x0a59) modes.

The controller uses the Xbox 360 protocol (vendor-specific class,
subclass 93, protocol 1) on interface 0 with an identical 20-byte
input report layout, so no additional processing is needed.

Signed-off-by: Zoltan Illes <zoliviragh@gmail.com>
Link: https://patch.msgid.link/20260329220031.1325509-1-137647604+ZlordHUN@users.noreply.github.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 81b90c03dd65f8932bfa1d2f6d0cb86715034bdb)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit 4f51e6c0baae80e52bd013092e82a55678be31fc upstream.

Temperature was wrongly represented as 12-bit signed, confirmed by checking
the datasheet. Even if the temperature is negative, the value in the
register stays unsigned.

Fixes: 12ed278 iio: accel: Add driver support for ADXL355
Signed-off-by: Valek Andrej <andrej.v@skyrain.eu>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 97d908087e85c5fd70b7958e58ce96db9eb44d02)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit c354521708175d776d896f8bdae44b18711eccb6 upstream.

Return the error code from regmap_bulk_read() instead of 0 so
that I/O failures are properly propagated.

Fixes: cbbb819 ("iio: dac: ad5770r: Add AD5770R support")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 13f4f2d04666148b0b92a8388623678019ae9330)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit fdc7aa54a5d44c05880a4aad7cfb41aacfd16d7b upstream.

Rework vcnl4035_trigger_consumer_handler() so that we are not passing
what should be a u16 value as an int * to regmap_read(). This won't
work on bit endian systems.

Instead, add a new unsigned int variable to pass to regmap_read(). Then
copy that value into the buffer struct.

The buffer array is replaced with a struct since there is only one value
being read. This allows us to use the correct u16 data type and has a
side-effect of simplifying the alignment specification.

Also fix the endianness of the scan format from little-endian to CPU
endianness. Since we are using regmap to read the value, it will be
CPU-endian.

Fixes: 5570729 ("iio: light: Add support for vishay vcnl4035")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit dae6048cb63fee4b60c8564592cbb79d399ed8f5)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
…g_pin()

commit c05a87d9ec3bf8727a5d746ce855003c6f2f8bb4 upstream.

If 'pin' is not one of its expected values, the value of
'int_out_ctrl_shift' is undefined.  With UBSAN enabled, this causes
Clang to generate undefined behavior, resulting in the following
warning:

  drivers/iio/imu/bmi160/bmi160_core.o: warning: objtool: bmi160_setup_irq() falls through to next function __cfi_bmi160_core_runtime_resume()

Prevent the UB and improve error handling by returning an error if 'pin'
has an unexpected value.

While at it, simplify the code a bit by moving the 'pin_name' assignment
to the first switch statement.

Fixes: 895bf81 ("iio:bmi160: add drdy interrupt support")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/a426d669-58bb-4be1-9eaa-6f3d83109e2d@app.fastmail.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 11aaba2824a146fbd516f39b963153559144fb60)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit 630748afa7030b272b7bee5df857e7bcf132ed51 upstream.

The st_lsm6dsx_set_fifo_odr() function, which is called when enabling and
disabling the hardware FIFO, checks the contents of the hw->settings->batch
array at index sensor->id, and then sets the current ODR value in sensor
registers that depend on whether the register address is set in the above
array element. This logic is valid for internal sensors only, i.e. the
accelerometer and gyroscope; however, since commit c91c1c8 ("iio: imu:
st_lsm6dsx: add i2c embedded controller support"), this function is called
also when configuring the hardware FIFO for external sensors (i.e. sensors
accessed through the sensor hub functionality), which can result in
unrelated device registers being written.

Add a check to the beginning of st_lsm6dsx_set_fifo_odr() so that it does
not touch any registers unless it is called for internal sensors.

Fixes: c91c1c8 ("iio: imu: st_lsm6dsx: add i2c embedded controller support")
Signed-off-by: Francesco Lavra <flavra@baylibre.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4cda5db84e9177f1cd598291758531d7f72c7e56)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
commit edb11a1aef4011a4b7b22cc3c3396c6fe371f4a6 upstream.

The handler for the IRQ part of this driver is mpu3050->trig but,
in the teardown free_irq() is called with handler mpu3050.

Use correct IRQ handler when calling free_irq().

Fixes: 3904b28 ("iio: gyro: Add driver for the MPU-3050 gyroscope")
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a09171d3f23e13bccd3dc34863186707c6301071)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 14, 2026

Reviewer's Guide

Rebase of Deepin 6.6-y kernel to 6.6.134 plus a set of targeted fixes across networking, wireless (ath11k/iwlwifi), netfilter/conntrack, audio, IIO, USB, and various subsystems, focusing on correct DMA/memory handling, race-condition fixes, safer helper/expect handling, bounds checking, and improved error propagation.

Class diagram for updated ath11k dp_rx_tid RX descriptor management

classDiagram
    class dp_rx_tid {
        +u8 tid
        +dma_addr_t paddr
        +u32 size
        +u32 ba_win_sz
        +u32 ssn
        +bool active
        +bool hw_qdesc_vaddr
        +struct list_head frag_list
        +struct timer_list frag_timer
        +struct ath11k_base *ab
        +u32 *vaddr_unaligned
        +dma_addr_t paddr_unaligned
        +u32 unaligned_size
    }

    class ath11k_base {
        +struct device *dev
        +spinlock_t base_lock
    }

    class ath11k_dp {
        +struct ath11k_base *ab
        +struct list_head reo_cmd_list
        +struct list_head reo_cmd_cache_flush_list
        +u32 reo_cmd_cache_flush_count
    }

    class ath11k {
        +struct ath11k_base *ab
    }

    class ath11k_peer {
        +struct dp_rx_tid rx_tid[ ]
    }

    ath11k_base <.. dp_rx_tid : owns_pointer
    ath11k_dp o-- ath11k_base
    ath11k o-- ath11k_base
    ath11k_peer o-- dp_rx_tid

    class dp_rx_tid_functions {
        +int ath11k_peer_rx_tid_setup(ath11k *ar, u8 *peer_mac, int vdev_id, int tid, u16 ssn, u16 ba_win_sz, int pn_type)
        +void ath11k_dp_rx_tid_mem_free(ath11k_base *ab, const u8 *peer_mac, int vdev_id, int tid)
        +void ath11k_peer_rx_tid_delete(ath11k *ar, u8 *peer_mac, int vdev_id, int tid)
        +void ath11k_dp_reo_cmd_list_cleanup(ath11k_base *ab)
        +void ath11k_dp_reo_cmd_free(ath11k_dp *dp, void *ctx, enum hal_reo_cmd_status status)
        +void ath11k_dp_reo_cache_flush(ath11k_base *ab, struct dp_rx_tid *rx_tid)
        +int ath11k_dp_rx_ampdu_stop(ath11k *ar, struct ieee80211_sta *sta, struct ieee80211_ampdu_params *params)
    }

    dp_rx_tid_functions ..> dp_rx_tid : alloc_noncoherent
    dp_rx_tid_functions ..> ath11k_base : dma_alloc_noncoherent,dma_free_noncoherent
    dp_rx_tid_functions ..> ath11k_dp : reo_cmd_list
    dp_rx_tid_functions ..> ath11k_peer : access_rx_tid
Loading

Class diagram for updated nf_conntrack_expect and helper interactions

classDiagram
    class nf_conntrack_expect {
        +struct hlist_node hnode
        +possible_net_t net
        +struct nf_conntrack_tuple tuple
        +struct nf_conntrack_tuple_mask mask
        +struct nf_conntrack_zone zone
        +refcount_t use
        +struct timer_list timeout
        +struct nf_conntrack_expect_policy *expect_policy
        +struct nf_conntrack_helper __rcu *helper
        +struct nf_conn *master
        +unsigned int class
        +u32 flags
        +u8 expectfn_name[ ]
    }

    class nf_conn {
        +struct nf_conntrack_zone zone
        +possible_net_t ct_net
    }

    class nf_conn_help {
        +struct nf_conntrack_helper __rcu *helper
    }

    class nf_conntrack_helper {
        +char name[ ]
        +u8 expect_class_max
    }

    nf_conn o-- nf_conn_help : nfct_help
    nf_conntrack_expect o-- nf_conn : master
    nf_conntrack_expect ..> nf_conntrack_helper : RCU_pointer_helper

    class nf_conntrack_expect_functions {
        +bool nf_ct_exp_equal(tuple, i, zone)
        +void nf_ct_expect_init(nf_conntrack_expect *exp, unsigned int class, u8 family, union nf_inet_addr *saddr, union nf_inet_addr *daddr, u8 proto, __be16 *src, __be16 *dst)
        +nf_conntrack_expect *nf_ct_expect_alloc(nf_conn *me)
        +bool nf_ct_exp_zone_equal_any(nf_conntrack_expect *a, nf_conntrack_zone *b)
        +struct net *nf_ct_exp_net(nf_conntrack_expect *exp)
    }

    class ctnetlink_expect_path {
        +nf_conntrack_expect *ctnetlink_alloc_expect(nlattr *cda[], nf_conn *ct, nf_conntrack_tuple *tuple, nf_conntrack_tuple *mask)
        +int ctnetlink_create_expect(struct net *net, nlmsghdr *nlh, nlattr *cda[])
        +int ctnetlink_exp_dump_expect(struct sk_buff *skb, nf_conntrack_expect *exp)
        +bool expect_iter_name(nf_conntrack_expect *exp, void *data)
    }

    ctnetlink_expect_path ..> nf_conntrack_expect : allocates_and_sets
    nf_conntrack_expect_functions ..> nf_conntrack_expect : initializes

    class helper_unregister_path {
        +bool expect_iter_me(nf_conntrack_expect *exp, void *data)
        +void nf_conntrack_helper_unregister(nf_conntrack_helper *me)
    }

    helper_unregister_path ..> nf_conntrack_expect : iterate_destroy_by_helper
    helper_unregister_path ..> nf_conntrack_helper : unregisters

    class broadcast_expect_path {
        +int nf_conntrack_broadcast_help(struct sk_buff *skb, struct nf_conn *ct, enum ip_conntrack_info ctinfo, unsigned int timeout)
    }

    broadcast_expect_path ..> nf_conntrack_expect : nf_ct_expect_init
    broadcast_expect_path ..> nf_conntrack_helper : rcu_assign_pointer(exp.helper, helper)
    broadcast_expect_path ..> nf_conn : read_pnet(ct.ct_net), zone

    class h323_sip_expect_paths {
        +int expect_h245(struct sk_buff *skb, struct nf_conn *ct,...)
        +int expect_q931(struct sk_buff *skb, struct nf_conn *ct,...)
        +int process_gcf(struct sk_buff *skb, struct nf_conn *ct,...)
        +int process_acf(struct sk_buff *skb, struct nf_conn *ct,...)
        +int process_lcf(struct sk_buff *skb, struct nf_conn *ct,...)
        +int process_register_request(struct sk_buff *skb, struct nf_conn *ct,...)
    }

    h323_sip_expect_paths ..> nf_conntrack_expect : use_nf_ct_expect_init
    h323_sip_expect_paths ..> nf_conntrack_helper : rcu_assign_pointer(exp.helper, helper)
Loading

File-Level Changes

Change Details Files
Fix ath11k DP RX TID buffer allocation and cleanup and add monitor status-ring DMA handling helper
  • Replace kmalloc+dma_map_single with dma_alloc_noncoherent for RX TID hw descriptors, track unaligned buffer and DMA address, and sync descriptor contents explicitly for device
  • Update all RX TID free paths and REO command cleanup to use dma_free_noncoherent on vaddr_unaligned/paddr_unaligned and reset new unaligned fields
  • Adjust AMPDU stop and reorder-queue setup code to use the stored DMA-mapped paddr and the new dp_rx_tid layout
  • Introduce ath11k_dp_rx_mon_buf_done and ath11k_hal_srng_src_next_peek to better handle monitor status ring DMA-done races by peeking ahead and safely skipping or freeing buffers
drivers/net/wireless/ath/ath11k/dp_rx.c
drivers/net/wireless/ath/ath11k/hal.c
drivers/net/wireless/ath/ath11k/hal.h
drivers/net/wireless/ath/ath11k/dp.h
Harden nf_flow_table_offload by bounding action list, propagating errors, and returning status from helpers
  • Introduce NF_FLOW_RULE_ACTION_MAX and guard flow_action_entry_next to cap num_entries, returning NULL on overflow
  • Convert IPv4/IPv6 SNAT/DNAT, L4 port mangling, checksum, redirect, and encap/decap helpers to return int and handle ENOSPC/EOPNOTSUPP
  • Update nf_flow_rule_route_ipv4/ipv6 and nf_flow_rule_route_common to bail out when helper calls fail or entries cannot be allocated, and ensure VLAN and tunnel actions also respect the action limit
  • Remove older per-rule max define and rely on the new bound
net/netfilter/nf_flow_table_offload.c
Rework conntrack expectations to store helper and zone directly on nf_conntrack_expect and make helper handling RCU-safe
  • Extend nf_conntrack_expect to store net namespace and (optionally) conntrack zone explicitly, and make helper pointer RCU-protected
  • Change nf_ct_expect_init and ctnetlink_alloc_expect to derive helper, net, and zone from the master conntrack and assign them via rcu_assign_pointer/write_pnet
  • Update various helpers (nf_conntrack_netlink, nf_conntrack_expect.c, nf_conntrack_helper.c, nf_conntrack_h323_main.c, nf_conntrack_sip.c, nf_conntrack_broadcast.c, nf_conntrack_sip.c, nf_conntrack_broadcast.c, nf_conntrack_h323_main.c) to use exp->helper/exp->net/exp zone helpers instead of dereferencing master->help
  • Tighten expectation destruction and helper unregister paths to iterate using the helper pointer stored on expects and avoid stale helper dereferences
include/net/netfilter/nf_conntrack_expect.h
net/netfilter/nf_conntrack_expect.c
net/netfilter/nf_conntrack_helper.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_broadcast.c
net/netfilter/nf_conntrack_h323_main.c
net/netfilter/nf_conntrack_sip.c
Improve robustness and bounds checking in several network protocol handlers and classifiers
  • Enforce per-family validity for xtables matches/targets on ARP, rejecting NFPROTO_UNSPEC ones on NFPROTO_ARP tables
  • Require baseclass/mark when attaching cls_flow and cls_fw filters to shared blocks, and ensure tc_chain_fill_node zeroes tcm_info
  • Harden cgroup, rateest, and ipset list set code by validating path/name length and using nla_strcmp with nla attributes
  • Fix qrtr_node tx-flow tracking by replacing radix trees with xarrays and adjusting all users, and ensure unregister wakes all waiters and cleans up xarray
  • Correct various protocol corner cases: x25 reassembly overflow check and fraglen reset, nd proxy skb linearization and NA building, ip4ip6/ip6_err_gen_icmpv6_unreach/ip6_datagram_send_ctl to clear control blocks and maintain txoptions length accounting, netem bit error injection only when headlen>0, HFSC rtsc_min division using 64-bit helper, nfnetlink_log size calculation for NLMSG_DONE, nftables verdict init rejecting NF_QUEUE immediates
net/netfilter/x_tables.c
net/sched/cls_flow.c
net/sched/cls_fw.c
net/sched/sch_netem.c
net/netfilter/xt_cgroup.c
net/netfilter/xt_rateest.c
net/netfilter/ipset/ip_set_core.c
net/netfilter/ipset/ip_set_list_set.c
include/linux/netfilter/ipset/ip_set.h
net/qrtr/af_qrtr.c
net/x25/x25_in.c
net/x25/x25_subr.c
net/bridge/br_arp_nd_proxy.c
net/ipv6/datagram.c
net/ipv6/ip6_tunnel.c
net/ipv6/icmp.c
net/ipv6/ioam6.c
net/ipv6/ndisc.c
net/netfilter/nfnetlink_log.c
net/sched/sch_hfsc.c
net/netfilter/nf_tables_api.c
Fix multiple Bluetooth stack race conditions, validation, and state handling
  • Ensure hci_le_remote_conn_param_req_evt holds hdev lock throughout, sends negative replies under lock, and updates connection params safely
  • Validate mesh_send payload lengths and adv_data_len, rejecting invalid or inconsistent sizes
  • Add LTK validation to bound enc_size by key storage size
  • Ensure sco_chan_add refuses sockets already bound to another connection and make sco_sock_connect/sco_connect re-check socket state under lock and handle error paths by dropping hci_conn ref
  • In hci_cmd_sync_run, execute callbacks directly when already on cmd_sync_work and ensure corresponding destroy callback is called with the result
net/bluetooth/hci_event.c
net/bluetooth/mgmt.c
net/bluetooth/sco.c
net/bluetooth/hci_sync.c
net/bluetooth/smp.c
Harden various driver DMA/IRQ paths and fix resource lifetime / error propagation
  • Convert several drivers (ti-adc161s626, vcnl4035, bno055, st_lsm6dsx, adxl355, ad5770r, mpu3050, bmi160, qaic, geni spi, tegra i2c, pmbus pxe1610/tps53679, occ) to use aligned stack structs, unaligned access helpers, proper timestamped scan structs, better error propagation, and correct buffer sizes/endian descriptors
  • Fix irq handlers to detect no-interrupt conditions properly (geni spi), free the correct irq cookie (mpu3050), and avoid IRQ-safe pm_runtime when pinctrl is in use (tegra i2c)
  • Adjust FEC PTP PPS enabling to not reject configuration just because index != pps_channel
  • In caam hash/ahash, allocate aligned hashed_key buffers sized to aligned_len rather than keylen and copy explicitly before hashing to avoid overflow
  • Ensure af_alg tsgl allocation properly unmarks chain end before sg_chain, avoiding corrupted scatterlists
drivers/iio/adc/ti-adc161s626.c
drivers/iio/light/vcnl4035.c
drivers/iio/imu/bmi160/bmi160_core.c
drivers/iio/imu/bno055/bno055.c
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
drivers/iio/gyro/mpu3050-core.c
drivers/hwmon/occ/common.c
drivers/hwmon/pmbus/pxe1610.c
drivers/hwmon/pmbus/tps53679.c
drivers/crypto/caam/caamalg_qi2.c
drivers/crypto/caam/caamhash.c
crypto/af_alg.c
drivers/spi/spi-geni-qcom.c
drivers/i2c/busses/i2c-tegra.c
drivers/net/ethernet/freescale/fec_ptp.c
drivers/accel/qaic/qaic_control.c
Tighten Mellanox mlx5 firmware querying and LAG debugfs setup
  • Change mlx5_fw_version_query to a void helper that initializes outputs to known values, logs warnings on error, and never returns a negative errno, updating callers to handle potential U32_MAX failure markers instead of error codes
  • Ensure LAG debugfs setup checks that a mlx5_lag exists before creating the 'lag' debugfs directory to avoid NULL dereferences during early or partial init
drivers/net/ethernet/mellanox/mlx5/core/fw.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
drivers/net/ethernet/mellanox/mlx5/core/devlink.c
drivers/net/ethernet/mellanox/mlx5/core/lag/debugfs.c
Miscellaneous correctness fixes across subsystems (Btrfs, USB, HID, input, DRM, arch-specific, etc.)
  • Add Btrfs checker constraint that non-zero drop_progress requires drop_level>=1 to avoid later BUG_ONs, and avoid taking device_list mutex while reading zoned device zone info at mount time
  • Multiple small driver/stack fixes: proper clk_unregister_fixed_rate in macb_pci, dp501 register write offset, drm_compat_ioctl using array_index_nospec, notify on short Wacom BT reports, validate returned HID feature IDs in hid-multitouch, fix RMI F54 worker mutex ordering, GPU objtool jump-table heuristic relaxation, AST DP SCU write fix
  • Architecture/low-level fixes: extend MIPS __multi3 workaround to GCC<10, use GFP_ATOMIC in r4k_tlb_uniquify during TLB context, add missing DW_CFA_advance_loc4 support in arm64 SCS unwinder, correct RISC-V kgdb register indices
  • Add/adjust platform/USB quirks and IDs for new hardware (i8042 DMI quirk, xpad/option/edgeport/USB quirks, holtek ht16k33 dt-binding unevaluatedProperties, Microchip mpfs GPIO interrupt-cells, sound/ctxfi SPDIF in index, snd-usb-caiaq id length termination), and fix tg3 MAC address routines to treat a default burned-in MAC as invalid and fallback to device_get_mac_address
fs/btrfs/tree-checker.c
fs/btrfs/zoned.c
drivers/net/ethernet/cadence/macb_pci.c
drivers/gpu/drm/ast/ast_dp501.c
drivers/gpu/drm/drm_ioc32.c
drivers/gpu/drm/i915/display/g4x_dp.c
drivers/hid/wacom_wac.c
drivers/hid/hid-multitouch.c
drivers/input/serio/i8042-acpipnpio.h
drivers/input/joystick/xpad.c
Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml
Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
arch/arm64/kernel/patch-scs.c
arch/mips/ralink/clk.c
arch/mips/mm/tlb-r4k.c
arch/mips/lib/multi3.c
arch/riscv/kernel/kgdb.c
drivers/usb/core/quirks.c
drivers/usb/serial/option.c
drivers/usb/serial/io_edgeport.c
drivers/usb/serial/io_usbvend.h
sound/usb/caiaq/device.c
sound/soc/cirrus/ep93xx-i2s.c
drivers/net/ethernet/broadcom/tg3.c
net/atm/lec.c
net/atm/lec.h
net/nfc/pn533/uart.c
net/rds/ib_rdma.c
net/sched/sch_hfsc.c
tools/objtool/check.c

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from opsiff. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s Linux 6.6.y kernel base to 6.6.134-p1, pulling in a broad set of upstream stable fixes and small enhancements across networking (netfilter/IPv6/BT), drivers (USB/IIO/wireless/ethernet), filesystems (btrfs), and tooling (objtool).

Changes:

  • Sync multiple subsystems/drivers with upstream 6.6.134 stable fixes (robustness, bounds checks, race fixes).
  • Improve safety/validation in several paths (length checks, buffer handling, RCU usage adjustments, error handling propagation).
  • Add/adjust device IDs, quirks, and DT binding corrections to match upstream.

Reviewed changes

Copilot reviewed 101 out of 101 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/objtool/check.c Relax jump back-pointer marking
sound/usb/caiaq/device.c Fix card id termination bound
sound/soc/cirrus/ep93xx-i2s.c Propagate clk enable failures
sound/pci/ctxfi/ctdaio.c Correct SPDIF input index
net/x25/x25_subr.c Reset fraglen on purge
net/x25/x25_in.c Fragment overflow/alloc handling changes
net/sched/sch_netem.c Guard zero-length corruption
net/sched/sch_hfsc.c 64-bit division for curve math
net/sched/cls_fw.c Enforce mark for shared blocks
net/sched/cls_flow.c Enforce baseclass for shared blocks
net/sched/cls_api.c Zero tcm_info in netlink dump
net/rds/ib_rdma.c Validate conn/QP before MR alloc
net/qrtr/af_qrtr.c Convert tx flow to xarray
net/netfilter/xt_rateest.c Validate estimator name lengths
net/netfilter/xt_cgroup.c Validate cgroup path length
net/netfilter/x_tables.c Reject non-ARP ext in ARP tables
net/netfilter/nfnetlink_log.c Fix NLMSG_DONE size accounting
net/netfilter/nf_tables_api.c Reject immediate NF_QUEUE verdict
net/netfilter/nf_flow_table_offload.c Bound action growth + error returns
net/netfilter/nf_conntrack_sip.c Expect helper via exp->helper RCU
net/netfilter/nf_conntrack_netlink.c Store helper/net/zone on expectations
net/netfilter/nf_conntrack_helper.c Fix helper-unregister expect cleanup
net/netfilter/nf_conntrack_h323_main.c Use rcu_assign_pointer for helper
net/netfilter/nf_conntrack_expect.c Expectation net/zone + helper RCU
net/netfilter/nf_conntrack_broadcast.c Store net/zone/helper on broadcast exp
net/netfilter/ipset/ip_set_list_set.c Pass nlattr to set lookup
net/netfilter/ipset/ip_set_core.c Switch lookup to nla_strcmp
net/ipv6/ndisc.c Zero padding in nduseropt msg
net/ipv6/ip6_tunnel.c Validate inner IPv4 header
net/ipv6/ip6_flowlabel.c Avoid freeing opts on release
net/ipv6/ioam6.c Widen schema length type
net/ipv6/icmp.c Clear IPv6 CB when reusing skb
net/ipv6/datagram.c Fix option length accounting
net/ipv6/addrconf.c Locking reorder for addr drop
net/hsr/hsr_device.c Correct VLAN unwind logic
net/core/skmsg.c RCU-safe sk_socket access
net/bridge/br_arp_nd_proxy.c Linearize skb before ND parsing
net/bluetooth/smp.c Enforce MITM tracking/forcing
net/bluetooth/sco.c Harden connect/double-bind races
net/bluetooth/mgmt.c Validate mesh send length + LTK size
net/bluetooth/hci_sync.c Ensure destroy callback on reentrant run
net/bluetooth/hci_event.c Locking/state checks for conn param req
net/atm/lec.h Convert lecd pointer to RCU
net/atm/lec.c RCU-protect lecd VCC usage/close
kernel/bpf/verifier.c Adjust PTR_TO_BUF + range safety logic
include/net/netfilter/nf_conntrack_expect.h Add net/zone + helper RCU
include/linux/netfilter/ipset/ip_set.h Update ip_set_get_byname signature
fs/btrfs/zoned.c Avoid device_list_mutex in mount path
fs/btrfs/tree-checker.c Validate drop_level vs drop_progress
drivers/usb/serial/option.c Add new modem device IDs
drivers/usb/serial/io_usbvend.h Add BlackBox IC135A PID
drivers/usb/serial/io_edgeport.c Recognize new Edgeport OEM ID
drivers/usb/core/quirks.c Disable LPM for Kiyo Pro
drivers/spi/spi-geni-qcom.c Handle DMA IRQ status in ISR
drivers/nfc/pn533/uart.c Avoid skb overrun on RX
drivers/net/wireless/microchip/wilc1000/hif.c Widen valuesize type
drivers/net/wireless/intel/iwlwifi/mvm/d3.c Fix ND match length validation
drivers/net/wireless/ath/ath11k/hal.h Add srng src next-peek prototype
drivers/net/wireless/ath/ath11k/hal.c Implement src next-peek helper
drivers/net/wireless/ath/ath11k/dp_rx.c Noncoherent DMA-safe RX TID + mon ring
drivers/net/wireless/ath/ath11k/dp.h Track unaligned DMA alloc fields
drivers/net/ethernet/xilinx/xilinx_axienet.h Use GENMASK for length fields
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h Make fw query non-fatal (void)
drivers/net/ethernet/mellanox/mlx5/core/lag/debugfs.c Guard lag debugfs creation
drivers/net/ethernet/mellanox/mlx5/core/fw.c Log fw query failures + partial results
drivers/net/ethernet/mellanox/mlx5/core/devlink.c Use new fw query semantics
drivers/net/ethernet/freescale/fec_ptp.c Allow PPS on any configured channel
drivers/net/ethernet/cadence/macb_pci.c Use clk_unregister_fixed_rate
drivers/net/ethernet/broadcom/tg3.c Use carrier state + default MAC fallback
drivers/input/serio/i8042-acpipnpio.h Add new DMI quirk entry
drivers/input/rmi4/rmi_f54.c Fix mutex lock ordering in work
drivers/input/joystick/xpad.c Add new controller IDs
drivers/iio/light/vcnl4035.c Fix trigger buffer alignment + endianness
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c Guard FIFO ODR config by sensor id
drivers/iio/imu/bno055/bno055.c Fix scan channel count
drivers/iio/imu/bmi160/bmi160_core.c Validate pin enum + clearer errors
drivers/iio/gyro/mpu3050-core.c Free IRQ with correct cookie
drivers/iio/dac/ad5770r.c Return error from SPI read
drivers/iio/adc/ti-adc161s626.c Handle unaligned SPI reads + scan struct
drivers/iio/accel/adxl355_core.c Fix temperature channel sign
drivers/i2c/busses/i2c-tegra.c Avoid IRQ-safe with pinctrl present
drivers/i2c/busses/Kconfig Ensure PINCTRL dependency for COMPILE_TEST
drivers/hwmon/pmbus/tps53679.c Stronger device ID validation
drivers/hwmon/pmbus/pxe1610.c Check page select return code
drivers/hwmon/occ/common.c Robust power avg + sysfs formatting
drivers/hid/wacom_wac.c Validate BT report lengths
drivers/hid/hid-multitouch.c Validate feature report ID
drivers/gpu/drm/i915/display/g4x_dp.c Use pipe config enhanced framing
drivers/gpu/drm/drm_ioc32.c Add array_index_nospec to compat ioctl
drivers/gpu/drm/ast/ast_dp501.c Fix SCU register writeback address
drivers/crypto/caam/caamhash.c Fix aligned key buffer allocation
drivers/crypto/caam/caamalg_qi2.c Fix aligned key buffer allocation
drivers/accel/qaic/qaic_control.c Handle missed deactivate + wait interrupt
crypto/af_alg.c Fix SG chaining end-marker handling
arch/riscv/kernel/kgdb.c Fix GDB reg mapping indices
arch/mips/ralink/clk.c Fix sysc node index selection
arch/mips/mm/tlb-r4k.c Use GFP_ATOMIC in atomic context
arch/mips/lib/multi3.c Update GCC version gating
arch/arm64/kernel/patch-scs.c Support DW_CFA_advance_loc4
Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml Fix #interrupt-cells to 2
Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml Use unevaluatedProperties

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread net/x25/x25_in.c
Comment on lines +37 to +39
/* make sure we don't overflow */
if (x25->fraglen + skb->len > USHRT_MAX)
return 1;
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the overflow guard, the function returns 1 without consuming/freeing the current skb. In the caller (x25_state3_machine), the error path does x25_clear_queues() but does not kfree_skb(skb), so this leaks the incoming skb. Consider freeing skb here (and optionally purging/resetting fragment state) before returning an error.

Copilot uses AI. Check for mistakes.
Comment thread net/x25/x25_in.c
Comment on lines +51 to 53
skbn = alloc_skb(len, GFP_ATOMIC);
if (!skbn)
return 1;
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If alloc_skb(len) fails when completing a fragmented frame, this now returns 1 without freeing the current skb. The caller treats this as an error but doesn't free skb, so the skb is leaked. Restoring kfree_skb(skb) (and potentially clearing any queued fragments) on this failure path would prevent the leak.

Copilot uses AI. Check for mistakes.
Comment on lines +1446 to +1459
u32 len = 0;
int j;

for (j = 0; j < msg_count && len < msg_len; ++j) {
struct wire_trans_hdr *trans_hdr;

trans_hdr = (struct wire_trans_hdr *)(msg->data + len);
if (le32_to_cpu(trans_hdr->type) == QAIC_TRANS_DEACTIVATE_FROM_DEV) {
if (decode_deactivate(qdev, trans_hdr, &len, NULL))
len += le32_to_cpu(trans_hdr->len);
} else {
len += le32_to_cpu(trans_hdr->len);
}
}
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback parsing of an unmatched device response uses msg_len = le32_to_cpu(msg->hdr.len) as the loop bound for indexing into msg->data. Since hdr.len is the total message length (including the header), this can read past the end of the encoded transactions (and into uninitialised bytes in the receive buffer). It also doesn't validate that trans_hdr->len is >= sizeof(*trans_hdr) / non-zero, so a malformed message could cause an infinite loop (len not advancing) or out-of-bounds access. Consider validating hdr.len against the maximum/received size and using a data length of (hdr.len - sizeof(msg->hdr)), plus per-transaction bounds checks before dereferencing trans_hdr or advancing len.

Suggested change
u32 len = 0;
int j;
for (j = 0; j < msg_count && len < msg_len; ++j) {
struct wire_trans_hdr *trans_hdr;
trans_hdr = (struct wire_trans_hdr *)(msg->data + len);
if (le32_to_cpu(trans_hdr->type) == QAIC_TRANS_DEACTIVATE_FROM_DEV) {
if (decode_deactivate(qdev, trans_hdr, &len, NULL))
len += le32_to_cpu(trans_hdr->len);
} else {
len += le32_to_cpu(trans_hdr->len);
}
}
u32 msg_data_len;
u32 len = 0;
int j;
if (msg_len < sizeof(msg->hdr) || msg_len > QAIC_MANAGE_EXT_MSG_LENGTH)
goto drop_resp_msg;
msg_data_len = msg_len - sizeof(msg->hdr);
for (j = 0; j < msg_count && len < msg_data_len; ++j) {
struct wire_trans_hdr *trans_hdr;
u32 trans_len;
if (msg_data_len - len < sizeof(*trans_hdr))
break;
trans_hdr = (struct wire_trans_hdr *)(msg->data + len);
trans_len = le32_to_cpu(trans_hdr->len);
if (trans_len < sizeof(*trans_hdr) || trans_len > msg_data_len - len)
break;
if (le32_to_cpu(trans_hdr->type) == QAIC_TRANS_DEACTIVATE_FROM_DEV) {
if (decode_deactivate(qdev, trans_hdr, &len, NULL))
len += trans_len;
} else {
len += trans_len;
}
}
drop_resp_msg:

Copilot uses AI. Check for mistakes.
@opsiff opsiff merged commit d96065e into deepin-community:linux-6.6.y Apr 14, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.