* [PATCH 6.18 000/703] 6.18.67-rc1 review
@ 2026-12-04 9:58 Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 001/703] drm/gem-dma: Support dedicated DMA device for allocation and mapping Greg Kroah-Hartman
` (35 more replies)
0 siblings, 36 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, linux-kernel, torvalds, akpm, linux,
shuah, patches, lkft-triage, pavel, jonathanh, f.fainelli,
sudipm.mukherjee, rwarsow, conor, hargar, broonie, achill, sr
This is the start of the stable review cycle for the 6.18.67 release.
There are 703 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 06 Dec 2026 10:04:59 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.18.67-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.18.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 6.18.67-rc1
Paulo Alcantara <pc@manguebit.org>
smb: client: don't spend read retries on reads cut short by a reconnect
Paulo Alcantara <pc@manguebit.org>
smb: client: don't give up writeback on the first replayable error
Paulo Alcantara <pc@manguebit.org>
smb: client: don't retry failed writes forever regardless of mount options
Paulo Alcantara <pc@manguebit.org>
smb: client: let umount -f abort retried reads and writes
Christopher Lusk <clusk@northecho.dev>
smb: client: set replay flag on the read send-error retry path
Marc Herrero <marcht@proton.me>
ASoC: qcom: audioreach: use a 32-bit container for S24_LE PCM
Marek Szyprowski <m.szyprowski@samsung.com>
dma-pool: release CMA pages on atomic_pool_expand() error path
Aneesh Kumar K.V (Arm) <aneesh.kumar@kernel.org>
dma-pool: fix page leak in atomic_pool_expand() cleanup
Marek Szyprowski <m.szyprowski@samsung.com>
dma: swiotlb: Round restricted DMA pool size down to IO_TLB_SEGSIZE
Yao Yiqi <yaoyiqi3@huawei.com>
fbcon: Avoid cancel_delayed_work_sync() in atomic context
Leon Ming <leonming@meta.com>
fuse: set dentry epoch before making the dentry visible
Hanson Wang <hanson.wang@ugreen.com>
drm/i915/dsb: Realign GOSUB only for QW slots 6 and 7
Jouni Högander <jouni.hogander@intel.com>
drm/i915/psr: Clear CFF state on flip flush
Imre Deak <imre.deak@intel.com>
drm/i915/ptl+: Fix TypeC detection for eDP on port B
Imre Deak <imre.deak@intel.com>
drm/i915/tc: Add separate intel_tc_phy_port_to_tc() for TC DDI/PHY ports
Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
drm/sched: Ensure stopped entity cannot be re-added to the run-queue
Fei Yu <fei.yu@intel.com>
drm/syncobj: Limit the number of handles and use kvmalloc for user-sized arrays
Thomas Hellström <thomas.hellstrom@linux.intel.com>
drm/xe/dma-buf: Validate BOs on export to charge the exporter
Thomas Hellström <thomas.hellstrom@linux.intel.com>
drm/xe: Don't abort the shrinker walk on -EBUSY
Shuicheng Lin <shuicheng.lin@intel.com>
drm/xe/shrinker: Take a runtime PM ref before shrinking non-system memory
Tejas Upadhyay <tejas.upadhyay@intel.com>
drm/xe/xe3p_lpg: flush shrinker bo cachelines manually
Paul Menzel <pmenzel@molgen.mpg.de>
drm/amd/display: Don't warn about vendor infoframe for non-infoframe sinks
Davey Hughes <davidralphhughes@gmail.com>
drm/amd/display: Keep FreeSync flip timing across plane resets
Maíra Canal <mcanal@igalia.com>
drm/vc4: Look up the async page flip fence before committing the flip
Maíra Canal <mcanal@igalia.com>
drm/vc4: Rebuild the V3D interrupt mask on every power transition
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: validate backup buffer size in command buffer processing
Chen, Junjia <junjia.chen@intel.com>
drm/xe: Unwrap sync fences before adding them as job dependencies
Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Fix target temp and tolerance for NCT6106/6116/6126
Liam R. Howlett (Google) <liam@infradead.org>
maple_tree: update internal warning and bug_on code
Aleksandr Loktionov <aleksandr.loktionov@intel.com>
i40e: avoid resetting BQL state when freeing temporary Tx rings in set_ringparam
Filip Balluch <fballuch@redhat.com>
i40e: fix freeing of TX rings on RX allocation failure
Günther Noack <gnoack3000@gmail.com>
landlock: Fix layer composition of LANDLOCK_ACCESS_FS_REFER
Axel Mierczuk <axel.mierczuk@1password.com>
ipvs: skip cport 0 connections in ip_vs_conn_out_get()
Zi Yan <ziy@nvidia.com>
mm/huge_memory: prevent losing PG_waiters in __split_folio_to_order()
Kuniyuki Iwashima <kuniyu@google.com>
mm/kasan: detect double-free involving kfree_rcu_sheaf()
Mike Rapoport (Microsoft) <rppt@kernel.org>
mm/vma: undo userfaultfd unmap preparation when unmapping fails
Amit Machhiwal <amachhiw@linux.ibm.com>
ring-buffer: Do not check si_mem_available() before deferred init completes
Marek Szyprowski <m.szyprowski@samsung.com>
riscv: mm: reserve the DTB before scanning reserved memory
Muchun Song <muchun.song@linux.dev>
riscv/mm: fix hotplug page-table destructor handling
Jisheng Zhang <jszhang@kernel.org>
riscv: convert pgtable_l4|l5_enabled to inline function
Mike Rapoport (Microsoft) <rppt@kernel.org>
userfaultfd: clear uffd state in child PTEs if uffd is released during fork
Umang Pokhriyal <umangpokhriyall@gmail.com>
userfaultfd: validate the whole range before changing write protection
Christian Schmidbauer <opensource@grische.xyz>
net: stmmac: dwmac1000: stop hardware from dropping checksum-error packets
Guixin Liu <kanie@linux.alibaba.com>
nvmet: use GFP_KERNEL for PR allocations
Stanley Jhu <stanleyjhu@google.com>
scsi: ufs: sysfs: Propagate runtime PM resume errors
Can Guo <can.guo@oss.qualcomm.com>
scsi: ufs: core: Introduce function ufshcd_query_attr_qword()
ozgun kultekin <ozgunkultekin@gmail.com>
smb: client: do not let the server grow a write subrequest
Shyam Prasad N <sprasad@microsoft.com>
cifs: make retry logic in read/write path consistent with other paths
Siddharth Chintamaneni <sidchintamaneni@gmail.com>
smb: client: fix busy dentry and inode on unmount from late oplock break
Siddharth Chintamaneni <sidchintamaneni@gmail.com>
smb: client: fix busy dentry on unmount from persistent handle reopen
Ruben Wauters <ruben.wauters@linux.dev>
drm/gud: fix potential divide error due to optimisation
Adrian Ambrozewicz <aambrozewicz@nvidia.com>
gpiolib: free the label of lines released after their chip was removed
Adrian Ambrozewicz <aambrozewicz@nvidia.com>
gpiolib: wait for pending label frees before cleaning up desc_srcu
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
gpiolib: don't overwrite the entire flags field in gpiod_free_commit()
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
gpiolib: clear debounce period before the "requested" flag
Cooper Morgan <ext-github@cwooper.dev>
drm/amd/display: Saturate refresh rates in v1/v2 FreeSync infopackets
Luca Ceresoli <luca.ceresoli@bootlin.com>
drm/display: bridge-connector: attach the encoder to the created connector
Christoph Hellwig <hch@lst.de>
direct-io: remove IOCB_NOWAIT support
Martin Belanger <martin.belanger@dell.com>
nvme-tcp: consume TLS records without application data
Martin Belanger <martin.belanger@dell.com>
nvme-tcp: move the TLS record read loop into a helper
Martin Belanger <martin.belanger@dell.com>
nvme-tcp: use an aligned buffer for the TLS record type
Miguel Ojeda <ojeda@kernel.org>
x86/rust: use `-Zindirect-branch-cs-prefix` for RETPOLINE builds
Gyeyoung Baek <gye976@gmail.com>
accel/rocket: Fix drm_mm UAF on close vs in-flight job
Guangshuo Li <lgs201920130244@gmail.com>
accel/rocket: put IOMMU domain on BO creation failure
Hugo Sales <hugo@hsal.es>
drm/amd/display: Add the AUX backlight minimum once on the custom curve
Carlos Bilbao <carlos.bilbao@kernel.org>
scsi: target: iscsi: reject invalid size Extended CDB AHS
Shuai Liu <847807867@qq.com>
xfrm: interface: drop non-IP packets before pskb_inet_may_pull()
Zhao Gongyi <zhaogongyi@bytedance.com>
ext4: fix OOB memmove in ext4_xattr_set_entry
Guicai Ma <maguicai@kylinos.cn>
KEYS: Use kfree_sensitive() in keyctl_pkey_e_d_s()
Jarkko Sakkinen <jarkko@kernel.org>
KEYS: trusted: Update static calls before init
Sinan Turunc <enscrpt@pm.me>
KEYS: serialise key instantiation against keyctl_chown_key()
Guicai Ma <maguicai@kylinos.cn>
KEYS: Fix userspace buffer overflow in keyctl_pkey_e_d_s()
Henry Martin <bsdhenrymartin@gmail.com>
KEYS: Fix crash on big_key read
Jarkko Sakkinen <jarkko@kernel.org>
KEYS: Fix asym key overflow in keyctl_pkey_verify()
Abhiraj Dutta <abhirajdutta7@gmail.com>
ALSA: hda/realtek: Fix duplicate LEDs on HP Spectre x360 16-f2xxx
Abhiraj Dutta <abhirajdutta7@gmail.com>
ALSA: hda/realtek: Add quirk for HP Spectre x360 2-in-1 Laptop 16-f2xxx
Parmjot Singh <parmjotsinghrobot@gmail.com>
ALSA: hda/realtek: Enable mute LEDs on HP Envy x360 15-ew0xxx
Oleg Antonyan <oleg.b.antonyan@gmail.com>
ALSA: hda/realtek: Fix headset mic on ASUS Zenbook S 13 UX5304MA
Akhil Arul <akhilarul324@gmail.com>
ALSA: hda/tas2781-spi: Set tas_hda->dev in probe
Takashi Iwai <tiwai@suse.de>
ALSA: oss: Fix deadlock at unregistering (again)
Suyuan Wang <stevewong@hust.edu.cn>
ALSA: fireworks: Abort the transaction on a bus reset
Suyuan Wang <stevewong@hust.edu.cn>
ALSA: firewire-lib: Abort the FCP transaction on a bus reset
Vasileios Almpanis <vasilisalmpanis@gmail.com>
usb: gadget: f_uac1_legacy: fix double close of the ALSA devices
Dave Airlie <airlied@redhat.com>
i915/vma: use kfree_rcu to make sure vma are freed after a rcu grace period
Michael S. Tsirkin <mst@redhat.com>
vhost: reject used ring batches larger than the ring
Michael S. Tsirkin <mst@redhat.com>
Revert "vhost: split out-of-order used ring batches at every wrap"
Aamir Ahmed <elb12345@hotmail.co.uk>
vhost: Run TIF_NOTIFY_RESUME work in the vhost_task loop
Xu Rao <raoxu@uniontech.com>
vhost/net: Fix receive queue test in busy poll
Brajesh Gupta <brajesh.gupta@imgtec.com>
drm/imagination: Set scheduler timeout period higher than Firmware timeout
Andrea Righi <arighi@nvidia.com>
sched_ext: Enable tick for finite slices on nohz_full
Po-Hao Huang <phhuang@realtek.com>
wifi: rtw89: modify active scan rule for 6GHz band
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
ASoC: SOF: Intel: lnl: Enable offload for UAOL link
Kuniyuki Iwashima <kuniyu@google.com>
ipv6: Flush exception route while replacing nexthop.
Kuniyuki Iwashima <kuniyu@google.com>
ipv6: Remove FIB6_EXCEPTION_BUCKET_FLUSHED.
David Hildenbrand (Arm) <david@kernel.org>
mm/gup: limit pagecache folio refcount when grabbing references
David Hildenbrand (Arm) <david@kernel.org>
mm/mmu_gather: flush pending references early before the folio limit
David Hildenbrand (Arm) <david@kernel.org>
mm: limit pagecache folio refcount when splicing into pipes
David Hildenbrand (Arm) <david@kernel.org>
mm: limit pagecache folio refcount when mapping pages
Zhan Xusheng <zhanxusheng1024@gmail.com>
vdso/math64: Use OPTIMIZER_HIDE_VAR() in __iter_div_u64_rem()
Chris Mason <mason@kernel.org>
futex: Fix private hash use-after-free on resize
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: say when we are busy, and leave the busy state on read
Bernard Pidoux <bernard.f6bvp@gmail.com>
rose: acknowledge delivered data before resetting a call
Bernard Pidoux <bernard.f6bvp@gmail.com>
ax25: leave the busy state when the application reads
Bernard Pidoux <bernard.f6bvp@gmail.com>
mkiss: leave the escaped state on any byte after FESC
Bernard Pidoux <bernard.f6bvp@gmail.com>
netrom: leave the busy state when the application reads
Bernard Pidoux <bernard.f6bvp@gmail.com>
netrom: bound the resequencing queue while we are busy
Bernard Pidoux <bernard.f6bvp@gmail.com>
netrom: clear the choke flag on frames sent again
Samuel Holland <samuel@sholland.org>
Revert "drm/rockchip: dw_hdmi_qp: remove now-redundant call to drm_connector_attach_encoder()"
Vincent Donnefort <vdonnefort@google.com>
tracing: Take trace_access_lock() in tracing_buffers_ioctl()
David Carlier <devnexen@gmail.com>
tracing: Ignore .function on the function trace event
David Carlier <devnexen@gmail.com>
tracing: Drop the synthetic event ref when clearing hist triggers
Steven Rostedt <rostedt@goodmis.org>
tracing: Do not allow user events to add a system name
Jaewon Jung <jaewon8868@gmail.com>
tracing: Avoid undefined shifts for zero histogram map size
Kyle Zeng <kylebot@openai.com>
tracing/filters: Treat zero-length dynamic strings as empty
Masami Hiramatsu (Google) <mhiramat@kernel.org>
tracing/filters: Handle out-of-range CPU for OP_NE in cpumask comparison
Masami Hiramatsu (Google) <mhiramat@kernel.org>
tracing/filters: Fix MATCH_END_ONLY regex matching for fixed-size strings
Masami Hiramatsu (Google) <mhiramat@kernel.org>
tracing/filters: Fix false success return in process_system_preds()
Masami Hiramatsu (Google) <mhiramat@kernel.org>
tracing/filters: Check for missing operand after operator in parse_pred()
David Carlier <devnexen@gmail.com>
tracing/user_events: Don't free an event that a dynamic event still references
Chaosheng Qu <chaosheng.qu.linux@gmail.com>
tracing/osnoise: Don't start a kthread in timerlat user-space mode
koraynilay <koray.fra@gmail.com>
smb: client: fix times assignments in cifs_posix_to_fattr()
koraynilay <koray.fra@gmail.com>
smb: client: fix negative timestamps being read from smb
Suyuan Wang <stevewong@hust.edu.cn>
smb: client: fail SMB2 responses with a bad signature
Fredric Cover <fredric.cover.lkernel@gmail.com>
smb: client: convert path_consumed to mount charset units
Stanley Jhu <stanleyjhu@google.com>
scsi: ufs: core: Introduce ufshcd_rpm_resume_and_get() helper
Stanley Jhu <stanleyjhu@google.com>
scsi: ufs: bsg: Abort ufs_bsg_request() when runtime resume fails
Praneeth Balasubramanian <praneeth@ucsb.edu>
scsi: target: iscsi: Check for existing sessions only after authentication
Shao Mingyin <shao.mingyin@zte.com.cn>
scsi: target: Fix NULL pointer dereference in target_dev_alua_lu_gp_store()
Shao Mingyin <shao.mingyin@zte.com.cn>
scsi: target: Fix NULL pointer dereference in core_alua_do_port_transition()
Ciro Iriarte <ciro.iriarte+software@gmail.com>
scsi: target: core: Parse APTPL res_type and res_scope as hex
Shao Mingyin <shao.mingyin@zte.com.cn>
nvmet: zns: return the namespace lookup error for Identify
Shao Mingyin <shao.mingyin@zte.com.cn>
nvmet: zero the entire Get Log Page transfer buffer
Shao Mingyin <shao.mingyin@zte.com.cn>
nvmet: use overflow-safe range checks in the file backend
Shao Mingyin <shao.mingyin@zte.com.cn>
nvmet: roll back queue bindings on connection failure
Shao Mingyin <shao.mingyin@zte.com.cn>
nvmet: handle short reads and writes in the file backend
Shao Mingyin <shao.mingyin@zte.com.cn>
nvmet-tcp: only wait for in-capsule data for inline SGLs
Shao Mingyin <shao.mingyin@zte.com.cn>
nvmet-fcloop: free the LS request when delivery fails
Shao Mingyin <shao.mingyin@zte.com.cn>
nvmet-fc: reject duplicate queue IDs on Create Connection
Yaohan Li <shunsheng1218@gmail.com>
nvme: stop asynchronous event work before ANA teardown
Shao Mingyin <shao.mingyin@zte.com.cn>
nvme: reject invalid reconnect_delay sysfs values
Yingjie Wang <1075151112@qq.com>
nvme: avoid wrapping admin_timeout and io_timeout
Shao Mingyin <shao.mingyin@zte.com.cn>
nvme-tcp: require the R2T offset to match the data sent
Shao Mingyin <shao.mingyin@zte.com.cn>
nvme-loop: release the target request when SG setup fails
Shao Mingyin <shao.mingyin@zte.com.cn>
nvme-auth: use the parsed offset for the DH-CHAP key
Joas Antonio dos Santos <joasantonio108@gmail.com>
net: usb: smsc75xx: reject frames without a full header and FCS
Zxyan Zhu <zxyan0222@gmail.com>
net: stmmac: re-enable on-chip parity checkers for XGMAC ASP 0x2
Christian Schmidbauer <opensource@grische.xyz>
net: stmmac: honour Rx checksum errors in the AF_XDP zero-copy path
Christian Schmidbauer <opensource@grische.xyz>
net: stmmac: dwmac1000: don't discard frames with only a checksum error
Arun Iyengar <aiyengar1990@gmail.com>
net: stmmac: drop the rest of the frame when napi_build_skb() fails
Chris J Arges <carges@cloudflare.com>
net: prevent receive header offset overflow during decapsulation
Eric Dumazet <edumazet@kernel.org>
net: openvswitch: use skb_set_transport_header_careful() in parse_ipv6hdr()
Nathan Chancellor <nathan@kernel.org>
net: microchip: encx24j600: Avoid unsequenced accesses to jiffies in encx24j600_tx()
Anthony Pighin <anthony.pighin@nokia.com>
net: gianfar: clear the pending Rx skb when freeing the Rx ring
Svyatoslav Nikolenko <nsvatoslav515@gmail.com>
net: e1000: fix warning in iounmap on probe failure
Daniel Wade <danjwade95@gmail.com>
net: bridge: fix skb leak of reinjected link-local frames
Daejun Park <daejun7.park@samsung.com>
xfs: wait for direct I/O before swapping extents
Rik van Riel <riel@surriel.com>
xfs: keep successful near rt allocations
Hengyu Liang <hengyul@cs.unc.edu>
xfs: fix f_bfree underflow in statfs()
Daejun Park <daejun7.park@samsung.com>
xfs: break layouts before swapping extents
Ding Feng <dingf3ng@gmail.com>
zonefs: ignore RLIMIT_FSIZE above LLONG_MAX in zonefs_write_check_limits()
Krystian Kaniewski <krystianmkaniewski@gmail.com>
xarray: fix index jumping backwards in xas_find()
Adrian Schlegel <me@adrianschlegel.com>
x86/mce: Do not treat cache hierarchy errors as memory errors
Richard Weinberger <richard@nod.at>
x86/Kconfig: Enable ROX also when STRICT_KERNEL_RWX is present
WeitaoWang-oc <WeitaoWang-oc@zhaoxin.com>
x86/apic/msi: Fix MSI interrupt affinity configuration
Antonio Borneo <antonio.borneo@foss.st.com>
watchdog: stm32_iwdg: set driver data before requesting interrupt
Antonio Borneo <antonio.borneo@foss.st.com>
watchdog: stm32_iwdg: serialize accesses to EWCR register
Zhao Feng <zhaofeng2@cmss.chinamobile.com>
watchdog: npcm: fix sleeping clock call in restart handler
Miklos Szeredi <mszeredi@redhat.com>
virtiofs: fix use-after-free of fs->tag on device removal
Michael S. Tsirkin <mst@redhat.com>
vhost: split out-of-order used ring batches at every wrap
Matt Turner <mattst88@gmail.com>
vgacon: Fall back to the dummy console if mapping VGA memory fails
Eric Dumazet <edumazet@kernel.org>
udp: use skb_set_transport_header_careful() in __udp6_lib_err_encap()
Juan Agustin Niccolini <juanagusnicco@gmail.com>
tcp: Fix the SO_REUSEPORT bind cache admitting a conflicting socket
Sebastian Reichel <sebastian.reichel@collabora.com>
spi: Fix runtime PM imbalance on pump transfer message error
Stephen Smalley <stephen.smalley.work@gmail.com>
selinux: check MAP_SHARED_VALIDATE mappings as shared
Günther Noack <gnoack3000@gmail.com>
selftests/landlock: Test that layering does not break refer
SJ Park <sj@kernel.org>
selftests/damon/sysfs_memcg_path_leak: define ksft_skip
Eric Dumazet <edumazet@kernel.org>
sctp: use skb_set_transport_header_careful() in sctp_v6_err()
Yves Bieri <yves.bieri@theori.io>
sctp: do not free a new asoc peeled off while sendmsg slept
Cen Zhang <zzzccc427@gmail.com>
ocfs2: serialize inode journal access with shutdown
Zhiyuan Zhang <zhiyuanzhang912@gmail.com>
ocfs2: fix kernel BUG in ocfs2_page_mkwrite() when write_end fails
Cen Zhang <zzzccc427@gmail.com>
ocfs2: advance locking_state through the live cursor
Cen Zhang <zzzccc427@gmail.com>
ocfs2/dlmfs: keep the superblock alive during lock work
Miguel Ojeda <ojeda@kernel.org>
objtool/rust: add more `noreturn` Rust functions for Rust 1.101.0
Karl Mehltretter <kmehltretter@gmail.com>
parisc: irq: Trace hardirq state in do_cpu_irq_mask()
Karl Mehltretter <kmehltretter@gmail.com>
parisc: Fix register corruption in 32-bit dynamic ftrace
Boyan Liu <yymhvert@gmail.com>
scsi: sd_zbc: Cap zone report count by buffer size
Shao Mingyin <shao.mingyin@zte.com.cn>
scsi: rdac: Keep the error status when controller lookup fails
Milan P. Gandhi <mgandhi@redhat.com>
scsi: mpi3mr: Validate reply frame size bounds
Jiale Yao <yaojiale02@163.com>
s390/dcssblk: Initialize device semaphore before sysfs registration
Gerald Schaefer <gerald.schaefer@linux.ibm.com>
s390/appldata: Fix error handling in appldata_generic_handler()
Peder Bergan <peder.bergan@gmail.com>
rust: str: tie Formatter to its backing buffer
Marwan Mohamed Zein <marawanzein222@gmail.com>
rust: iov: fix return lifetime of `copy_from_iter_raw()`
Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
riscv: unaligned: fix __setup handlers
Guobin Zhang <guobin.zhang@intel.com>
riscv: signal: protect regs->status RMW from concurrent preemption
Yunhui Cui <cuiyunhui@bytedance.com>
riscv: Fix SR_SUM leakage across context switches
Bradley Morgan <brads@mainlining.org>
powerpc32/modules: Reserve a PLT entry for ftrace_regs_caller
Nathan Chancellor <nathan@kernel.org>
powerpc/xmon: Avoid unsequenced accesses to tsk in show_task()
Jiale Yao <yaojiale02@163.com>
powerpc/eeh: NUL-terminate force recovery input
Paul Moses <p@1g4.org>
perf record: Reject CPU indices equal to the mask size
Yehyeong Lee <yhlee@isslab.korea.ac.kr>
RDMA/srpt: widen the indirect RDMA context counters
Yehyeong Lee <yhlee@isslab.korea.ac.kr>
RDMA/srpt: reject zero-length buffer descriptors
Yehyeong Lee <yhlee@isslab.korea.ac.kr>
RDMA/srpt: bound the indirect descriptor table to the IU
Deep Shah <deepshah146@gmail.com>
RDMA/siw: Fix use-after-free in siw_mem_id2obj()
Jaeyeong Lee <lee@jaeyeong.cc>
RDMA/rtrs: Register client event handler after capability check
Moshe Shemesh <moshe@nvidia.com>
RDMA/mlx5: Skip vport context query on FW without ib_virt support
Dezhen Lu <dezhen.lu@student.uni-tuebingen.de>
RDMA/mlx5: Fix DevX umem page size truncation for pages >= 4G
Abhijit Gangurde <abhijit.gangurde@amd.com>
RDMA/ionic: Use a linear QID space when udma_shift is zero
Nathan Chancellor <nathan@kernel.org>
rcu/nocb: Avoid unsequenced accesses to jiffies in show_rcu_nocb_state()
Nathan Chancellor <nathan@kernel.org>
qca_spi: Avoid unsequenced accesses to jiffies in qcaspi_netdev_tx_timeout()
Shrikanth Hegde <sshegde@linux.ibm.com>
PPC32: Fix hard_irq_disable to follow tracing and lockdep state
Muchun Song <muchun.song@linux.dev>
mm: fix missing page-table destructor in pagetable_free()
David Hildenbrand (Arm) <david@kernel.org>
mm/userfaultfd: fix PTE table overruns in UFFDIO_MOVE
David Hildenbrand (Arm) <david@kernel.org>
mm/rmap: fix PTE table overruns during batched unmap
Ridong Chen <chenridong@xiaomi.com>
mm/migrate: move NR_KERNEL_FILE_PAGES on cross-node migration
Ridong Chen <chenridong@xiaomi.com>
mm/migrate: move NR_FILE_THPS on cross-node migration
Andrew Morton <akpm@linux-foundation.org>
mm/mempolicy: use one node set for interleave weights
David Hildenbrand (Arm) <david@kernel.org>
mm/memfd: handle GUP pins more reliably when write-sealing
David Hildenbrand (Arm) <david@kernel.org>
mm/khugepaged: don't map folios that are not uptodate in MADV_COLLAPSE
Kuniyuki Iwashima <kuniyu@google.com>
mm/kasan/kunit: add double-free tests involving kfree_rcu_sheaf()
Jose Fernandez (Anthropic) <jose.fernandez@linux.dev>
mm/filemap: stop fault-around when the walk steps back
Wang Xiaolei <xiaoleiwangxiaolei@gmail.com>
mm/damon/tests/sysfs-kunit: fix leaked pid reference in add_targets test
Aveline Noir <jm5905938@gmail.com>
mm/damon/core: reset watermark wait state on each iteration
Mani Tofigh <mt4022@columbia.edu>
mm, swap: stop cluster list scans once swapoff clears SWP_WRITEOK
Gautam Menghani <gautam@linux.ibm.com>
KVM: PPC: Book3S HV: XICS: Update irq_type for cleanup to work
Gautam Menghani <gautam@linux.ibm.com>
KVM: PPC: Book3S HV: XICS: Avoid NULL ptr deref in kvmppc_xive_cleanup_vcpu()
Gautam Menghani <gautam@linux.ibm.com>
KVM: PPC: Book3S HV: Take SRCU read lock around kvmppc_h_page_init() call
Gautam Menghani <gautam@linux.ibm.com>
KVM: PPC: Book3S HV: Ensure that calls to idr_alloc are synchronized
Amit Machhiwal <amachhiw@linux.ibm.com>
KVM: PPC: Book3S HV: Disable preemption around host-side HPT lock users
Gautam Menghani <gautam@linux.ibm.com>
KVM: PPC: Book3S HV: Avoid spurious interrupts caused by LPCR_MER bit
Axel Mierczuk <axel.mierczuk@1password.com>
ipvs: validate cport in received sync records
Zihan Xi <zihanx@nebusec.ai>
ipvs: reject FTP control ports as data ports
Theodor Arsenij Larionov Trichkine <theodorlarionov@gmail.com>
ipvs: ftp: skip conntrack templates in ip_vs_ftp_out
Eric Dumazet <edumazet@kernel.org>
ipv6: mcast: use skb_set_transport_header_careful() in ipv6_mc_check_exthdrs()
Eric Dumazet <edumazet@kernel.org>
ipv6: gro: limit the number of extension headers
Jaeyeong Lee <lee@jaeyeong.cc>
net/tls: serialize context removal in tls_device_down()
Nathan Chancellor <nathan@kernel.org>
mptcp: Avoid unsequenced accesses to jiffies in mptcp_reset_tout_timer()
Liam R. Howlett (Google) <liam@infradead.org>
maple_tree: fix rcu reader NULL dereference after the tree is emptied
Joas Antonio dos Santos <joasantonio108@gmail.com>
mac802154: llsec: reject secured frames with security level 0
Alice Ryhl <aliceryhl@google.com>
kbuild: rust: disable function merging unconditionally
Henry Martin <bsdhenrymartin@gmail.com>
ip6mr: prevent info-leak in ip6mr_cache_report()
David Hildenbrand (Arm) <david@kernel.org>
iommufd: fix cleanup when adding memfd folio pins fails
Juan Parrado <jparrado.1817@gmail.com>
Input: xpad.c - add support for Hyperkin Xenon, Hori Taiko Controller DX, and 8BitDo M30
Juan Parrado <jparrado.1817@gmail.com>
Input: xpad - add support to Hori Real Arcade Pro 4
Sergei Kuznetsov <kernel@phnx47.net>
Input: xpad - add GameSir G7 Pro support
Yuan Yao <yaoyuan0329os@gmail.com>
Input: trackpoint - add new TP JYT_NDT device variant id 7
Liu Chao <liuc63@xiaopeng.com>
Input: goodix - reject a bak_ref length that cannot hold the checksum
Ivan Verbovoy <ivanverbovoy@gmail.com>
Input: da7280 - do not advertise FF_GAIN
Wentao Liang <vulab@iscas.ac.cn>
Input: cyapa - fix runtime PM leak in cyapa_update_rt_suspend_scanrate()
Ziheng Wei <zihengw03@163.com>
hwmon: (w83792d) Fix incorrect struct cast in show_temp1() and store_temp1()
Ziheng Wei <zihengw03@163.com>
hwmon: (w83791d) Fix incorrect struct cast in show_temp1() and store_temp1()
Wayne Ho <wayneho219@gmail.com>
hwmon: (sht3x) Fix overflow when writing alert limits
Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Fix tolerance bitmask when reading REG_FAN_MODE
Guenter Roeck <linux@roeck-us.net>
hwmon: (nct6775) Fix swapped temperature tolerance register writes
Ziheng Wei <zihengw03@163.com>
hwmon: (nct6775) Fix incorrect struct cast in beep callbacks
Rosen Penev <rosenp@gmail.com>
hwmon: (dell-smm) Reject out-of-range pwm values
Rosen Penev <rosenp@gmail.com>
hwmon: (dell-smm) Reject a fan_max that the BIOS cannot take
Vítor Hugo Silva <vitorhg20080@gmail.com>
hwmon: (ads7871) Add error handle from spi_setup()
Guenter Roeck <linux@roeck-us.net>
hwmon: Use per-device lockdep keys
Xuanqiang Luo <luoxuanqiang@kylinos.cn>
iavf: fix QoS capabilities memory leak
Xuanqiang Luo <luoxuanqiang@kylinos.cn>
iavf: fix ASQ command buffer leak on init failure
Xuanqiang Luo <luoxuanqiang@kylinos.cn>
iavf: add missing PTP adjustment callbacks
Sung Byeongchan <tjdqudcks0424@naver.com>
ieee802154: require CAP_NET_ADMIN for SIOCSIFADDR
Joas Antonio dos Santos <joasantonio108@gmail.com>
hugetlbfs: move hugetlbfs_free_inode tracepoint to ->destroy_inode()
Amaan Cheval <amaan.cheval@gmail.com>
gve: refuse XDP on queue formats without XDP support
Amaan Cheval <amaan.cheval@gmail.com>
gve: fix RX page refcount overflow from INT_MAX pagecnt_bias
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
gpiolib: don't overwrite the entire flags field in gpiod_get_direction()
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
gpiolib: keep the line state workqueue alive until device release
Lianjie Wang <lian@is.s.u-tokyo.ac.jp>
gpio: virtio: compute the line names size in a size_t
Lianjie Wang <lian@is.s.u-tokyo.ac.jp>
gpio: virtio: bound the line names block by its configured size
David Thompson <davthompson@nvidia.com>
gpio: mlxbf2: Disable interrupts around the chip lock in direction ops
Alexandre Becholey <alex@becholey.ch>
gpio: ljca: Validate the pin index of interrupt events
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
gpio: cdev: don't overwrite the whole flags field when configuring lines
Junyoung Jang <graypanda.inzag@gmail.com>
fuse: skip dcache instantiation for readdirplus names with embedded NUL
Miklos Szeredi <mszeredi@redhat.com>
fuse: limit name size in listxattr
Miklos Szeredi <mszeredi@redhat.com>
fuse: fix possible UAF in fuse_direntplus_link()
Hungyu Lin <dennylin0707@gmail.com>
fuse: clear the old EOF tail before writeback-cache writes
Weiming Shi <bestswngs@gmail.com>
fbdev: vfb: Validate framebuffer geometry and memory size
Tim Douglas <me@timdoug.com>
fbdev: valkyriefb: keep the framebuffer mapping size fixed
Xue Haolin <xuehaolin@uniontech.com>
fbdev: sstfb: Error out if pixclock equals zero
YuanZhe Liu <25031212351@stu.xidian.edu.cn>
fbdev: smscufx: keep the usb_device alive while ufx_data is in use
YuanZhe Liu <25031212351@stu.xidian.edu.cn>
fbdev: smscufx: don't free registered framebuffer on probe error
YuanZhe Liu <25031212351@stu.xidian.edu.cn>
fbdev: smscufx: allocate the size advertised in smem_len
Jianqiang Zou <jq.zou@outlook.com>
fbdev: radeonfb: reject a zero pixclock in radeonfb_check_var()
Tim Douglas <me@timdoug.com>
fbdev: macmodes: compare the pixel clock of each candidate mode
Steffen A. Mork <linux-dev@morknet.de>
fbdev: fm2fb: Fix iomem access
Eric Biggers <ebiggers@kernel.org>
fscrypt: Initialize ->ci_master_key before publication
Breno Leitao <leitao@debian.org>
fgraph: Do not mark index 0 in every shadow stack frame
Vineet Gupta <vineet.gupta@linux.dev>
fgraph: Allocate shadow stacks inline with GFP_NOWAIT
Sang-Heon Jeon <ekffu200098@gmail.com>
fault-inject: fix boot failure with fault injection boot parameters
Aristeu Rozanski <aris@redhat.com>
EDAC/i5000: Fix slot number passed to determine_mtr()
Marek Szyprowski <m.szyprowski@samsung.com>
dma: swiotlb: Serialize restricted DMA pool initialization
Marek Szyprowski <m.szyprowski@samsung.com>
dma: swiotlb: Properly tear down the default pool on exit
Marek Szyprowski <m.szyprowski@samsung.com>
dma-coherent: serialize reserved memory pool initialization
Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
cpufreq: Skip inactive policies in cpufreq_driver_target()
Sumit Gupta <sumitg@nvidia.com>
cpufreq: CPPC: Set CPPC Enable register in cpu_init()
Mickaël Salaün <mic@digikod.net>
capabilities: Check PR_SET_SECUREBITS with ns_capable()
Jiri Olsa <jolsa@kernel.org>
bpf: Restrict uprobe ctx writes to the registers ptrace can set
Xu Rao <raoxu@uniontech.com>
Bluetooth: MGMT: Fix runtime config status opcode
Joas Antonio dos Santos <joasantonio108@gmail.com>
Bluetooth: hci_qca: clear qca_memdump when discarding dump packets
Alex Kazinsky <a.kazinsky@ideco.ru>
blk-iocost: Fix overflow in donation weight calculation
Niklas Cassel <cassel@kernel.org>
ata: libata-scsi: fix the INC_512 bit test for SECURITY PROTOCOL IN/OUT
Justinien Bouron <jbouron@amazon.com>
ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8
Chen Yuxi <chenyuxi19@huawei.com>
ASoC: wm8962: Fix broken headset button caused by wrong guard constant
yzddMr6 <yzddmr6@gmail.com>
ASoC: qcom: q6dsp-lpass-clocks: Set driver data before registering clocks
Julius Bairaktaris <julius@bairaktaris.de>
ASoC: qcom: q6asm-dai: reject compress rings larger than the DMA buffer
Julius Bairaktaris <julius@bairaktaris.de>
ASoC: qcom: q6apm-dai: reject compress rings larger than the DMA buffer
Marc Herrero <marcht@proton.me>
ASoC: qcom: audioreach: only disconnect the route a mixer control owns
Nicholas E. Andrade <sdnick484@gmail.com>
ASoC: amd: acp: fix PDM ring buffer address on ACP7.x resume
Ben Cressey <ben@cressey.dev>
arm64: kexec: use a typed entry to fix kCFI oops
Ryan Roberts <ryan.roberts@arm.com>
arm64: cpufeature: Remove Neoverse-V3/AE from the BBML3 allow list
Muchun Song <muchun.song@linux.dev>
arm64/mm: fix destructor for unconstructed hotplug page tables
Vineet Gupta <vgupta@kernel.org>
ARC: io: work around GCC PR127718 in __raw_write{w,l}()
Christian Loehle <christian.loehle@arm.com>
ACPI: CPPC: Reject EPP registers narrower than 8 bits
Ye Weihua <yeweihua4@huawei.com>
ALSA: pcm: oss: Restore params flag after failed reconfiguration
Aldo Ariel Panzardo <qwe.aldo@gmail.com>
drm/vmwgfx: close TOCTOU on guest_memory_bo in surface reference ioctl
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: validate the framebuffer selected for cursor updates
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: validate GB-only cursor command limits
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: validate command body sizes before parsing
Aldo Ariel Panzardo <qwe.aldo@gmail.com>
drm/vmwgfx: return an error when a shared GB surface has no backup buffer
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: reserve dumb buffers while detaching their surfaces
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: reserve cursor MOBs before unpinning them
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: log MOB limits outside the manager spinlock
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: log missing primary planes only once
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: keep cursor mappings and pins with each plane state
Tomas M <tomas@slax.org>
drm/vmwgfx: include legacy hotspots in GB-only cursor images
Vladimir Popov <popov.nkv@gmail.com>
drm/vmwgfx: fix NULL pointer dereference in vmw_validation_bo_fence()
Jaeyeong Lee <finpiler@protonmail.com>
drm/vmwgfx: Erase the detached resource entry on resource release
Aldo Ariel Panzardo <qwe.aldo@gmail.com>
drm/vmwgfx: do not hand the embedded sg_table to the PRIME core
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: bound MKSSTAT lengths before rounding to pages
Zack Rusin <zack.rusin@broadcom.com>
drm/vmwgfx: avoid underflow when stripping short GuestInfo replies
Maíra Canal <mcanal@igalia.com>
drm/vc4: Complete async page flips from an ordered workqueue
Maíra Canal <mcanal@igalia.com>
drm/vc4: Start shader code at varying offsets in its BO
Maíra Canal <mcanal@igalia.com>
drm/vc4: Fix off-by-one in the shader record BO handle check
Maíra Canal <mcanal@igalia.com>
drm/vc4: Drop BO usecnt before releasing the old FB
Maíra Canal <mcanal@igalia.com>
drm/vc4: Clear the slice caches before resetting a stalled GPU
Maíra Canal <mcanal@igalia.com>
drm/vc4: Check for a validated shader before reading its thread mode
Maíra Canal <mcanal@igalia.com>
drm/vc4: Hold a runtime PM reference while allocating the binner BO
Wentao Liang <vulab@iscas.ac.cn>
drm/vc4: Fix firmware reference leak in vc4_hvs_bind()
Qiang Han <qiangh@amd.com>
drm/amdkfd: wait for the queue quiesce in concurrent SVM evictions
Jesse Zhang <Jesse.Zhang@amd.com>
drm/amdkfd: keep the DMA addresses of a range intact if splitting fails
Apurv Mishra <Apurv.Mishra@amd.com>
drm/amdkfd: Don't reuse a VRAM page that is still referenced
Perry Yuan <perry.yuan@amd.com>
drm/amdkfd: check CRIU SVM priv data bounds before allocating
David Francis <David.Francis@amd.com>
drm/amdkfd: Acquire cwsr buffer during CRIU resume
Jiaming Fan <fan.jiaming@hotmail.com>
drm/amdgpu: only unregister the ATPX handler if we registered it
David Rosca <david.rosca@amd.com>
drm/amdgpu: Fix VCE buffer size check for DPB and input surface
Erhan Bilgili <erhan.bilgili@gmail.com>
drm/amdgpu: Fix UserQ slot availability checks
Andrei Krautsou <an9949an@gmail.com>
drm/amdgpu: enable MGCG/FGCG/PERF_CLK for GC 11.0.2
Lijo Lazar <lijo.lazar@amd.com>
drm/amdgpu: Allow cancelling a requested NPS mode
Jackie Liu <liuyun01@kylinos.cn>
drm/amd/display: Fix logger leak on perf trace allocation failure
Wang Jiang <jiangwang@kylinos.cn>
drm/amdgpu/gfx_v9_0: Add gfxoff quirk for Lenovo Picasso 318F
Joshua Horne <hornejd@etsu.edu>
drm/amd/pm: send smu8 sclk level indices, not the level mask
Igor Paunovic <royalnet026@gmail.com>
accel/rocket: number the cores by devicetree position, not bind order
Sanjay Yadav <sanjay.kumar.yadav@intel.com>
drm/xe/query: Use ordered clock reads for engine cycles cpu_delta
Zongyao Bai <zongyao.bai@intel.com>
drm/xe/guc: Treat CT-disabled TLB invalidation as cancelled
Thomas Zimmermann <tzimmermann@suse.de>
drm/vblank: timer: Do not block within critical section
Jiaming Fan <fan.jiaming@hotmail.com>
drm/radeon: only unregister the ATPX handler if we registered it
Andrey Misiurov <amisiurov@cloudlinux.com>
drm/radeon: Bound GPIO I2C table entry count from VBIOS
Mohamed Ahmed <mohamedahmedegypt2001@gmail.com>
drm/nouveau: do not return early from a synchronous VM_BIND
Joe Finzel <joe@sudmix.de>
drm/nouveau/gsp: only handle GSP interrupts routed to the host
Dave Airlie <airlied@redhat.com>
drm/nouveau/disp: Set drm_mode_config_funcs.atomic_(check|commit) (attempt 2)
Shigeaki Asai <y-asai.0816@docomonet.jp>
drm/meson: encoder_dsi: load ENCL gamma table while ENCL is disabled
Imre Deak <imre.deak@intel.com>
drm/i915/ptl+: Add TypeC HPD pin selection for port B
Imre Deak <imre.deak@intel.com>
drm/i915/pps: Reset PPS state after TypeC port init on resume
Imre Deak <imre.deak@intel.com>
drm/i915/pps: Hold a TypeC link reference for PPS VDD
Imre Deak <imre.deak@intel.com>
drm/i915/dp_aux: Take the TypeC port lock after the PPS lock
Jouni Högander <jouni.hogander@intel.com>
drm/i915/display: Flush the fbdev frontbuffer
YuanZhe Liu <25031212351@stu.xidian.edu.cn>
drm/gud: avoid divide error in gud_stats_debugfs
Zizhi Wo <wozizhi@huawei.com>
block: fix BLKSECDISCARD zero-length range causing page cache invalidation
Sechang Lim <rhkrqnwk98@gmail.com>
bpf, sockmap: Clear the redirect target after the stream parser runs
Sechang Lim <rhkrqnwk98@gmail.com>
bpf: Reject kernel threads in bpf_task_work_schedule()
Marco Giunta <marco_giunta@outlook.it>
ASoC: aw88399: fix register used to disable I2S TX
Rosen Penev <rosenp@gmail.com>
gpio: mvebu: validate ngpios before use
Sahaj Chaudhari <sahaj123.sc@gmail.com>
gpio: davinci: use controller-specific MMIO for BINTEN
Peter Zijlstra <peterz@infradead.org>
perf: Fix sigtrap vs fast-switch
Peter Zijlstra <peterz@infradead.org>
perf: Fix sigtrap for software events
Tengda Wu <wutengda@huaweicloud.com>
perf: Prevent duplicate sigtrap task work enqueue
Florian Fainelli <florian.fainelli@broadcom.com>
net: dsa: tag_brcm: fix link-local detection with a prepended tag
Shravya KN <shravya.k-n@broadcom.com>
tg3: Fix heap overflow in unbuffered NVRAM write path
Pavan Chebbi <pavan.chebbi@broadcom.com>
tg3: Skip management FW version when APE firmware is not ready
Pavan Chebbi <pavan.chebbi@broadcom.com>
tg3: Don't fail probe if 31-bit coherent DMA mask is unsupported
Linus Torvalds <torvalds@linux-foundation.org>
net: dpaa2-eth: fix objtool warning and logic bug
Jiayuan Chen <jiayuan.chen@linux.dev>
tcp: fix negative sk_forward_alloc after MSG_ZEROCOPY append
Alexei Starovoitov <ast@kernel.org>
bpf, sockmap: Hold the psock of the work in sk_psock_backlog()
Alexei Starovoitov <ast@kernel.org>
bpf: Keep the MAC header in bpf_skb_change_tail()
Alexei Starovoitov <ast@kernel.org>
bpf: Take a neighbour of the L3 master in bpf_redirect_neigh()
Alexei Starovoitov <ast@kernel.org>
bpf: Clear family and port of a short address for cgroup sockaddr hooks
Alexei Starovoitov <ast@kernel.org>
bpf: Fail loads from a network header that was not set
Alexei Starovoitov <ast@kernel.org>
bpf: Clear the data that bpf_msg_push_data() adds
Alexei Starovoitov <ast@kernel.org>
bpf: Require CAP_PERFMON to read pinned maps with special fields
Alexei Starovoitov <ast@kernel.org>
bpf: Zero bpf_list_head in copies of map values
Alexei Starovoitov <ast@kernel.org>
bpf: Require CAP_PERFMON for dumps of xlated insns
Altgelt, Max (Nextron) <max.altgelt@nextron-systems.com>
bpf: don't skip other information if xlated_prog_insns is skipped
Alexei Starovoitov <ast@kernel.org>
bpf: Limit reads of variables of the kernel
Alexei Starovoitov <ast@kernel.org>
bpf: Give syscall programs without CAP_PERFMON the base helpers only
Alexei Starovoitov <ast@kernel.org>
bpf: Fix reads past an enum in prints of BTF data
Alexei Starovoitov <ast@kernel.org>
bpf: Refuse mmap() of a part of an arena
Alexei Starovoitov <ast@kernel.org>
bpf: Check the attach type when a cgroup link gets another program
Alexei Starovoitov <ast@kernel.org>
bpf: Fix NULL dereference in XDP redirect from async callbacks
Alexei Starovoitov <ast@kernel.org>
bpf: Do not fill jited line info for a hidden subprog
Alexei Starovoitov <ast@kernel.org>
bpf: Add the symbol of a prog before its id
Alexei Starovoitov <ast@kernel.org>
bpf: Do not trust the neighbour of tp_btf/neigh_create
Alexei Starovoitov <ast@kernel.org>
bpf: Keep the names in front of a number in delegate options
Alexei Starovoitov <ast@kernel.org>
bpf: Do not allow bpf_d_path() by an id of another BTF
Kuniyuki Iwashima <kuniyu@google.com>
tcp: Don't clear saddr before ->put_port().
Eric Dumazet <edumazet@kernel.org>
ipv6: mcast: do not pass uninitialized bytes to dev_mc_add()
Aristo Chen <aristo.chen@canonical.com>
net: dsa: felix: fix NULL pointer dereference in felix_port_enable()
Jan Schär <jan@jschaer.ch>
gpiolib: fix inverted trace values in gpiod_get_array_value()
Alexei Starovoitov <ast@kernel.org>
bpf: Save irq flags on the stack when freeing a list head or rb root
Kaitao Cheng <chengkaitao@kylinos.cn>
bpf: clear list node owner and unlink before drop
Alexei Starovoitov <ast@kernel.org>
bpf: net_sched: Defer bpf_kfree_skb() to irq_work with irqs off
Antonio Quartulli <antonio@mandelbit.com>
tun: bound the NAPI receive queue
Jiayuan Chen <jiayuan.chen@linux.dev>
ipv4: fix conntrack defrag forwarding after ip_frag_reinit()
Nicolai Buchwitz <nb@tipi-net.de>
net: systemport: accumulate the DIM packet and byte counters
Nicolai Buchwitz <nb@tipi-net.de>
net: systemport: restart DIM from the default profile on start
Nicolai Buchwitz <nb@tipi-net.de>
net: bcmgenet: reset the Rx discard count with the ring
Nicolai Buchwitz <nb@tipi-net.de>
net: bcmgenet: accumulate the DIM packet and byte counters
Nicolai Buchwitz <nb@tipi-net.de>
net: bcmgenet: keep DIM from getting stuck after close or suspend
Wang Haoran <wanghr2026@mail.zgclab.edu.cn>
net: bcmasp: avoid refcount drain on probe
Florian Fainelli <florian.fainelli@broadcom.com>
net: dsa: b53: fix mirror destination and source state tracking
Florian Fainelli <florian.fainelli@broadcom.com>
net: dsa: b53: fix mirror port encoding on BCM5325 and BCM5365
Florian Fainelli <florian.fainelli@broadcom.com>
net: dsa: b53: use the correct override register 2 Gbps bit
Florian Fainelli <florian.fainelli@broadcom.com>
net: dsa: b53: clear stale state when creating an ARL entry
Florian Fainelli <florian.fainelli@broadcom.com>
net: dsa: b53: fix the SRAB grant timeout check
Florian Fainelli <florian.fainelli@broadcom.com>
net: dsa: b53: initialize the jumbo frame size register offset
Jakub Kicinski <kuba@kernel.org>
eth: bnxt_en: restore Tx coalescing after re-allocating the completion ring
Jakub Kicinski <kuba@kernel.org>
eth: bnxt_en: restore Rx coalescing after re-allocating the completion ring
Saurabh Sengar <ssengar@linux.microsoft.com>
workqueue: Skip redundant unbound updates during CPU bringup
Marco Giunta <marco_giunta@outlook.it>
ASoC: aw88166: fix backup restoring the RE value instead of saving it
Andrea Parri <parri.andrea@gmail.com>
ftrace: Fix lost recursion records in ftrace_record_recursion()
Patrick Delaunay <patrick.delaunay@foss.st.com>
arm64: dts: st: mark STM32MP23 timer as stopping in suspend
Patrick Delaunay <patrick.delaunay@foss.st.com>
arm64: dts: st: add PSCI idle state to STM32MP23 CPU domains
Patrick Delaunay <patrick.delaunay@foss.st.com>
arm64: dts: st: add PSCI idle state to STM32MP25 CPU domains
Rodrigo Vivi <rodrigo.vivi@intel.com>
drm/xe/hwmon: Unregister hwmon before the device is unplugged
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq: intel_pstate: Use dedicated lock in set_power_ctl_ee_state()
Ard Biesheuvel <ardb@kernel.org>
efi/tpm: Allocate the event log from EFI loader data again
Ard Biesheuvel <ardb@kernel.org>
x86/efi: Disregard the INITRD and MEMATTR config tables after kexec
Karl Mehltretter <kmehltretter@gmail.com>
cgroup/rstat: disable preemption in css_rstat_updated()
Shihuang Liu <shlomojune6@gmail.com>
net: sock_reuseport: Check program type on the migration path
Alexei Starovoitov <ast@kernel.org>
bpf: Let the bpf_fastcall boundary cover the longest pattern
Christian Göttsche <cgzones@googlemail.com>
jbd2: set JBD2_LOADED under j_state_lock
Filipe Manana <fdmanana@suse.com>
btrfs: fix delayed inode count leak after failure to delete inode ref
Filipe Manana <fdmanana@suse.com>
btrfs: fix incorrect task accounting on error during io_uring read
Caleb Sander Mateos <csander@purestorage.com>
io_uring/uring_cmd: avoid double indirect call in task work dispatch
Filipe Manana <fdmanana@suse.com>
btrfs: fix blocking allocation for nowait encoded reads of inline extents
Filipe Manana <fdmanana@suse.com>
btrfs: abort transaction on failure to update inode after hole punching
Filipe Manana <fdmanana@suse.com>
btrfs: fix double release of space when cloning compressed inline extent
Filipe Manana <fdmanana@suse.com>
btrfs: fiemap: deal with inline extent in fiemap_find_last_extent_offset()
Arnav Kapoor <kapoorarnav43@gmail.com>
ASoC: SOF: control: reject out-of-range enum values
Filipe Manana <fdmanana@suse.com>
btrfs: zstd: fix UAF due to race between putting workspace and reclaim
Filipe Manana <fdmanana@suse.com>
btrfs: fix race between concurrent sync direct IO writes
Boris Burkov <boris@bur.io>
btrfs: downgrade the reflink source inode lock for tree walking
Boris Burkov <boris@bur.io>
btrfs: pre-flush reflink source before taking inode locks
Cheng Yongkang <teel4res@gmail.com>
btrfs: remove devid kobject when deleting a missing device
Hugo Sales <hugo@hsal.es>
cpufreq: intel_pstate: Refresh cpuinfo.max_freq when a CPU goes online
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq: intel_pstate: Use mutex guard for driver locking
Stefan Ghetu <stefan.ghetu@nxp.com>
ASoC: fsl_asrc_m2m: allow only one task at a time per stream
Stefan Ghetu <stefan.ghetu@nxp.com>
ASoC: fsl_easrc: fix context ownership on repeated hw_params
Stefan Ghetu <stefan.ghetu@nxp.com>
ASoC: fsl_asrc: fix pair ownership on repeated or failed hw_params
Stefan Ghetu <stefan.ghetu@nxp.com>
ASoC: fsl_asrc_m2m: fix out-of-bounds write when draining the output FIFO
Binbin Deng <18983559317@163.com>
btrfs: wait for a grace period before freeing a new device
Filipe Manana <fdmanana@suse.com>
btrfs: send: fix invalid access to inline extents in clone_range()
Filipe Manana <fdmanana@suse.com>
btrfs: send: fix missing hole punching during incremental send
Eric Dumazet <edumazet@kernel.org>
tun: flush uc and mc addresses in TUNSETLINK
Randy Dunlap <rdunlap@infradead.org>
chardev: GPIO common access methods: repair non-kernel-doc comment
Anastasia Eskova <anastasia.eskova@ibm.com>
s390/cert_store: Only allow the kernel to create cert_store_key keys
Anastasia Eskova <anastasia.eskova@ibm.com>
s390/cert_store: Allocate keyring with link restriction
Zhu Jun <zhujun2@cmss.chinamobile.com>
tools: gpio: Return success after monitoring requested events
Zhu Jun <zhujun2@cmss.chinamobile.com>
tools: gpio: Preserve device listing errors in lsgpio
Zhu Jun <zhujun2@cmss.chinamobile.com>
tools: gpio-hammer: Accept the maximum number of line offsets
Antonio Quartulli <antonio@mandelbit.com>
tun: complete the zerocopy buffer of packets consumed by XDP
Yifan Feng <evanfengff@gmail.com>
tracing/fprobe: Do not let KASAN check the $stackN read
Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
tools/bootconfig: Use the registered global tracing parameter names
Kai Vehmanen <kai.vehmanen@linux.intel.com>
ALSA: hda: intel: Release i915 power also when delayed probe fails
Petr Oros <poros@redhat.com>
ice: allow reading the last byte of the NVM and Shadow RAM regions
Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
ice: use global queue index in TC to-queue offload
Uri Dar <udar@nvidia.com>
net/mlx5: E-Switch, skip vport change work for disabled vports
Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
net: do not run out of frags in alloc_skb_with_frags()
Han Gao <gaohan@iscas.ac.cn>
riscv: efi: Map runtime MMIO with device attributes
Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
net: qrtr: ns: keep notifying local servers after a failed send
Xiangwu Lai <laixiangwu@cmss.chinamobile.com>
scsi: ufs-mediatek: Restore the M-PHY power state when va09 disable fails
Dimitri Daskalakis <daskald@meta.com>
eth: fbnic: skip freed Tx rings in fbnic_get_ts_stats()
Dimitri Daskalakis <daskald@meta.com>
eth: fbnic: skip disabled Tx rings when setting the queue NAPI
Yevgeny Kliteynik <kliteyn@nvidia.com>
net/mlx5: DR, Fix out-of-bounds write when sync to HW fails
Yevgeny Kliteynik <kliteyn@nvidia.com>
net/mlx5: HWS, Handle NULL in vport destination action creation
Eric Dumazet <edumazet@kernel.org>
net: clear skb->mac_len in skb_unset_mac_header()
Gal Pressman <gal@nvidia.com>
net/mlx5e: Release FIB event work flows before dropping RTNL
Imre Kaloz <kaloz@kernel.org>
net: marvell: prestera: disable port before changing its MAC mode
Jiayuan Chen <jiayuan.chen@linux.dev>
ipv6, calipso: fix data-race in calipso_cache_add() bucketsize check
Jingxuan Xie <jingxuanxie@deeproute.ai>
af_packet: avoid waiting for TPACKET_V3 copies at retirement
chris@kode54.net <chris@kode54.net>
ALSA: usb-audio: Ignore trailing whitespace in quirk_flags
Takashi Iwai <tiwai@suse.de>
ALSA: pcm: Fix potential ABBA deadlock at snd_pcm_action_nonatomic()
Kiran K <kiran.k@intel.com>
Bluetooth: btintel_pcie: Set only MAC_INIT in btintel_pcie_mac_init()
Thomas de Gruijter <thomasdegruijter@pm.me>
Bluetooth: MSFT: Only enable the advertisement filter with monitors
Thomas de Gruijter <thomasdegruijter@pm.me>
Bluetooth: MSFT: Record the filter state on Command Disallowed
Jiale Yao <yaojiale02@163.com>
usb: cdns3: report endpoint reset timeout
Sang-Hoon Choi <csh0052@gmail.com>
HID: nintendo: release the player ID when LED setup fails
Mathias Krause <minipli@grsecurity.net>
HID: Intel-thc-hid: Fix REGMAP dependency
Tim Zimmermann <tim@linux4.de>
hid: intel-thc-hid: Select SGL_ALLOC
Eren Çakar <hey@erencakar.com>
HID: letsketch: skip string descriptors the firmware does not implement
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
HID: sensor-hub: Remove clients before stopping hardware
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
HID: sensor: custom: Register enable attribute after misc device
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
HID: sensor: custom: Serialize misc device reads
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
HID: sensor: custom: Fix state lifetime during removal
Shunbo Shi <shishunbo@cmss.chinamobile.com>
usb: gadget: f_hid: fix get_req leak when usb_gstrings_attach() fails
Shunbo Shi <shishunbo@cmss.chinamobile.com>
usb: gadget: f_hid: fix race between userspace report update and GET_REPORT response
Shunbo Shi <shishunbo@cmss.chinamobile.com>
usb: gadget: f_hid: fix report_list entries leak
Koichiro Den <den@valinux.co.jp>
dmaengine: rcar-dmac: Add missing dma_descriptor_unmap()
Zhang Shurong <zhang_shurong@foxmail.com>
dmaengine: rcar-dmac: Fix PM usage counter imbalance
SeungUk Nam <tmddnr49449@gmail.com>
dmaengine: idxd: Free the minor number when cdev setup fails
Xiangwu Lai <laixiangwu@cmss.chinamobile.com>
dmaengine: stm32-mdma: Fix runtime PM reference leak in pm_suspend
Thaison Phan <thaisonphan@google.com>
tcp: accecn: initialize AccECN fields in syncookie path
Thaison Phan <thaisonphan@google.com>
tcp: initialize ir_rmt_addr and ir_loc_addr in cookie_v6_check()
Tariq Toukan <tariqt@nvidia.com>
net/mlx5e: SHAMPO: Do not merge packets with different kTLS RX state
Terrence Adams <tadamsjr@google.com>
scsi: pm8001: Offset hardware queue index for MSI-X pre-vector
Kordian Chmielewski <kudzo51@gmail.com>
net: bcm4908_enet: order the TX ring index accesses
Kordian Chmielewski <kudzo51@gmail.com>
net: bcm4908_enet: publish the buffer address before OWN
Kordian Chmielewski <kudzo51@gmail.com>
net: bcm4908_enet: unmap RX buffers on stop with their mapped size
Kordian Chmielewski <kudzo51@gmail.com>
net: bcm4908_enet: unmap the buffer of a dropped RX frame
Kordian Chmielewski <kudzo51@gmail.com>
net: bcm4908_enet: release the TX ring on stop
Kordian Chmielewski <kudzo51@gmail.com>
net: bcm4908_enet: drop a TX frame whose DMA mapping failed
Kordian Chmielewski <kudzo51@gmail.com>
net: bcm4908_enet: fix the TX ring wrap
Artemii Mashanov <ralerrdirsardx@gmail.com>
cxgb4: allocate the full ethtool filter location array
Alexander Duyck <alexanderduyck@fb.com>
fbnic: Wait for in-flight PTP timestamps before treating Tx as idle
Tianyi Gao <tianyi@cloudflare.com>
xsk: reject TX checksum requests that overflow skb->csum_start
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
HID: sensor: custom: Disable sensor before hub close on removal
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
HID: sensor: custom: Set owner for misc device
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
HID: sensor-hub: Synchronize callback removal with raw events
Myeonghun Pak <mhun512@gmail.com>
HID: magicmouse: disable the multitouch work on removal
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: hci_core: Don't fail removing a monitor unknown to the controller
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: MSFT: Free the response of the monitor commands
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: hci_core: Hold hdev->lock when removing advertisement monitors
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: hci_debugfs: Fix racy toggling of debugfs controlled flags
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: MSFT: Protect the event prefix with hdev->lock
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: MGMT: Fix use-after-free in mgmt_powering_down()
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: mgmt: Fix mesh transmission locking and lifetime
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: L2CAP: Don't use uninitialized EFS in l2cap_parse_conf_rsp()
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: mgmt: Reject zero multi advertising rotation duration
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Initialize ism array in query_diag320_subcodes()
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Fix out-of-bounds read in pr_dbf_vce()
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Fix max_vcxe_length output in pr_dbf_vcssb()
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Validate hash length in check_certificate_valid()
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Do not search the process keyrings for the cert_store keyring
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Fix keyring refcount handling in get_user_session_keyring()
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Fix error handling of get_user_session_keyring()
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Remove unnecessary static specifier in create_cs_keyring()
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Fix potential use-after-free caused by find_cs_keyring()
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Fix cs_keyring reference leak in fill_cs_keyring()
Heiko Carstens <hca@linux.ibm.com>
s390/cert_store: Check key_lookup() return code in invalidate_keyring_keys()
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: hci_event: Validate sent command length in LE Set Ext Adv Enable
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: SMP: Don't create the BR/EDR channel while unregistered
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: SMP: Check smp_data before using SMP_DEV()
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: SMP: Serialize link key updates from smp_notify_keys()
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: hci_sync: Hold hdev->lock in hci_schedule_adv_instance_sync()
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: hci_sync: Lock the lookup in hci_disable_ext_adv_instance_sync()
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: hci_core: Take req_sync lock in hci_power_on()
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Bluetooth: mgmt: Fix read_index_list() buffer overflow
Shawn Lin <shawn.lin@rock-chips.com>
phy: rockchip: snps-pcie3: Raise the SRAM init timeout
Changyul Lee <lcy8047@gmail.com>
scsi: ch: Remove the minor from ch_index_idr after device_destroy()
Kyle Mahlkuch <kmahlkuc@linux.ibm.com>
scsi: lpfc: Fix race conditions in ELS retry handling
Miri Korenblit <miriam.rachel.korenblit@intel.com>
wifi: iwlwifi: mvm: correctly check the API version
Michail Andreas Michalopoulos <mike.michalo@gmail.com>
ksmbd: sign the last response of a compound that ends early
Hongling Zeng <zenghongling@kylinos.cn>
phy: ti-pipe3: Fix clock leaks in init/exit error paths
Hongling Zeng <zenghongling@kylinos.cn>
phy: ti-pipe3: Fix EPROBE_DEFER handling for clock resources
Hongling Zeng <zenghongling@kylinos.cn>
phy: ti: pipe3: Fix clock resource leak on probe errors
Hongling Zeng <zenghongling@kylinos.cn>
phy: ti-pipe3: Fix ignored clock enable return value in init
Felix Gu <ustc.gu@gmail.com>
phy: ingenic: fix unbalanced regulator disable in exit
Sasha Levin <sashal@kernel.org>
selftests: drivers/s390x: Select uvdevice tests using the target architecture
Bart Van Assche <bvanassche@acm.org>
drm/msm: Fix a lock leak in msm_ioctl_gem_info_set_metadata()
Rob Clark <robin.clark@oss.qualcomm.com>
drm/msm/gem: Clear nr_ops in lookup_ops() failure path
Rob Clark <robin.clark@oss.qualcomm.com>
drm/msm/gem: Decrement loop idx if handle lookup fails
Rob Clark <robin.clark@oss.qualcomm.com>
drm/msm/gem: Disallow nr_bos for VM_BIND contexts
Thomas Hellström <thomas.hellstrom@linux.intel.com>
drm/msm: Remove abuse of drm_exec internals
Rob Clark <robin.clark@oss.qualcomm.com>
drm/msm/gem: Fix VM_BIND range check
Hung-Chun Tseng <alan.tseng.cs@gmail.com>
reset: spacemit: Fix the RCPU2 PWM reset registers
Colton Lewis <coltonlewis@google.com>
irqchip/gic-v4: Use a separate lockdep class for vPE doorbell IRQs
Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
reset: scmi: Set the device for the reset controller
Fuad Tabba <fuad.tabba@linux.dev>
irqchip/gic-v4: Unwind what its_alloc_vcpu_irqs() allocated on failure
Fuad Tabba <fuad.tabba@linux.dev>
irqchip/gic-v4: Clear the domain and fwnode pointers after freeing them
Selby Mashiki <mashikiselby@gmail.com>
memory: tegra: fix device_node leak in tegra186_mc_probe_device()
Myeonghun Pak <mhun512@gmail.com>
memory: tegra: Shut down Tegra210 EMC timers before teardown
Oleg Keri <okerixx@gmail.com>
soundwire: qcom: disable the interrupt before gating the clock
Sudeep Holla <sudeep.holla@kernel.org>
firmware: arm_scmi: Free mailbox state on mapping failure
Sudeep Holla <sudeep.holla@kernel.org>
firmware: arm_scmi: Unregister notifier on enable failure
Sudeep Holla <sudeep.holla@kernel.org>
firmware: arm_scmi: imx: Validate MISC control response size
Zhengping Jiang <jiangzp@google.com>
HID: vivaldi: avoid redundant feature report reads per usage
Shashikirana H K <shashikiranah@chromium.org>
HID: vivaldi: Extract feature report value directly in vivaldi_feature_mapping()
Julian Braha <julianbraha@gmail.com>
irqchip/gic-v3: Select HAVE_ARM_SMCCC_DISCOVERY only on arm64
Julian Braha <julianbraha@gmail.com>
firmware: smccc: Provide stubs for HAVE_ARM_SMCCC_DISCOVERY=n
David Cemin <dcemin@nvidia.com>
firmware: arm_ffa: Compare notify_id when looking up notifier callbacks
Geert Uytterhoeven <geert+renesas@glider.be>
firmware: arm_scmi: Update ARM_SCMI_HAVE_TRANSPORT rationale
Mario Limonciello <mario.limonciello@amd.com>
tpm: Call cmd_ready/go_idle for each command transmission
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Revert "wifi: ath10k: Stop unanswered temperature reads"
Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
iio: inv_sensors: do not compute period estimation when updating odr
Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
iio: inv_sensors: fix estimated value larger than interrupt timestamp
Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
iio: inv_sensors: prevent timestamps going back in time in transitions
Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
iio: inv_sensors: improve period measurement by using a longer delay
Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
iio: inv_sensors: better timestamp alignment when using watermark
Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
iio: inv_sensors: convert to kernel types
Shi Hao <i.shihao.999@gmail.com>
iio: common: fix spelling mistakes in comments
Jocelyn Falempe <jfalempe@redhat.com>
drm/ast: Handle framebuffer from dma-buf
Julian Anastasov <ja@ssi.bg>
ipvs: honor the overload state and do not enter it forever
Julian Anastasov <ja@ssi.bg>
ipvs: read flags and seqs in master atomically
Myeonghun Pak <mhun512@gmail.com>
iio: proximity: hx9023s: Allocate trigger before requesting IRQ
Pan Chuang <panchuang@vivo.com>
iio: proximity: Remove redundant dev_err()/dev_err_probe()
Christopher Hoover <ch@murgatroid.com>
iio: humidity: hid-sensor-humidity: Use per-instance callbacks
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
usb: dwc3: xilinx: unwind ZynqMP platform init on probe failure and remove
Josef Bacik <josef@toxicpanda.com>
w1: w1_therm: lock the list of slaves for the bulk read
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
usb: dwc3: xilinx: re-assert resets on ZynqMP init error paths
Sean Anderson <sean.anderson@linux.dev>
usb: dwc3: Always deassert xilinx resets
Ihor Urazov <z0rc3r@gmail.com>
usb: typec: ucsi: acpi: Assume UCSI 1.0 on HP ZBook 8 G2i 14
Paulo Alcantara <pc@manguebit.org>
smb: client: don't fail writeback preparation if the task is dying
Paulo Alcantara <pc@manguebit.org>
smb: client: don't write back through O_DIRECT handles
Joseph Qi <joseph.qi@linux.alibaba.com>
smb: client: hold server ref while queueing reconnect work
Daejun Park <daejun7.park@samsung.com>
ovl: bump the impure dir version when linking a file with origin
Giuseppe Scrivano <giuseppe@scrivano.org>
ovl: follow lower to lowerdata redirects from any lower layer
Amir Goldstein <amir73il@gmail.com>
ovl: do not check the deferred lowerdata redirect on index lookup
Amir Goldstein <amir73il@gmail.com>
ovl: fix leak of lowerdata redirect on ovl_get_inode() failure
Amir Goldstein <amir73il@gmail.com>
ovl: do not read the flags of a put upper dentry in lookup
Christian Brauner <brauner@kernel.org>
ovl: refactor ovl_lookup()
Takashi Iwai <tiwai@suse.de>
Revert "ALSA: hda/realtek: Fix silent speaker on Higole F9B"
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
ACPI: PM: Avoid initializing power management for absent devices
Christopher Hoover <ch@murgatroid.com>
iio: temperature: hid-sensor-temperature: Use per-instance callbacks
Josef Bacik <josef@toxicpanda.com>
iio: adc: ad7923: add the AD7927 to the SPI ID table
Ming-Hung Tsai <mtsai@redhat.com>
dm: fix use-after-free when dm_get_device() widens the open mode
Kirtikumar Anandrao Ramchandani <kirtiar15502@gmail.com>
dm cache: validate the discard block size before narrowing
Sasha Levin <sashal@kernel.org>
Revert "mm/hugetlb_vmemmap: fix incorrect vmemmap restore in rollback"
Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Bluetooth: l2cap: defer conn param update to avoid conn->lock/hdev->lock inversion
Tejun Heo <tj@kernel.org>
sched_ext: Fix ops.enqueue/dispatch() calls before ops.cpu_online()
Vishwaroop A <va@nvidia.com>
spi: tegra210-quad: Unmap DMA buffers on transfer timeout
Vishwaroop A <va@nvidia.com>
spi: tegra210-quad: Check hardware status on timeout
Vishwaroop A <va@nvidia.com>
spi: tegra210-quad: Refactor error handling into helper functions
Zhao Li <enderaoelyther@gmail.com>
Bluetooth: L2CAP: Only accept LE responses to outstanding requests
Vlastimil Babka (SUSE) <vbabka@kernel.org>
mm/page_alloc: remove the zone_spans_pfn() check from get_pfnblock_bitmap_bitidx()
Brendan Jackman <jackmanb@google.com>
mm: rejig pageblock mask definitions
Josef Bacik <josef@toxicpanda.com>
mm: page_isolation: do not take slab pages for free
David Hildenbrand (Arm) <david@kernel.org>
mm/memory_hotplug: fix possible race in scan_movable_pages()
Kefeng Wang <wangkefeng.wang@huawei.com>
mm: page_isolation: introduce page_is_unmovable()
Gregory Price (Meta) <gourry@gourry.net>
mm/page_alloc: retry alloc_contig_pages() when the zonelist is rebuilt
Gregory Price <gourry@gourry.net>
page_alloc: allow migration of smaller hugepages during contig_alloc
Gregory Price (Meta) <gourry@gourry.net>
mm/hugetlb: retry the pool walk when the zonelist is rebuilt
Gregory Price (Meta) <gourry@gourry.net>
mm/page_alloc: retry allocations that raced with a zonelist rebuild
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq: Fix updates of cached resolved frequency and index
Wentao Liang <vulab@iscas.ac.cn>
gpio: keep the chip reference when deferred setup fails
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
gpio: mvebu: fix sleeping-while-atomic in mvebu_gpio_level_irq_mask()
Rosen Penev <rosenp@gmail.com>
gpio: mvebu: name regmaps to fix debugfs collisions
Zhao Li <enderaoelyther@gmail.com>
wifi: mac80211_hwsim: ignore non-generic netlink releases
Ian Bridges <icb@fastmail.org>
ksmbd: skip metadata-only opens in sharing checks
Seiji Nishikawa <snishika@redhat.com>
sched/core: Do not touch SMT siblings that have not joined the core yet
Stefan Haberland <sth@linux.ibm.com>
s390/dasd: Re-initialize RCD buffer with "V1.0" before every start
Stefan Haberland <sth@linux.ibm.com>
s390/dasd: Fix typo 'immediatly' -> 'immediately'
Anton Lundin <glance@ac2.se>
hwmon: (nct6775) Handle dual use registers
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
watchdog: rzv2h: Drop runtime PM handling from WDTDCR init
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
watchdog: rzv2h: Use pm_runtime_put_sync()
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
watchdog: rz: Discard pm_runtime_put() return values
Tim Menninger <tmenninger@everpuredata.com>
pNFS: avoid repeatedly cancelling I/O for the same lseg
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
cpufreq: Force passing target frequency to driver during resume
Viresh Kumar <viresh.kumar@linaro.org>
cpufreq: Avoid redundant target() calls for unchanged limits
Uladzislau Zhauniarovich <uladzislau.zhauniarovich@gmail.com>
arm64: suspend: Only track cpuidle context for idle tasks
Ada Couprie Diaz <ada.coupriediaz@arm.com>
arm64: suspend: rely on daif helpers to handle PMR
Waiman Long <longman@redhat.com>
cgroup/cpuset: Correctly set isolated_cpus when switching partition state
Yingjie Wang <x-professor@outlook.com>
tcp: free saved_syn after an RCU grace period
Eric Dumazet <edumazet@google.com>
tcp: move __reqsk_free() out of line
Cheng Yongkang <teel4res@gmail.com>
btrfs: reject refs=0 subvolume without DEAD in SUBVOL_SYNC_WAIT
Yuansheng Yang <0xbeac@gmail.com>
KEYS: Protect pkey method checks against type removal
Mohammed EL Kadiri <med08elkadiri@gmail.com>
keys: keyctl_pkey: replace BUG with return -EOPNOTSUPP
Jarkko Sakkinen <jarkko@kernel.org>
KEYS: Expand key->{datalen,quotalen} to unsigned int
Masami Hiramatsu (Google) <mhiramat@kernel.org>
kprobes: Switch ftrace ops when adding probe with post_handler
Arnav Kapoor <kapoorarnav43@gmail.com>
iio: proximity: sx9360: fix sampling frequency write and available range
Kuba Piecuch <jpiecuch@google.com>
sched_ext: Read exit_kind before flushing in scx_flush_disable_work()
Kuniyuki Iwashima <kuniyu@google.com>
ipv6: Remove IPV6_ADDRFORM.
Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
tools/bootconfig: Close only opened braces in compact output
YuanZhe Liu <25031212351@stu.xidian.edu.cn>
Bluetooth: btusb: fix use-after-free in force_poll_sync
Longxuan Yu <ylong030@ucr.edu>
8021q: delete cleared egress QoS mappings
Longxuan Yu <ylong030@ucr.edu>
8021q: use RCU for egress QoS mappings
Alice Ryhl <aliceryhl@google.com>
rust_binder: push BR_TRANSACTION_COMPLETE before BR_FAILED_REPLY
Ian Abbott <abbotti@mev.co.uk>
comedi: comedi_bond: Fix leak of opened device references
Masami Hiramatsu (Google) <mhiramat@kernel.org>
tracing/probes: Fix BTF bitfield parsing and out-of-bounds buffer write
Wahid Khan <wahidzk0091@gmail.com>
ksmbd: refuse to read a handle that is not open for reading
Jiwoo Kim <arpe1618@gmail.com>
ksmbd: pin parent dentries in SMB2 CREATE ACL path
Eric Dumazet <edumazet@kernel.org>
net: wait for in-flight device unregistrations before netns dismantle
Pin-yen Lin <treapking@google.com>
gve: Block invalid ring sizes when device options are 0
Pin-yen Lin <treapking@google.com>
gve: Fix race between stats query and queue reconfig
Tim Menninger <tmenninger@everpuredata.com>
xprtrdma: serialize unmap_sync with xprt_disconnect
JP Kobryn <jp.kobryn@linux.dev>
mm/page_alloc: use existing highatomic reserves on the buddy fastpath
Frank van der Linden <fvdl@google.com>
mm/page_alloc: don't increase highatomic reserve after pcp alloc
Gregory Price (Meta) <gourry@gourry.net>
mm/mmzone: read each zoneref slot once when filtering by nodemask
Leon Hwang <leon.hwang@linux.dev>
bpf: Disallow interpreter fallback for BPF_ADDR_PERCPU insn
Leon Hwang <leon.hwang@linux.dev>
bpf: Disallow interpreter fallback for arena-related insns
Tiezhu Yang <yangtiezhu@loongson.cn>
bpf: Reject programs with inlined helpers if JIT is not available
Tiezhu Yang <yangtiezhu@loongson.cn>
bpf: Introduce jit_required flag and remove bpf_prog_has_kfunc_call()
Jan Kara <jack@suse.cz>
ext4: fix transaction overflow during writeback
Jan Kara <jack@suse.cz>
ext4: teach ext4_meta_trans_blocks() about number of allocated extents
Eric Dumazet <edumazet@google.com>
net: flush skb_defer_nodes in dev_cpu_dead()
Jamal Hadi Salim <jhs@mojatatu.com>
net/sched: codel: bound the dropping loop per dequeue call
Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
sctp: validate cookie AUTH state before use
Alexei Starovoitov <ast@kernel.org>
net: reject a negative TCP header offset in qdisc_pkt_len_segs_init()
Eric Dumazet <edumazet@kernel.org>
net: harden qdisc_pkt_len_segs_init() against malicious GSO packets
Cosmin Ratiu <cratiu@nvidia.com>
xfrm: Don't clobber inner headers when already set
Eric Dumazet <edumazet@google.com>
net: pull headers in qdisc_pkt_len_segs_init()
Eric Dumazet <edumazet@google.com>
net: init shinfo->gso_segs from qdisc_pkt_len_init()
Eric Dumazet <edumazet@google.com>
netlink: do not free nlk->groups while lockless readers can use it
Sabrina Dubroca <sd@queasysnail.net>
mpls: add seqcount to protect the platform_label{,s} pair
Chen-Yu Tsai <wenst@chromium.org>
drm/gem-dma: Support dedicated DMA device for allocation and mapping
-------------
Diffstat:
Documentation/arch/arm64/silicon-errata.rst | 4 +
Documentation/filesystems/overlayfs.rst | 24 +-
Documentation/trace/boottime-trace.rst | 8 +-
Makefile | 8 +-
arch/arc/include/asm/io.h | 13 +-
arch/arm64/boot/dts/st/stm32mp231.dtsi | 16 +-
arch/arm64/boot/dts/st/stm32mp233.dtsi | 1 +
arch/arm64/boot/dts/st/stm32mp251.dtsi | 14 +
arch/arm64/boot/dts/st/stm32mp253.dtsi | 1 +
arch/arm64/include/asm/kexec.h | 2 +
arch/arm64/kernel/cpufeature.c | 2 -
arch/arm64/kernel/machine_kexec.c | 7 +-
arch/arm64/kernel/probes/uprobes.c | 6 +
arch/arm64/kernel/relocate_kernel.S | 11 +-
arch/arm64/kernel/suspend.c | 23 +-
arch/arm64/kernel/vmlinux.lds.S | 5 +-
arch/arm64/mm/mmu.c | 3 +-
arch/parisc/kernel/entry.S | 4 -
arch/parisc/kernel/ftrace.c | 2 +-
arch/parisc/kernel/irq.c | 4 +-
arch/powerpc/include/asm/hw_irq.h | 2 +-
arch/powerpc/kernel/eeh.c | 6 +-
arch/powerpc/kernel/module_32.c | 3 +
arch/powerpc/kvm/book3s_64_mmu_hv.c | 33 +-
arch/powerpc/kvm/book3s_hv.c | 4 +-
arch/powerpc/kvm/book3s_hv_nested.c | 34 +-
arch/powerpc/kvm/book3s_xive.c | 5 +-
arch/powerpc/xmon/xmon.c | 3 +-
arch/riscv/include/asm/pgalloc.h | 14 +-
arch/riscv/include/asm/pgtable-32.h | 4 +-
arch/riscv/include/asm/pgtable-64.h | 50 +--
arch/riscv/include/asm/pgtable.h | 4 +-
arch/riscv/include/asm/switch_to.h | 30 +-
arch/riscv/include/asm/vector.h | 2 +
arch/riscv/include/asm/vmalloc.h | 5 +-
arch/riscv/kernel/cpu.c | 4 +-
arch/riscv/kernel/efi.c | 2 +-
arch/riscv/kernel/entry.S | 6 +-
arch/riscv/kernel/kernel_mode_fpu.c | 4 +-
arch/riscv/kernel/probes/uprobes.c | 6 +
arch/riscv/kernel/signal.c | 2 +
arch/riscv/kernel/unaligned_access_speed.c | 4 +-
arch/riscv/mm/init.c | 105 +++---
arch/riscv/mm/kasan_init.c | 20 +-
arch/riscv/mm/pgtable.c | 4 +-
arch/riscv/mm/ptdump.c | 4 +-
arch/s390/appldata/appldata_base.c | 12 +-
arch/s390/kernel/cert_store.c | 108 ++++---
arch/x86/Kconfig | 2 +-
arch/x86/Makefile | 1 +
arch/x86/kernel/apic/msi.c | 2 +-
arch/x86/kernel/cpu/mce/core.c | 18 +-
arch/x86/kernel/uprobes.c | 15 +
arch/x86/platform/efi/efi.c | 34 ++
arch/x86/platform/efi/quirks.c | 4 -
block/blk-iocost.c | 3 +-
block/ioctl.c | 19 +-
drivers/accel/rocket/rocket_core.h | 4 +
drivers/accel/rocket/rocket_drv.c | 96 +++---
drivers/accel/rocket/rocket_drv.h | 13 +-
drivers/accel/rocket/rocket_gem.c | 33 +-
drivers/accel/rocket/rocket_gem.h | 4 +-
drivers/accel/rocket/rocket_job.c | 6 +-
drivers/accel/rocket/rocket_job.h | 2 +-
drivers/acpi/cppc_acpi.c | 9 +
drivers/acpi/device_pm.c | 23 +-
drivers/acpi/glue.c | 8 +-
drivers/android/binder/error.rs | 1 -
drivers/android/binder/thread.rs | 44 ++-
drivers/ata/libata-core.c | 3 +
drivers/ata/libata-scsi.c | 2 +-
drivers/block/ublk_drv.c | 22 +-
drivers/bluetooth/btintel_pcie.c | 11 +-
drivers/bluetooth/btusb.c | 10 +-
drivers/bluetooth/hci_qca.c | 1 +
drivers/char/tpm/tpm-chip.c | 24 --
drivers/char/tpm/tpm-interface.c | 22 ++
drivers/comedi/drivers/comedi_bond.c | 24 +-
drivers/cpufreq/cppc_cpufreq.c | 14 +-
drivers/cpufreq/cpufreq.c | 81 +++--
drivers/cpufreq/intel_pstate.c | 151 +++++----
drivers/dma/idxd/cdev.c | 1 +
drivers/dma/sh/rcar-dmac.c | 4 +-
drivers/dma/stm32/stm32-mdma.c | 1 +
drivers/edac/i5000_edac.c | 4 +-
drivers/firmware/arm_ffa/driver.c | 11 +-
drivers/firmware/arm_scmi/notify.c | 4 +-
drivers/firmware/arm_scmi/transports/Kconfig | 2 +-
drivers/firmware/arm_scmi/transports/mailbox.c | 7 +-
.../firmware/arm_scmi/vendors/imx/imx-sm-misc.c | 16 +-
drivers/firmware/efi/libstub/tpm.c | 2 +-
drivers/gpio/gpio-davinci.c | 4 +-
drivers/gpio/gpio-ljca.c | 11 +-
drivers/gpio/gpio-mlxbf2.c | 29 +-
drivers/gpio/gpio-mvebu.c | 24 +-
drivers/gpio/gpio-virtio.c | 13 +-
drivers/gpio/gpiolib-cdev.c | 95 +++---
drivers/gpio/gpiolib.c | 64 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 13 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 52 ++-
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 4 +
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 33 +-
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +-
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 13 +
drivers/gpu/drm/amd/amdgpu/soc21.c | 3 +
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 +
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 20 +-
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 5 +
.../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 32 ++
drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 4 +-
drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 65 ++--
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 34 +-
drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +
.../drm/amd/display/modules/freesync/freesync.c | 12 +-
.../gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c | 14 +-
drivers/gpu/drm/ast/ast_mode.c | 11 +-
drivers/gpu/drm/display/drm_bridge_connector.c | 11 +-
drivers/gpu/drm/drm_gem_dma_helper.c | 21 +-
drivers/gpu/drm/drm_syncobj.c | 45 ++-
drivers/gpu/drm/drm_vblank.c | 34 +-
drivers/gpu/drm/gud/gud_drv.c | 13 +-
drivers/gpu/drm/i915/display/intel_ddi.c | 10 +-
drivers/gpu/drm/i915/display/intel_display.c | 32 +-
drivers/gpu/drm/i915/display/intel_display.h | 1 +
drivers/gpu/drm/i915/display/intel_dp_aux.c | 39 ++-
drivers/gpu/drm/i915/display/intel_dsb.c | 16 +-
drivers/gpu/drm/i915/display/intel_fbdev.c | 13 +-
drivers/gpu/drm/i915/display/intel_pps.c | 14 +
drivers/gpu/drm/i915/display/intel_psr.c | 34 +-
drivers/gpu/drm/i915/display/intel_tc.c | 9 +-
drivers/gpu/drm/i915/i915_vma.c | 2 +-
drivers/gpu/drm/i915/i915_vma_types.h | 3 +
drivers/gpu/drm/imagination/pvr_queue.c | 3 +-
drivers/gpu/drm/meson/meson_encoder_dsi.c | 2 +-
drivers/gpu/drm/msm/msm_drv.c | 3 +-
drivers/gpu/drm/msm/msm_gem.h | 1 +
drivers/gpu/drm/msm/msm_gem_submit.c | 9 +-
drivers/gpu/drm/msm/msm_gem_vma.c | 11 +-
.../gpu/drm/nouveau/include/nvkm/engine/falcon.h | 1 +
drivers/gpu/drm/nouveau/nouveau_display.c | 11 +-
drivers/gpu/drm/nouveau/nouveau_sched.c | 6 +-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c | 1 +
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c | 1 +
.../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c | 4 +-
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c | 1 +
drivers/gpu/drm/radeon/radeon_atombios.c | 22 +-
drivers/gpu/drm/radeon/radeon_atpx_handler.c | 13 +-
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 2 +-
drivers/gpu/drm/scheduler/sched_entity.c | 17 +-
drivers/gpu/drm/vc4/vc4_bo.c | 43 ++-
drivers/gpu/drm/vc4/vc4_crtc.c | 136 ++++----
drivers/gpu/drm/vc4/vc4_drv.h | 21 +-
drivers/gpu/drm/vc4/vc4_gem.c | 20 +-
drivers/gpu/drm/vc4/vc4_hvs.c | 18 +-
drivers/gpu/drm/vc4/vc4_irq.c | 37 ++-
drivers/gpu/drm/vc4/vc4_v3d.c | 7 +-
drivers/gpu/drm/vc4/vc4_validate.c | 15 +-
drivers/gpu/drm/vc4/vc4_validate_shaders.c | 7 +-
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 3 +
drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.c | 166 +++++++---
drivers/gpu/drm/vmwgfx/vmwgfx_cursor_plane.h | 4 +
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 208 ++++++++++++
drivers/gpu/drm/vmwgfx/vmwgfx_gem.c | 11 +-
drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 55 ++--
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 +-
drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 21 +-
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 1 +
drivers/gpu/drm/vmwgfx/vmwgfx_shader.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_streamoutput.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 28 +-
drivers/gpu/drm/vmwgfx/vmwgfx_validation.h | 13 +-
drivers/gpu/drm/xe/xe_bo.c | 7 +-
drivers/gpu/drm/xe/xe_device.c | 32 +-
drivers/gpu/drm/xe/xe_device.h | 1 +
drivers/gpu/drm/xe/xe_dma_buf.c | 30 +-
drivers/gpu/drm/xe/xe_guc_tlb_inval.c | 14 +-
drivers/gpu/drm/xe/xe_hwmon.c | 22 +-
drivers/gpu/drm/xe/xe_hwmon.h | 2 +
drivers/gpu/drm/xe/xe_query.c | 6 +-
drivers/gpu/drm/xe/xe_shrinker.c | 81 +++--
drivers/gpu/drm/xe/xe_sync.c | 33 +-
drivers/hid/hid-letsketch.c | 21 +-
drivers/hid/hid-magicmouse.c | 2 +-
drivers/hid/hid-nintendo.c | 2 +-
drivers/hid/hid-sensor-custom.c | 125 +++++---
drivers/hid/hid-sensor-hub.c | 27 +-
drivers/hid/hid-vivaldi-common.c | 91 +++---
drivers/hid/intel-thc-hid/Kconfig | 2 +
drivers/hwmon/ads7871.c | 4 +-
drivers/hwmon/dell-smm-hwmon.c | 9 +
drivers/hwmon/hwmon.c | 7 +-
drivers/hwmon/nct6775-core.c | 22 +-
drivers/hwmon/sht3x.c | 4 +-
drivers/hwmon/w83791d.c | 4 +-
drivers/hwmon/w83792d.c | 4 +-
drivers/iio/adc/ad7923.c | 1 +
.../iio/common/cros_ec_sensors/cros_ec_sensors.c | 2 +-
.../iio/common/hid-sensors/hid-sensor-attributes.c | 2 +-
.../iio/common/inv_sensors/inv_sensors_timestamp.c | 134 ++++----
drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 2 +-
drivers/iio/humidity/hid-sensor-humidity.c | 14 +-
drivers/iio/proximity/as3935.c | 4 +-
drivers/iio/proximity/d3323aa.c | 2 +-
drivers/iio/proximity/hx9023s.c | 16 +-
drivers/iio/proximity/irsd200.c | 2 +-
drivers/iio/proximity/mb1232.c | 4 +-
drivers/iio/proximity/srf04.c | 4 +-
drivers/iio/proximity/sx9360.c | 29 +-
drivers/iio/proximity/sx_common.c | 2 +-
drivers/iio/proximity/vcnl3020.c | 6 +-
drivers/iio/proximity/vl53l0x-i2c.c | 4 +-
drivers/iio/temperature/hid-sensor-temperature.c | 14 +-
drivers/infiniband/hw/ionic/ionic_lif_cfg.c | 2 +-
drivers/infiniband/hw/ionic/ionic_res.h | 23 +-
drivers/infiniband/hw/mlx5/devx.c | 6 +-
drivers/infiniband/hw/mlx5/main.c | 3 +-
drivers/infiniband/sw/siw/siw.h | 1 +
drivers/infiniband/sw/siw/siw_mem.c | 2 +-
drivers/infiniband/ulp/rtrs/rtrs-clt.c | 8 +-
drivers/infiniband/ulp/srpt/ib_srpt.c | 21 +-
drivers/infiniband/ulp/srpt/ib_srpt.h | 4 +-
drivers/input/joystick/xpad.c | 5 +
drivers/input/misc/da7280.c | 1 -
drivers/input/mouse/cyapa.c | 4 +-
drivers/input/mouse/trackpoint.c | 2 +
drivers/input/mouse/trackpoint.h | 1 +
drivers/input/touchscreen/goodix_fwupload.c | 4 +-
drivers/iommu/iommufd/pages.c | 15 +-
drivers/irqchip/Kconfig | 2 +-
drivers/irqchip/irq-gic-v4.c | 39 ++-
drivers/md/dm-cache-target.c | 14 +-
drivers/md/dm-ioctl.c | 2 +-
drivers/md/dm-table.c | 146 +++++----
drivers/md/dm.c | 2 +-
drivers/md/dm.h | 18 +-
drivers/memory/tegra/tegra186.c | 1 +
drivers/memory/tegra/tegra210-emc-core.c | 16 +-
drivers/net/dsa/b53/b53_common.c | 209 +++++++++---
drivers/net/dsa/b53/b53_priv.h | 4 +
drivers/net/dsa/b53/b53_regs.h | 1 +
drivers/net/dsa/b53/b53_srab.c | 2 +-
drivers/net/dsa/bcm_sf2.c | 4 +
drivers/net/dsa/ocelot/felix.c | 13 +-
drivers/net/ethernet/broadcom/asp2/bcmasp.c | 2 +-
drivers/net/ethernet/broadcom/bcm4908_enet.c | 143 ++++++---
drivers/net/ethernet/broadcom/bcmsysport.c | 20 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 47 +++
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 19 +-
drivers/net/ethernet/broadcom/tg3.c | 43 ++-
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 4 +-
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 28 +-
drivers/net/ethernet/freescale/gianfar.c | 1 +
drivers/net/ethernet/google/gve/gve.h | 7 +-
drivers/net/ethernet/google/gve/gve_adminq.c | 4 +-
.../net/ethernet/google/gve/gve_buffer_mgmt_dqo.c | 4 +-
drivers/net/ethernet/google/gve/gve_main.c | 49 ++-
drivers/net/ethernet/google/gve/gve_rx.c | 8 +-
drivers/net/ethernet/google/gve/gve_utils.c | 12 +-
drivers/net/ethernet/google/gve/gve_utils.h | 2 +-
drivers/net/ethernet/intel/e1000/e1000_main.c | 3 +-
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 9 +-
drivers/net/ethernet/intel/iavf/iavf_adminq.c | 1 +
drivers/net/ethernet/intel/iavf/iavf_main.c | 1 +
drivers/net/ethernet/intel/iavf/iavf_ptp.c | 12 +
drivers/net/ethernet/intel/ice/devlink/devlink.c | 2 +-
drivers/net/ethernet/intel/ice/ice_tc_lib.c | 3 +-
.../net/ethernet/marvell/prestera/prestera_main.c | 17 +-
.../ethernet/mellanox/mlx5/core/en/tc_tun_encap.c | 2 +-
.../mellanox/mlx5/core/en_accel/en_accel.h | 5 +-
.../mellanox/mlx5/core/en_accel/ktls_txrx.h | 21 ++
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 3 +-
.../mellanox/mlx5/core/steering/hws/fs_hws.c | 2 +
.../mellanox/mlx5/core/steering/sws/dr_icm_pool.c | 32 +-
drivers/net/ethernet/meta/fbnic/fbnic_csr.h | 3 +-
drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c | 3 +
drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 89 ++++--
drivers/net/ethernet/microchip/encx24j600.c | 3 +-
drivers/net/ethernet/qualcomm/qca_spi.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 3 +-
.../net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 8 +
.../net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 6 +-
drivers/net/ethernet/stmicro/stmmac/enh_desc.c | 8 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18 +-
drivers/net/hamradio/mkiss.c | 8 +
drivers/net/tun.c | 70 +++-
drivers/net/usb/smsc75xx.c | 8 +
drivers/net/wireless/ath/ath10k/core.c | 1 -
drivers/net/wireless/ath/ath10k/thermal.c | 9 +-
drivers/net/wireless/ath/ath10k/thermal.h | 2 -
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 12 +-
drivers/net/wireless/realtek/rtw89/core.c | 12 -
drivers/net/wireless/virtual/mac80211_hwsim.c | 2 +-
drivers/nvme/common/auth.c | 6 +-
drivers/nvme/host/core.c | 11 +-
drivers/nvme/host/ioctl.c | 7 +-
drivers/nvme/host/multipath.c | 7 +
drivers/nvme/host/nvme.h | 13 +-
drivers/nvme/host/sysfs.c | 3 +
drivers/nvme/host/tcp.c | 172 ++++++++--
drivers/nvme/target/admin-cmd.c | 51 ++-
drivers/nvme/target/fabrics-cmd.c | 3 +
drivers/nvme/target/fc.c | 13 +-
drivers/nvme/target/fcloop.c | 2 +
drivers/nvme/target/io-cmd-file.c | 47 ++-
drivers/nvme/target/loop.c | 1 +
drivers/nvme/target/pr.c | 10 +-
drivers/nvme/target/tcp.c | 42 ++-
drivers/nvme/target/zns.c | 3 +-
drivers/phy/ingenic/phy-ingenic-usb.c | 1 -
drivers/phy/rockchip/phy-rockchip-snps-pcie3.c | 9 +-
drivers/phy/ti/phy-ti-pipe3.c | 63 +++-
drivers/reset/reset-scmi.c | 1 +
drivers/reset/reset-spacemit.c | 18 +-
drivers/s390/block/dasd.c | 5 +-
drivers/s390/block/dasd_alias.c | 2 +-
drivers/s390/block/dasd_eckd.c | 66 ++--
drivers/s390/block/dasd_int.h | 17 +-
drivers/s390/block/dcssblk.c | 3 +-
drivers/scsi/ch.c | 6 +-
drivers/scsi/device_handler/scsi_dh_rdac.c | 6 +-
drivers/scsi/lpfc/lpfc_els.c | 29 +-
drivers/scsi/lpfc/lpfc_hbadisc.c | 11 +-
drivers/scsi/mpi3mr/mpi3mr.h | 1 +
drivers/scsi/mpi3mr/mpi3mr_fw.c | 18 ++
drivers/scsi/pm8001/pm8001_defs.h | 1 +
drivers/scsi/pm8001/pm8001_init.c | 15 +-
drivers/scsi/pm8001/pm80xx_hwi.c | 13 +-
drivers/scsi/sd_zbc.c | 9 +-
drivers/soundwire/qcom.c | 2 +
drivers/spi/spi-tegra210-quad.c | 164 +++++++---
drivers/spi/spi.c | 4 -
drivers/target/iscsi/iscsi_target.c | 22 +-
drivers/target/iscsi/iscsi_target_nego.c | 6 +-
drivers/target/target_core_alua.c | 7 +
drivers/target/target_core_configfs.c | 16 +-
drivers/ufs/core/ufs-sysfs.c | 97 ++++--
drivers/ufs/core/ufs_bsg.c | 4 +-
drivers/ufs/core/ufshcd-priv.h | 8 +-
drivers/ufs/core/ufshcd.c | 133 ++++----
drivers/ufs/host/ufs-mediatek.c | 10 +
drivers/usb/cdns3/cdns3-gadget.c | 6 +-
drivers/usb/dwc3/dwc3-xilinx.c | 166 ++++++----
drivers/usb/gadget/function/f_hid.c | 41 ++-
drivers/usb/gadget/function/f_uac1_legacy.c | 8 +-
drivers/usb/gadget/function/u_uac1_legacy.c | 17 +-
drivers/usb/typec/ucsi/ucsi_acpi.c | 34 ++
drivers/vhost/net.c | 2 +-
drivers/vhost/vhost.c | 12 +
drivers/video/console/vgacon.c | 2 +
drivers/video/fbdev/aty/radeon_base.c | 3 +
drivers/video/fbdev/core/fbcon.c | 41 ++-
drivers/video/fbdev/core/fbcon.h | 1 +
drivers/video/fbdev/fm2fb.c | 2 +-
drivers/video/fbdev/macmodes.c | 2 +-
drivers/video/fbdev/smscufx.c | 26 +-
drivers/video/fbdev/sstfb.c | 3 +
drivers/video/fbdev/valkyriefb.c | 3 +-
drivers/video/fbdev/vfb.c | 18 +-
drivers/w1/slaves/w1_therm.c | 8 +
drivers/watchdog/npcm_wdt.c | 19 +-
drivers/watchdog/rzg2l_wdt.c | 4 +-
drivers/watchdog/rzv2h_wdt.c | 12 +-
drivers/watchdog/stm32_iwdg.c | 29 +-
fs/btrfs/btrfs_inode.h | 6 +
fs/btrfs/delayed-inode.c | 3 +-
fs/btrfs/direct-io.c | 22 +-
fs/btrfs/fiemap.c | 2 +
fs/btrfs/file.c | 7 +-
fs/btrfs/inode.c | 4 +-
fs/btrfs/ioctl.c | 15 +-
fs/btrfs/reflink.c | 60 +++-
fs/btrfs/send.c | 98 +++++-
fs/btrfs/volumes.c | 9 +-
fs/btrfs/zstd.c | 8 +-
fs/crypto/keysetup.c | 14 +-
fs/direct-io.c | 15 +-
fs/ext4/ext4.h | 2 +-
fs/ext4/extents.c | 2 +-
fs/ext4/inline.c | 6 +
fs/ext4/inode.c | 36 +--
fs/ext4/move_extent.c | 1 +
fs/ext4/xattr.c | 12 +
fs/fuse/dev.c | 4 +-
fs/fuse/dev_uring.c | 7 +-
fs/fuse/dir.c | 12 +-
fs/fuse/file.c | 5 +
fs/fuse/readdir.c | 27 +-
fs/fuse/virtio_fs.c | 9 +-
fs/fuse/xattr.c | 2 +-
fs/hugetlbfs/inode.c | 2 +-
fs/jbd2/journal.c | 3 +
fs/nfs/flexfilelayout/flexfilelayout.c | 12 +
fs/nfs/flexfilelayout/flexfilelayout.h | 1 +
fs/ocfs2/dlmfs/userdlm.c | 12 +-
fs/ocfs2/dlmglue.c | 19 +-
fs/ocfs2/inode.c | 17 +-
fs/ocfs2/journal.c | 30 +-
fs/ocfs2/journal.h | 17 +-
fs/ocfs2/mmap.c | 12 +-
fs/ocfs2/ocfs2.h | 1 +
fs/ocfs2/super.c | 1 +
fs/overlayfs/dir.c | 12 +-
fs/overlayfs/namei.c | 352 ++++++++++++---------
fs/overlayfs/overlayfs.h | 15 +-
fs/overlayfs/params.c | 45 ++-
fs/overlayfs/params.h | 2 +
fs/overlayfs/super.c | 17 +-
fs/smb/client/cifs_fs_sb.h | 2 +
fs/smb/client/cifsacl.c | 6 +-
fs/smb/client/cifsfs.c | 20 +-
fs/smb/client/cifsglob.h | 6 +
fs/smb/client/cifsproto.h | 2 +
fs/smb/client/dfs.c | 77 ++++-
fs/smb/client/file.c | 139 +++++++-
fs/smb/client/misc.c | 6 +-
fs/smb/client/netmisc.c | 3 +-
fs/smb/client/readdir.c | 3 +-
fs/smb/client/smb2ops.c | 9 +-
fs/smb/client/smb2pdu.c | 123 ++++++-
fs/smb/client/smb2proto.h | 9 +
fs/smb/client/smb2transport.c | 7 +-
fs/smb/client/trace.h | 1 +
fs/smb/client/transport.c | 5 +
fs/smb/server/smb2pdu.c | 82 +++--
fs/smb/server/smb_common.c | 34 +-
fs/smb/server/smb_common.h | 5 +
fs/smb/server/smbacl.c | 9 +-
fs/smb/server/vfs.c | 4 +
fs/smb/server/vfs_cache.h | 2 +
fs/userfaultfd.c | 19 ++
fs/xfs/xfs_bmap_util.c | 11 +-
fs/xfs/xfs_rtalloc.c | 6 +-
fs/xfs/xfs_super.c | 2 +-
fs/zonefs/file.c | 9 +-
include/asm-generic/tlb.h | 4 +-
include/linux/arm-smccc.h | 7 +
include/linux/bpf.h | 31 +-
include/linux/cpufreq.h | 3 +
include/linux/efi.h | 3 +
include/linux/filter.h | 14 +-
include/linux/firmware/imx/sm.h | 6 +
include/linux/ftrace.h | 2 +-
include/linux/if_vlan.h | 25 +-
include/linux/iio/common/inv_sensors_timestamp.h | 43 +--
include/linux/io_uring/cmd.h | 22 +-
include/linux/io_uring_types.h | 1 -
include/linux/kasan.h | 15 +-
include/linux/key.h | 4 +-
include/linux/maple_tree.h | 48 +--
include/linux/mm.h | 128 ++++++--
include/linux/net.h | 2 +-
include/linux/nsc_gpio.h | 2 +-
include/linux/page-isolation.h | 2 +
include/linux/pageblock-flags.h | 6 +-
include/linux/perf_event.h | 1 +
include/linux/pgtable.h | 24 ++
include/linux/skbuff.h | 2 +
include/linux/tcp.h | 6 +-
include/linux/uprobes.h | 5 +
include/linux/userfaultfd_k.h | 5 +
include/net/ax25.h | 1 +
include/net/bluetooth/hci_core.h | 9 +-
include/net/bluetooth/l2cap.h | 1 +
include/net/codel.h | 5 +
include/net/codel_impl.h | 16 +-
include/net/dropreason-core.h | 9 +
include/net/inet_hashtables.h | 2 +
include/net/ip_vs.h | 2 +-
include/net/net_namespace.h | 1 +
include/net/netns/mpls.h | 2 +
include/net/netrom.h | 1 +
include/net/request_sock.h | 12 +-
include/net/rose.h | 1 +
include/net/sctp/auth.h | 3 +
include/scsi/scsi_proto.h | 3 +
include/trace/events/hugetlbfs.h | 2 +-
include/vdso/math64.h | 13 +-
io_uring/uring_cmd.c | 18 +-
kernel/bpf/arena.c | 13 +-
kernel/bpf/btf.c | 30 +-
kernel/bpf/cgroup.c | 25 +-
kernel/bpf/core.c | 12 +-
kernel/bpf/helpers.c | 52 ++-
kernel/bpf/inode.c | 10 +-
kernel/bpf/syscall.c | 33 +-
kernel/bpf/verifier.c | 39 ++-
kernel/cgroup/cpuset.c | 21 +-
kernel/cgroup/rstat.c | 1 +
kernel/dma/coherent.c | 11 +-
kernel/dma/pool.c | 11 +-
kernel/dma/swiotlb.c | 35 +-
kernel/events/core.c | 44 ++-
kernel/events/uprobes.c | 9 +
kernel/futex/core.c | 10 +-
kernel/kprobes.c | 55 +++-
kernel/rcu/tree_nocb.h | 6 +-
kernel/sched/core.c | 8 +-
kernel/sched/core_sched.c | 3 +-
kernel/sched/ext.c | 146 +++++----
kernel/sched/sched.h | 28 +-
kernel/trace/bpf_trace.c | 14 +-
kernel/trace/fgraph.c | 45 +--
kernel/trace/ring_buffer.c | 11 +-
kernel/trace/trace.c | 8 +-
kernel/trace/trace.h | 2 +
kernel/trace/trace_events_filter.c | 98 ++++--
kernel/trace/trace_events_hist.c | 25 +-
kernel/trace/trace_events_trigger.c | 2 +
kernel/trace/trace_events_user.c | 12 +
kernel/trace/trace_osnoise.c | 8 +
kernel/trace/trace_probe.c | 59 +++-
kernel/trace/trace_recursion_record.c | 17 +-
kernel/vhost_task.c | 9 +
kernel/workqueue.c | 9 +
lib/fault-inject.c | 8 +-
lib/maple_tree.c | 120 +++++--
lib/test_xarray.c | 70 ++++
lib/xarray.c | 8 +-
mm/damon/core.c | 5 +-
mm/damon/tests/sysfs-kunit.h | 9 +
mm/filemap.c | 35 +-
mm/gup.c | 32 +-
mm/huge_memory.c | 64 +++-
mm/hugetlb.c | 13 +-
mm/hugetlb_vmemmap.c | 36 +--
mm/internal.h | 25 +-
mm/kasan/common.c | 13 +-
mm/kasan/generic.c | 17 +-
mm/kasan/kasan.h | 34 +-
mm/kasan/kasan_test_c.c | 139 ++++++++
mm/khugepaged.c | 6 +
mm/memfd.c | 7 +
mm/memory.c | 46 ++-
mm/memory_hotplug.c | 18 +-
mm/mempolicy.c | 13 +-
mm/migrate.c | 21 ++
mm/mmu_gather.c | 10 +-
mm/mmzone.c | 10 +-
mm/page_alloc.c | 215 ++++++++++---
mm/page_isolation.c | 194 ++++++------
mm/rmap.c | 2 +-
mm/shmem.c | 7 +-
mm/slub.c | 13 +-
mm/swap.c | 26 ++
mm/swapfile.c | 5 +
mm/userfaultfd.c | 49 ++-
mm/vma.c | 28 +-
net/8021q/vlan_dev.c | 45 +--
net/8021q/vlan_netlink.c | 10 +-
net/8021q/vlanproc.c | 12 +-
net/ax25/af_ax25.c | 9 +
net/ax25/ax25_std_timer.c | 11 +-
net/ax25/ax25_subr.c | 27 ++
net/bluetooth/hci_conn.c | 105 ++++--
net/bluetooth/hci_core.c | 83 ++++-
net/bluetooth/hci_debugfs.c | 32 +-
net/bluetooth/hci_event.c | 9 +-
net/bluetooth/hci_sync.c | 31 +-
net/bluetooth/l2cap_core.c | 95 +++---
net/bluetooth/mgmt.c | 337 +++++++++++++++-----
net/bluetooth/mgmt_config.c | 10 +-
net/bluetooth/mgmt_util.c | 23 +-
net/bluetooth/msft.c | 118 +++++--
net/bluetooth/smp.c | 58 +++-
net/bridge/br_input.c | 18 +-
net/core/dev.c | 188 ++++++++---
net/core/dev.h | 2 +
net/core/filter.c | 23 +-
net/core/skbuff.c | 45 ++-
net/core/skmsg.c | 4 +-
net/core/sock.c | 4 +-
net/core/sock_reuseport.c | 16 +-
net/dsa/tag_brcm.c | 7 +-
net/ieee802154/socket.c | 4 +
net/ipv4/af_inet.c | 5 +-
net/ipv4/inet_connection_sock.c | 29 +-
net/ipv4/ip_fragment.c | 2 +
net/ipv4/ip_input.c | 6 +
net/ipv4/syncookies.c | 7 +
net/ipv4/tcp.c | 2 +
net/ipv4/tcp_input.c | 2 +-
net/ipv6/af_inet6.c | 8 +-
net/ipv6/calipso.c | 5 +-
net/ipv6/ip6_fib.c | 14 +-
net/ipv6/ip6_input.c | 4 +
net/ipv6/ip6_offload.c | 8 +
net/ipv6/ip6mr.c | 2 +-
net/ipv6/ipv6_sockglue.c | 95 ------
net/ipv6/mcast.c | 10 +-
net/ipv6/mcast_snoop.c | 3 +-
net/ipv6/route.c | 51 +--
net/ipv6/syncookies.c | 6 +
net/ipv6/udp.c | 7 +-
net/mac802154/llsec.c | 2 +
net/mpls/af_mpls.c | 37 ++-
net/mptcp/protocol.c | 3 +-
net/netfilter/ipvs/ip_vs_conn.c | 6 +-
net/netfilter/ipvs/ip_vs_ctl.c | 30 +-
net/netfilter/ipvs/ip_vs_ftp.c | 20 +-
net/netfilter/ipvs/ip_vs_lblc.c | 8 +-
net/netfilter/ipvs/ip_vs_lblcr.c | 13 +-
net/netfilter/ipvs/ip_vs_sync.c | 42 ++-
net/netlink/af_netlink.c | 42 ++-
net/netlink/diag.c | 18 +-
net/netrom/af_netrom.c | 7 +
net/netrom/nr_in.c | 107 +++++--
net/netrom/nr_out.c | 10 +
net/netrom/nr_timer.c | 9 +-
net/openvswitch/flow.c | 3 +-
net/packet/af_packet.c | 40 ++-
net/qrtr/ns.c | 21 +-
net/rose/af_rose.c | 5 +
net/rose/rose_in.c | 16 +-
net/rose/rose_out.c | 21 ++
net/rose/rose_timer.c | 10 +-
net/sched/bpf_qdisc.c | 27 ++
net/sctp/auth.c | 75 +++++
net/sctp/ipv6.c | 5 +-
net/sctp/sm_make_chunk.c | 3 +
net/sctp/socket.c | 12 +-
net/sunrpc/xprtrdma/frwr_ops.c | 89 ++++--
net/sunrpc/xprtrdma/transport.c | 2 +
net/sunrpc/xprtrdma/verbs.c | 16 +-
net/sunrpc/xprtrdma/xprt_rdma.h | 10 +-
net/tls/tls_device.c | 10 +-
net/xdp/xsk.c | 3 +-
net/xfrm/xfrm_interface_core.c | 8 +
net/xfrm/xfrm_output.c | 20 +-
rust/Makefile | 2 +-
rust/kernel/iov.rs | 2 +-
rust/kernel/str.rs | 4 +-
security/commoncap.c | 45 +--
security/keys/big_key.c | 16 +-
security/keys/key.c | 4 +
security/keys/keyctl_pkey.c | 124 ++++++--
security/keys/trusted-keys/trusted_core.c | 15 +-
security/landlock/errata/abi-4.h | 21 ++
security/landlock/ruleset.h | 13 +-
security/selinux/hooks.c | 5 +-
sound/core/oss/pcm_oss.c | 4 +-
sound/core/pcm_native.c | 63 ++--
sound/core/sound_oss.c | 35 +-
sound/firewire/fcp.c | 5 +-
sound/firewire/fireworks/fireworks_transaction.c | 4 +-
sound/hda/codecs/realtek/alc269.c | 7 +-
sound/hda/codecs/side-codecs/tas2781_hda_spi.c | 1 +
sound/hda/controllers/intel.c | 5 +-
sound/soc/amd/acp/acp-legacy-common.c | 5 +-
sound/soc/codecs/aw88166.c | 2 +-
sound/soc/codecs/aw88399-lib.c | 2 +-
sound/soc/codecs/wm8962.c | 2 +-
sound/soc/fsl/fsl_asrc.c | 22 ++
sound/soc/fsl/fsl_asrc_m2m.c | 30 +-
sound/soc/fsl/fsl_easrc.c | 10 +
sound/soc/qcom/qdsp6/audioreach.c | 10 +-
sound/soc/qcom/qdsp6/q6apm-dai.c | 3 +
sound/soc/qcom/qdsp6/q6asm-dai.c | 3 +
sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c | 14 +-
sound/soc/qcom/qdsp6/topology.c | 4 +-
sound/soc/sof/control.c | 5 +
sound/soc/sof/intel/lnl.c | 17 +-
sound/usb/quirks.c | 2 +-
tools/bootconfig/main.c | 29 +-
tools/bootconfig/samples/exp-good-mixed-kv1.bconf | 7 +
tools/bootconfig/samples/good-mixed-kv1.bconf | 5 +
tools/bootconfig/scripts/bconf2ftrace.sh | 21 +-
tools/bootconfig/scripts/ftrace2bconf.sh | 5 +-
tools/bootconfig/test-bootconfig.sh | 6 +
tools/gpio/gpio-event-mon.c | 4 +-
tools/gpio/gpio-hammer.c | 4 +-
tools/gpio/lsgpio.c | 3 +-
tools/objtool/check.c | 4 +
tools/perf/builtin-record.c | 4 +-
tools/testing/radix-tree/maple.c | 13 +-
tools/testing/selftests/cgroup/test_cpuset_prs.sh | 7 +
.../selftests/damon/sysfs_memcg_path_leak.sh | 3 +
.../selftests/drivers/s390x/uvdevice/Makefile | 19 +-
tools/testing/selftests/landlock/fs_test.c | 54 ++++
tools/testing/shared/maple-shared.h | 33 ++
tools/testing/vma/vma_internal.h | 4 +
682 files changed, 10277 insertions(+), 4044 deletions(-)
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH 6.18 001/703] drm/gem-dma: Support dedicated DMA device for allocation and mapping
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 002/703] mpls: add seqcount to protect the platform_label{,s} pair Greg Kroah-Hartman
` (34 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Thomas Zimmermann,
AngeloGioacchino Del Regno, Chen-Yu Tsai, Maíra Canal,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <wenst@chromium.org>
[ Upstream commit a9da24732aaa80d631bffc8a1390836d4b896690 ]
Support for a dedicated DMA device for prime imports was added in commit
143ec8d3f939 ("drm/prime: Support dedicated DMA device for dma-buf imports").
This allowed the DRM driver to provide a dedicated DMA device when its
own underlying device was not capable of DMA, for example when it is a
USB device (the original target) or a virtual device. The latter case is
common on embedded SoCs, on which the display pipeline is composed of
various fixed function blocks, and the DRM device is simply a made-up
device, an address space managing the routing between the blocks, or
whichever block the implementor thought made sense at the time. The
point is that the chosen device is often not the actual device doing
the DMA. Various drivers have used workarounds or reimplemented the
GEM DMA helpers to get the DMA addresses and IOMMUs to work correctly.
Add support for the dedicated DMA device to the GEM DMA helpers.
No existing driver currently uses the GEM DMA helpers and calls
drm_dev_set_dma_dev() to set a dedicated DMA device, so no existing
users should be affected.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20260311094929.3393338-3-wenst@chromium.org
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/drm_gem_dma_helper.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem_dma_helper.c b/drivers/gpu/drm/drm_gem_dma_helper.c
index 4f0320df858f8..55246a59e8bb8 100644
--- a/drivers/gpu/drm/drm_gem_dma_helper.c
+++ b/drivers/gpu/drm/drm_gem_dma_helper.c
@@ -144,12 +144,13 @@ struct drm_gem_dma_object *drm_gem_dma_create(struct drm_device *drm,
return dma_obj;
if (dma_obj->map_noncoherent) {
- dma_obj->vaddr = dma_alloc_noncoherent(drm->dev, size,
+ dma_obj->vaddr = dma_alloc_noncoherent(drm_dev_dma_dev(drm),
+ size,
&dma_obj->dma_addr,
DMA_TO_DEVICE,
GFP_KERNEL | __GFP_NOWARN);
} else {
- dma_obj->vaddr = dma_alloc_wc(drm->dev, size,
+ dma_obj->vaddr = dma_alloc_wc(drm_dev_dma_dev(drm), size,
&dma_obj->dma_addr,
GFP_KERNEL | __GFP_NOWARN);
}
@@ -234,12 +235,14 @@ void drm_gem_dma_free(struct drm_gem_dma_object *dma_obj)
drm_prime_gem_destroy(gem_obj, dma_obj->sgt);
} else if (dma_obj->vaddr) {
if (dma_obj->map_noncoherent)
- dma_free_noncoherent(gem_obj->dev->dev, dma_obj->base.size,
+ dma_free_noncoherent(drm_dev_dma_dev(gem_obj->dev),
+ dma_obj->base.size,
dma_obj->vaddr, dma_obj->dma_addr,
DMA_TO_DEVICE);
else
- dma_free_wc(gem_obj->dev->dev, dma_obj->base.size,
- dma_obj->vaddr, dma_obj->dma_addr);
+ dma_free_wc(drm_dev_dma_dev(gem_obj->dev),
+ dma_obj->base.size, dma_obj->vaddr,
+ dma_obj->dma_addr);
}
drm_gem_object_release(gem_obj);
@@ -428,7 +431,7 @@ struct sg_table *drm_gem_dma_get_sg_table(struct drm_gem_dma_object *dma_obj)
if (!sgt)
return ERR_PTR(-ENOMEM);
- ret = dma_get_sgtable(obj->dev->dev, sgt, dma_obj->vaddr,
+ ret = dma_get_sgtable(drm_dev_dma_dev(obj->dev), sgt, dma_obj->vaddr,
dma_obj->dma_addr, obj->size);
if (ret < 0)
goto out;
@@ -535,12 +538,12 @@ int drm_gem_dma_mmap(struct drm_gem_dma_object *dma_obj, struct vm_area_struct *
if (dma_obj->map_noncoherent) {
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
- ret = dma_mmap_pages(dma_obj->base.dev->dev,
+ ret = dma_mmap_pages(drm_dev_dma_dev(dma_obj->base.dev),
vma, vma->vm_end - vma->vm_start,
virt_to_page(dma_obj->vaddr));
} else {
- ret = dma_mmap_wc(dma_obj->base.dev->dev, vma, dma_obj->vaddr,
- dma_obj->dma_addr,
+ ret = dma_mmap_wc(drm_dev_dma_dev(dma_obj->base.dev), vma,
+ dma_obj->vaddr, dma_obj->dma_addr,
vma->vm_end - vma->vm_start);
}
if (ret)
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 002/703] mpls: add seqcount to protect the platform_label{,s} pair
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 001/703] drm/gem-dma: Support dedicated DMA device for allocation and mapping Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 003/703] netlink: do not free nlk->groups while lockless readers can use it Greg Kroah-Hartman
` (33 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yuan Tan, Yifan Wu, Juefei Pu,
Xin Liu, Sabrina Dubroca, Jakub Kicinski, Artem Dinaburg,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sabrina Dubroca <sd@queasysnail.net>
[ Upstream commit 629ec78ef8608d955ce217880cdc3e1873af3a15 ]
The RCU-protected codepaths (mpls_forward, mpls_dump_routes) can have
an inconsistent view of platform_labels vs platform_label in case of a
concurrent resize (resize_platform_label_table, under
platform_mutex). This can lead to OOB accesses.
This patch adds a seqcount, so that we get a consistent snapshot.
Note that mpls_label_ok is also susceptible to this, so the check
against RTA_DST in rtm_to_route_config, done outside platform_mutex,
is not sufficient. This value gets passed to mpls_label_ok once more
in both mpls_route_add and mpls_route_del, so there is no issue, but
that additional check must not be removed.
Reported-by: Yuan Tan <tanyuan98@outlook.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Fixes: 7720c01f3f590 ("mpls: Add a sysctl to control the size of the mpls label table")
Fixes: dde1b38e873c ("mpls: Convert mpls_dump_routes() to RCU.")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/cd8fca15e3eb7e212b094064cd83652e20fd9d31.1774284088.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Backport to 6.18.y: 6.18.y has neither the per-netns platform_mutex
(upstream e833eb25161a) nor the RCU conversion of mpls_dump_routes()
(upstream dde1b38e873c); resize_platform_label_table() is serialized
by RTNL. Use a plain seqcount_t instead of seqcount_mutex_t and
disable preemption explicitly around the write section, since
local_bh_disable() does not do so on PREEMPT_RT. Keep
rcu_dereference_rtnl() in the helper because mpls_getroute() reaches
it under RTNL without rcu_read_lock(). mpls_dump_routes() still runs
under RTNL, so it is left unchanged. ]
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/net/netns/mpls.h | 2 ++
net/mpls/af_mpls.c | 37 ++++++++++++++++++++++++++++++-------
2 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/include/net/netns/mpls.h b/include/net/netns/mpls.h
index 19ad2574b267c..9b83b7f43d83b 100644
--- a/include/net/netns/mpls.h
+++ b/include/net/netns/mpls.h
@@ -7,6 +7,7 @@
#define __NETNS_MPLS_H__
#include <linux/types.h>
+#include <linux/seqlock.h>
struct mpls_route;
struct ctl_table_header;
@@ -16,6 +17,7 @@ struct netns_mpls {
int default_ttl;
size_t platform_labels;
struct mpls_route __rcu * __rcu *platform_label;
+ seqcount_t platform_label_seq;
struct ctl_table_header *ctl;
};
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index 608c43a4602d6..9ed136931c4f1 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -75,16 +75,31 @@ static void rtmsg_lfib(int event, u32 label, struct mpls_route *rt,
struct nlmsghdr *nlh, struct net *net, u32 portid,
unsigned int nlm_flags);
+static struct mpls_route __rcu **mpls_platform_label_rcu(struct net *net, size_t *platform_labels)
+{
+ struct mpls_route __rcu **platform_label;
+ unsigned int sequence;
+
+ do {
+ sequence = read_seqcount_begin(&net->mpls.platform_label_seq);
+ platform_label = rcu_dereference_rtnl(net->mpls.platform_label);
+ *platform_labels = net->mpls.platform_labels;
+ } while (read_seqcount_retry(&net->mpls.platform_label_seq, sequence));
+
+ return platform_label;
+}
+
static struct mpls_route *mpls_route_input_rcu(struct net *net, unsigned index)
{
- struct mpls_route *rt = NULL;
+ struct mpls_route __rcu **platform_label;
+ size_t platform_labels;
- if (index < net->mpls.platform_labels) {
- struct mpls_route __rcu **platform_label =
- rcu_dereference_rtnl(net->mpls.platform_label);
- rt = rcu_dereference_rtnl(platform_label[index]);
- }
- return rt;
+ platform_label = mpls_platform_label_rcu(net, &platform_labels);
+
+ if (index >= platform_labels)
+ return NULL;
+
+ return rcu_dereference_rtnl(platform_label[index]);
}
bool mpls_output_possible(const struct net_device *dev)
@@ -2582,8 +2597,14 @@ static int resize_platform_label_table(struct net *net, size_t limit)
}
/* Update the global pointers */
+ local_bh_disable();
+ preempt_disable();
+ write_seqcount_begin(&net->mpls.platform_label_seq);
net->mpls.platform_labels = limit;
rcu_assign_pointer(net->mpls.platform_label, labels);
+ write_seqcount_end(&net->mpls.platform_label_seq);
+ preempt_enable();
+ local_bh_enable();
rtnl_unlock();
@@ -2664,6 +2685,8 @@ static int mpls_net_init(struct net *net)
struct ctl_table *table;
int i;
+ seqcount_init(&net->mpls.platform_label_seq);
+
net->mpls.platform_labels = 0;
net->mpls.platform_label = NULL;
net->mpls.ip_ttl_propagate = 1;
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 003/703] netlink: do not free nlk->groups while lockless readers can use it
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 001/703] drm/gem-dma: Support dedicated DMA device for allocation and mapping Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 002/703] mpls: add seqcount to protect the platform_label{,s} pair Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 004/703] net: init shinfo->gso_segs from qdisc_pkt_len_init() Greg Kroah-Hartman
` (32 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, James Burton, Eric Dumazet,
Jakub Kicinski, Artem Dinaburg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit ceac0de741bfb47ca255eee075257b3bb31f0651 ]
netlink_realloc_groups() uses krealloc() under netlink_table_grab().
Whenever NLGRPSZ(groups) lands in a different kmalloc bucket, the old
bitmap is freed immediately.
Two readers of nlk->groups / nlk->ngroups do not hold the netlink
table lock:
1) sk_diag_dump_groups(). Hashed (bound) sockets are dumped from the
rhashtable walk in __netlink_diag_dump(), which only holds RCU.
Only the mc_list part of the dump takes nl_table_lock.
2) netlink_native_seq_show() (/proc/net/netlink), whose walk has been
lockless since commit 21e4902aea80 ("netlink: Lockless lookup with
RCU grace period in socket release").
Both can read a freed buffer, and sk_diag_dump_groups() can also read
past the end of the old (smaller) buffer if it happens to load the old
@groups pointer together with the new @ngroups value, copying the
result into a NETLINK_DIAG_GROUPS attribute.
This is the same class of bug that commit f773608026ee ("netlink:
access nlk groups safely in netlink bind and getname") fixed for bind()
and getname(); these two readers were missed. Simply grabbing the table
lock in sk_diag_dump_groups() is not an option, because it is also
called with nl_table_lock already held from the mc_list section of the
dump.
Make the lockless readers safe instead:
- Allocate a new bitmap and free the old one after an RCU grace period,
instead of relying on the implicit kfree() done by krealloc().
- Publish @groups before @ngroups, both with release semantics, and have
the lockless readers load @ngroups first. A reader can then never pair
the new (bigger) size with the old (smaller) buffer, and a reader
picking up the new pointer while still seeing the old size is
guaranteed to see the initialized bitmap.
netlink_realloc_groups() is called from process context (bind() and
setsockopt()), so kfree_rcu_mightsleep() can be used, once the table
has been released.
Fixes: 21e4902aea80 ("netlink: Lockless lookup with RCU grace period in socket release")
Fixes: ad202074320c ("netlink: Use rhashtable walk interface in diag dump")
Reported-by: James Burton <jamesburton@meta.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260911160804.917099-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Backport to 6.18.y: context adjusted in netlink_native_seq_show(),
where 6.18.y prints sock_i_ino() with "%-8lu" instead of "%-8llu";
the code change is identical to upstream. ]
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/netlink/af_netlink.c | 42 ++++++++++++++++++++++++++++++++--------
net/netlink/diag.c | 20 +++++++++++++++----
2 files changed, 50 insertions(+), 12 deletions(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 9e1f64f18e3f8..83e5780afd4c1 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -923,9 +923,9 @@ netlink_update_subscriptions(struct sock *sk, unsigned int subscriptions)
static int netlink_realloc_groups(struct sock *sk)
{
+ unsigned long *new_groups, *old_groups = NULL;
struct netlink_sock *nlk = nlk_sk(sk);
unsigned int groups;
- unsigned long *new_groups;
int err = 0;
netlink_table_grab();
@@ -939,18 +939,37 @@ static int netlink_realloc_groups(struct sock *sk)
if (nlk->ngroups >= groups)
goto out_unlock;
- new_groups = krealloc(nlk->groups, NLGRPSZ(groups), GFP_ATOMIC);
- if (new_groups == NULL) {
+ /* Can not use krealloc(), because the old buffer might be freed
+ * immediately, while lockless readers (netlink diag dump and
+ * /proc/net/netlink) can still be looking at it.
+ */
+ new_groups = kzalloc(NLGRPSZ(groups), GFP_ATOMIC);
+ if (!new_groups) {
err = -ENOMEM;
goto out_unlock;
}
- memset((char *)new_groups + NLGRPSZ(nlk->ngroups), 0,
- NLGRPSZ(groups) - NLGRPSZ(nlk->ngroups));
+ old_groups = nlk->groups;
+ if (old_groups)
+ memcpy(new_groups, old_groups, NLGRPSZ(nlk->ngroups));
+
+ /* Publish the new bitmap and its content: pairs with the address
+ * dependency in lockless readers, which can pick up the new pointer
+ * while still seeing the old (smaller) nlk->ngroups.
+ */
+ smp_store_release(&nlk->groups, new_groups);
+
+ /* Then publish the new size: pairs with smp_load_acquire() from
+ * lockless readers, so that they can not read NLGRPSZ(new ngroups)
+ * bytes from the old buffer.
+ */
+ smp_store_release(&nlk->ngroups, groups);
- nlk->groups = new_groups;
- nlk->ngroups = groups;
out_unlock:
netlink_table_ungrab();
+
+ if (old_groups)
+ kfree_rcu_mightsleep(old_groups);
+
return err;
}
@@ -2719,12 +2738,19 @@ static int netlink_native_seq_show(struct seq_file *seq, void *v)
} else {
struct sock *s = v;
struct netlink_sock *nlk = nlk_sk(s);
+ const unsigned long *groups;
+
+ /* Lockless read : netlink_realloc_groups() can change
+ * nlk->groups under us. The old buffer is freed after an
+ * RCU grace period, and this walk is RCU protected.
+ */
+ groups = READ_ONCE(nlk->groups);
seq_printf(seq, "%pK %-3d %-10u %08x %-8d %-8d %-5d %-8d %-8u %-8lu\n",
s,
s->sk_protocol,
nlk->portid,
- nlk->groups ? (u32)nlk->groups[0] : 0,
+ groups ? (u32)groups[0] : 0,
sk_rmem_alloc_get(s),
sk_wmem_alloc_get(s),
READ_ONCE(nlk->cb_running),
diff --git a/net/netlink/diag.c b/net/netlink/diag.c
index b8e58132e8af1..16de6618e0bea 100644
--- a/net/netlink/diag.c
+++ b/net/netlink/diag.c
@@ -12,12 +12,24 @@
static int sk_diag_dump_groups(struct sock *sk, struct sk_buff *nlskb)
{
struct netlink_sock *nlk = nlk_sk(sk);
-
- if (nlk->groups == NULL)
+ unsigned long *groups;
+ unsigned int ngroups;
+
+ /* Hashed sockets are dumped from the rhashtable walk, which only
+ * holds rcu_read_lock(), while netlink_realloc_groups() can replace
+ * nlk->groups and nlk->ngroups at any time.
+ *
+ * Read nlk->ngroups first : this pairs with smp_store_release()
+ * from netlink_realloc_groups(), so that we can not use the new
+ * (bigger) size with the old (smaller) buffer. The old buffer is
+ * freed after an RCU grace period.
+ */
+ ngroups = smp_load_acquire(&nlk->ngroups);
+ groups = READ_ONCE(nlk->groups);
+ if (!groups)
return 0;
- return nla_put(nlskb, NETLINK_DIAG_GROUPS, NLGRPSZ(nlk->ngroups),
- nlk->groups);
+ return nla_put(nlskb, NETLINK_DIAG_GROUPS, NLGRPSZ(ngroups), groups);
}
static int sk_diag_put_flags(struct sock *sk, struct sk_buff *skb)
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 004/703] net: init shinfo->gso_segs from qdisc_pkt_len_init()
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (2 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 003/703] netlink: do not free nlk->groups while lockless readers can use it Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 005/703] net: pull headers in qdisc_pkt_len_segs_init() Greg Kroah-Hartman
` (31 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eric Dumazet, Paolo Abeni,
Artem Dinaburg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit be1b70ab21cbe8f8bb8ecf39eb34880882252773 ]
Qdisc use shinfo->gso_segs for their pkts stats in bstats_update(),
but this field needs to be initialized for SKB_GSO_DODGY users.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20251121083256.674562-3-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Stable-dep-of: 7fb4c1967011 ("net: pull headers in qdisc_pkt_len_segs_init()")
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/core/dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 91da33c29aa18..4c907f483ca42 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4138,7 +4138,7 @@ EXPORT_SYMBOL_GPL(validate_xmit_skb_list);
static void qdisc_pkt_len_init(struct sk_buff *skb)
{
- const struct skb_shared_info *shinfo = skb_shinfo(skb);
+ struct skb_shared_info *shinfo = skb_shinfo(skb);
qdisc_skb_cb(skb)->pkt_len = skb->len;
@@ -4179,6 +4179,7 @@ static void qdisc_pkt_len_init(struct sk_buff *skb)
if (payload <= 0)
return;
gso_segs = DIV_ROUND_UP(payload, shinfo->gso_size);
+ shinfo->gso_segs = gso_segs;
}
qdisc_skb_cb(skb)->pkt_len += (gso_segs - 1) * hdr_len;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 005/703] net: pull headers in qdisc_pkt_len_segs_init()
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (3 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 004/703] net: init shinfo->gso_segs from qdisc_pkt_len_init() Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 006/703] xfrm: Dont clobber inner headers when already set Greg Kroah-Hartman
` (30 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eric Dumazet, Joe Damato,
Jakub Kicinski, Artem Dinaburg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 7fb4c19670110f052c04e1ec1d2b953b9f4f57e4 ]
Most ndo_start_xmit() methods expects headers of gso packets
to be already in skb->head.
net/core/tso.c users are particularly at risk, because tso_build_hdr()
does a memcpy(hdr, skb->data, hdr_len);
qdisc_pkt_len_segs_init() already does a dissection of gso packets.
Use pskb_may_pull() instead of skb_header_pointer() to make
sure drivers do not have to reimplement this.
Some malicious packets could be fed, detect them so that we can
drop them sooner with a new SKB_DROP_REASON_SKB_BAD_GSO drop_reason.
Fixes: e876f208af18 ("net: Add a software TSO helper API")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Joe Damato <joe@dama.to>
Link: https://patch.msgid.link/20260403221540.3297753-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Backport to 6.18.y: 6.18.y lacks the qdisc_pkt_len_segs_init() rename
with per-skb pkt_segs accounting and the preceding no-functional-change
cleanup 30e02ec3b4b6 ("net: qdisc_pkt_len_segs_init() cleanup"), so the
upstream result is applied to qdisc_pkt_len_init() without the pkt_segs
lines. In 6.18.y only __dev_queue_xmit() calls the function, so only
that caller handles the returned drop reason. ]
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/net/dropreason-core.h | 3 ++
net/core/dev.c | 83 +++++++++++++++++++++--------------
2 files changed, 52 insertions(+), 34 deletions(-)
diff --git a/include/net/dropreason-core.h b/include/net/dropreason-core.h
index 811057ae8ed25..ab36e3eded67e 100644
--- a/include/net/dropreason-core.h
+++ b/include/net/dropreason-core.h
@@ -79,6 +79,7 @@
FN(UNHANDLED_PROTO) \
FN(SKB_CSUM) \
FN(SKB_GSO_SEG) \
+ FN(SKB_BAD_GSO) \
FN(SKB_UCOPY_FAULT) \
FN(DEV_HDR) \
FN(DEV_READY) \
@@ -422,6 +423,8 @@ enum skb_drop_reason {
SKB_DROP_REASON_SKB_CSUM,
/** @SKB_DROP_REASON_SKB_GSO_SEG: gso segmentation error */
SKB_DROP_REASON_SKB_GSO_SEG,
+ /** @SKB_DROP_REASON_SKB_BAD_GSO: malicious gso packet. */
+ SKB_DROP_REASON_SKB_BAD_GSO,
/**
* @SKB_DROP_REASON_SKB_UCOPY_FAULT: failed to copy data from user space,
* e.g., via zerocopy_sg_from_iter() or skb_orphan_frags_rx()
diff --git a/net/core/dev.c b/net/core/dev.c
index 4c907f483ca42..792cc34fc218a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4136,53 +4136,63 @@ struct sk_buff *validate_xmit_skb_list(struct sk_buff *skb, struct net_device *d
}
EXPORT_SYMBOL_GPL(validate_xmit_skb_list);
-static void qdisc_pkt_len_init(struct sk_buff *skb)
+static enum skb_drop_reason qdisc_pkt_len_init(struct sk_buff *skb)
{
struct skb_shared_info *shinfo = skb_shinfo(skb);
+ unsigned int hdr_len, tlen;
+ u16 gso_segs;
qdisc_skb_cb(skb)->pkt_len = skb->len;
+ if (!shinfo->gso_size)
+ return SKB_NOT_DROPPED_YET;
+
+ gso_segs = shinfo->gso_segs;
/* To get more precise estimation of bytes sent on wire,
* we add to pkt_len the headers size of all segments
*/
- if (shinfo->gso_size && skb_transport_header_was_set(skb)) {
- u16 gso_segs = shinfo->gso_segs;
- unsigned int hdr_len;
-
- /* mac layer + network layer */
- if (!skb->encapsulation)
- hdr_len = skb_transport_offset(skb);
- else
- hdr_len = skb_inner_transport_offset(skb);
- /* + transport layer */
- if (likely(shinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))) {
- const struct tcphdr *th;
- struct tcphdr _tcphdr;
+ /* mac layer + network layer */
+ if (!skb->encapsulation) {
+ if (unlikely(!skb_transport_header_was_set(skb)))
+ return SKB_NOT_DROPPED_YET;
+ hdr_len = skb_transport_offset(skb);
+ } else {
+ hdr_len = skb_inner_transport_offset(skb);
+ }
+ /* + transport layer */
+ if (likely(shinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))) {
+ const struct tcphdr *th;
- th = skb_header_pointer(skb, hdr_len,
- sizeof(_tcphdr), &_tcphdr);
- if (likely(th))
- hdr_len += __tcp_hdrlen(th);
- } else if (shinfo->gso_type & SKB_GSO_UDP_L4) {
- struct udphdr _udphdr;
+ if (!pskb_may_pull(skb, hdr_len + sizeof(struct tcphdr)))
+ return SKB_DROP_REASON_SKB_BAD_GSO;
- if (skb_header_pointer(skb, hdr_len,
- sizeof(_udphdr), &_udphdr))
- hdr_len += sizeof(struct udphdr);
- }
+ th = (const struct tcphdr *)(skb->data + hdr_len);
+ tlen = __tcp_hdrlen(th);
+ if (tlen < sizeof(*th))
+ return SKB_DROP_REASON_SKB_BAD_GSO;
+ hdr_len += tlen;
+ if (!pskb_may_pull(skb, hdr_len))
+ return SKB_DROP_REASON_SKB_BAD_GSO;
+ } else if (shinfo->gso_type & SKB_GSO_UDP_L4) {
+ if (!pskb_may_pull(skb, hdr_len + sizeof(struct udphdr)))
+ return SKB_DROP_REASON_SKB_BAD_GSO;
+ hdr_len += sizeof(struct udphdr);
+ }
- if (unlikely(shinfo->gso_type & SKB_GSO_DODGY)) {
- int payload = skb->len - hdr_len;
+ /* prior pskb_may_pull() might have changed skb->head. */
+ shinfo = skb_shinfo(skb);
+ if (unlikely(shinfo->gso_type & SKB_GSO_DODGY)) {
+ int payload = skb->len - hdr_len;
- /* Malicious packet. */
- if (payload <= 0)
- return;
- gso_segs = DIV_ROUND_UP(payload, shinfo->gso_size);
- shinfo->gso_segs = gso_segs;
- }
- qdisc_skb_cb(skb)->pkt_len += (gso_segs - 1) * hdr_len;
+ /* Malicious packet. */
+ if (payload <= 0)
+ return SKB_DROP_REASON_SKB_BAD_GSO;
+ gso_segs = DIV_ROUND_UP(payload, shinfo->gso_size);
+ shinfo->gso_segs = gso_segs;
}
+ qdisc_skb_cb(skb)->pkt_len += (gso_segs - 1) * hdr_len;
+ return SKB_NOT_DROPPED_YET;
}
static int dev_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *q,
@@ -4772,6 +4782,12 @@ int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev)
(SKBTX_SCHED_TSTAMP | SKBTX_BPF)))
__skb_tstamp_tx(skb, NULL, NULL, skb->sk, SCM_TSTAMP_SCHED);
+ reason = qdisc_pkt_len_init(skb);
+ if (unlikely(reason)) {
+ dev_core_stats_tx_dropped_inc(dev);
+ kfree_skb_reason(skb, reason);
+ return -EINVAL;
+ }
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
@@ -4779,7 +4795,6 @@ int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev)
skb_update_prio(skb);
- qdisc_pkt_len_init(skb);
tcx_set_ingress(skb, false);
#ifdef CONFIG_NET_EGRESS
if (static_branch_unlikely(&egress_needed_key)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 006/703] xfrm: Dont clobber inner headers when already set
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (4 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 005/703] net: pull headers in qdisc_pkt_len_segs_init() Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 007/703] net: harden qdisc_pkt_len_segs_init() against malicious GSO packets Greg Kroah-Hartman
` (29 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Cosmin Ratiu, Steffen Klassert,
Artem Dinaburg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cosmin Ratiu <cratiu@nvidia.com>
[ Upstream commit fa90a3145c0340c3f624206a81637c542254ea1d ]
On VXLAN over IPsec egress, xfrm{4,6}_transport_output() blindly
overwrite inner_transport_header (== the inner TCP header saved in VXLAN
iptunnel_handle_offloads() -> skb_reset_inner_headers()) with the
current transport_header (== the VXLAN outer UDP header set by
udp_tunnel_xmit_skb()).
This was a latent bug, harmless until commit [1] added a doff validation
check in qdisc_pkt_len_segs_init() for encapsulated GSO packets. With
the wrong inner_transport_header set by xfrm, qdisc_pkt_len_segs_init()
interprets inner_transport_header as a TCP header, reads doff=0 from the
upper byte of the VNI and drops the packet with DROP_REASON_SKB_BAD_GSO.
Besides the use in GSO to determine the header size of segmented
packets, inner_transport_header might be used by drivers to set up
inner checksum offloading by pointing the HW to the inner transport
header. A quick browse through available drivers shows that mlx5 uses
skb->csum_start specifically for this scenario, while others either
don't support VXLAN over IPsec crypto offload (ixgbe) or the HW is
capable of parsing the packets itself (nfp, Chelsio).
But in all cases, it is more correct to let the inner_transport_header
point to the innermost header instead of overwriting it in xfrm.
So fix this by guarding all four inner header save sites in
xfrm_output.c (xfrm{4,6}_transport_output, xfrm{4,6}_tunnel_encap_add)
with a check for skb->inner_protocol. When inner_protocol is set, a
tunnel layer (VXLAN, Geneve, GRE, etc.) has already saved the correct
inner header offsets and they must not be overwritten. When
inner_protocol is zero, no prior tunnel encapsulation exists and xfrm
must save the inner headers itself. The tunnel mode checks are only
added for completion, since they aren't strictly required, as
xfrm_output() forces software GSO in tunnel mode before encap.
This makes the previously added test pass:
# ./tools/testing/selftests/drivers/net/hw/ipsec_vxlan.py
TAP version 13
1..4
ok 1 ipsec_vxlan.test_vxlan_ipsec_crypto_offload.outer_v4_inner_v4
ok 2 ipsec_vxlan.test_vxlan_ipsec_crypto_offload.outer_v4_inner_v6
ok 3 ipsec_vxlan.test_vxlan_ipsec_crypto_offload.outer_v6_inner_v4
ok 4 ipsec_vxlan.test_vxlan_ipsec_crypto_offload.outer_v6_inner_v6
# Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0
[1] commit 7fb4c1967011 ("net: pull headers in qdisc_pkt_len_segs_init()")
Fixes: f1bd7d659ef0 ("xfrm: Add encapsulation header offsets while SKB is not encrypted")
Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/xfrm/xfrm_output.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 262eea7bdea30..433ce19c29002 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -67,7 +67,9 @@ static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb)
struct iphdr *iph = ip_hdr(skb);
int ihl = iph->ihl * 4;
- skb_set_inner_transport_header(skb, skb_transport_offset(skb));
+ if (!skb->inner_protocol)
+ skb_set_inner_transport_header(skb,
+ skb_transport_offset(skb));
skb_set_network_header(skb, -x->props.header_len);
skb->mac_header = skb->network_header +
@@ -168,7 +170,9 @@ static int xfrm6_transport_output(struct xfrm_state *x, struct sk_buff *skb)
int hdr_len;
iph = ipv6_hdr(skb);
- skb_set_inner_transport_header(skb, skb_transport_offset(skb));
+ if (!skb->inner_protocol)
+ skb_set_inner_transport_header(skb,
+ skb_transport_offset(skb));
hdr_len = xfrm6_hdr_offset(x, skb, &prevhdr);
if (hdr_len < 0)
@@ -277,8 +281,10 @@ static int xfrm4_tunnel_encap_add(struct xfrm_state *x, struct sk_buff *skb)
struct iphdr *top_iph;
int flags;
- skb_set_inner_network_header(skb, skb_network_offset(skb));
- skb_set_inner_transport_header(skb, skb_transport_offset(skb));
+ if (!skb->inner_protocol) {
+ skb_set_inner_network_header(skb, skb_network_offset(skb));
+ skb_set_inner_transport_header(skb, skb_transport_offset(skb));
+ }
skb_set_network_header(skb, -x->props.header_len);
skb->mac_header = skb->network_header +
@@ -322,8 +328,10 @@ static int xfrm6_tunnel_encap_add(struct xfrm_state *x, struct sk_buff *skb)
struct ipv6hdr *top_iph;
int dsfield;
- skb_set_inner_network_header(skb, skb_network_offset(skb));
- skb_set_inner_transport_header(skb, skb_transport_offset(skb));
+ if (!skb->inner_protocol) {
+ skb_set_inner_network_header(skb, skb_network_offset(skb));
+ skb_set_inner_transport_header(skb, skb_transport_offset(skb));
+ }
skb_set_network_header(skb, -x->props.header_len);
skb->mac_header = skb->network_header +
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 007/703] net: harden qdisc_pkt_len_segs_init() against malicious GSO packets
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (5 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 006/703] xfrm: Dont clobber inner headers when already set Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 008/703] net: reject a negative TCP header offset in qdisc_pkt_len_segs_init() Greg Kroah-Hartman
` (28 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, shaos, Eric Dumazet,
Jamal Hadi Salim, Michael S. Tsirkin, Willem de Bruijn,
Jakub Kicinski, Artem Dinaburg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@kernel.org>
[ Upstream commit c6648c9f3b51c5a8a3df470c1542b2aa378d88f9 ]
An SKB_GSO_DODGY packet can carry untrusted gso_size and headers.
For instance, gso_size=1 and hdr_len=65532 for a 524275-byte frame
makes qdisc_pkt_len_segs_init() compute an accounted length of
about 4,294,574,091 bytes (after gso_segs silently wrapped in a u16).
With DRR quantum 256, the dequeue path then needs ~16.8 million
deficit refills before it can dequeue the skb, keeping the CPU in
the qdisc path long enough to trigger the soft-lockup watchdog.
Commit 8f735d64382d ("net/sched: bound qdisc_pkt_len to prevent
qdisc soft lockup") added QDISC_PKT_LEN_MAX to bound size table
amplification. Use the same bound for DODGY packets:
- Make gso_segs a u32 and drop packets whose segment count does
not fit GSO_MAX_SEGS, instead of silently truncating it.
- Drop packets whose estimated qdisc_pkt_len() would exceed
QDISC_PKT_LEN_MAX.
Fixes: 15e5a0307164 ("net_sched: better precise estimation on packet length for untrusted packets")
Reported-by: shaos <shawnq1@163.com>
Closes: https://lore.kernel.org/netdev/20261022144755.65025-1-shawnq1@163.com/
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20261022155436.117507-1-edumazet@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Backport to 6.18.y: context adjusted; 6.18.y keeps the name
qdisc_pkt_len_init() and has no qdisc_skb_cb()->pkt_segs. The code
change is identical to upstream. ]
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/core/dev.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 792cc34fc218a..40f3bb73c0ca3 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4140,7 +4140,7 @@ static enum skb_drop_reason qdisc_pkt_len_init(struct sk_buff *skb)
{
struct skb_shared_info *shinfo = skb_shinfo(skb);
unsigned int hdr_len, tlen;
- u16 gso_segs;
+ u32 gso_segs;
qdisc_skb_cb(skb)->pkt_len = skb->len;
if (!shinfo->gso_size)
@@ -4189,6 +4189,15 @@ static enum skb_drop_reason qdisc_pkt_len_init(struct sk_buff *skb)
if (payload <= 0)
return SKB_DROP_REASON_SKB_BAD_GSO;
gso_segs = DIV_ROUND_UP(payload, shinfo->gso_size);
+ /* shinfo->gso_segs is a 16bit field.
+ * Also make sure untrusted gso_size/hdr_len can not inflate
+ * qdisc_pkt_len() beyond QDISC_PKT_LEN_MAX, or deficit
+ * schedulers could spin in their refill loops.
+ */
+ if (unlikely(gso_segs > GSO_MAX_SEGS ||
+ skb->len + (u64)(gso_segs - 1) * hdr_len >
+ QDISC_PKT_LEN_MAX))
+ return SKB_DROP_REASON_SKB_BAD_GSO;
shinfo->gso_segs = gso_segs;
}
qdisc_skb_cb(skb)->pkt_len += (gso_segs - 1) * hdr_len;
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 008/703] net: reject a negative TCP header offset in qdisc_pkt_len_segs_init()
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (6 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 007/703] net: harden qdisc_pkt_len_segs_init() against malicious GSO packets Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 009/703] sctp: validate cookie AUTH state before use Greg Kroah-Hartman
` (27 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexei Starovoitov, Eric Dumazet,
Michael S. Tsirkin, Paolo Abeni, Artem Dinaburg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexei Starovoitov <ast@kernel.org>
[ Upstream commit 35d2d6e5ac0d22428b2a0216061f3330c095393c ]
qdisc_pkt_len_segs_init() stores skb_transport_offset(), or the inner
offset, in the unsigned hdr_len. A header in front of skb->data gives a
negative offset. For an offset a little below zero, pskb_may_pull() gets a
small length and succeeds. Then a 64-bit kernel reads the TCP header far
after the skb and can crash. Further below zero pskb_may_pull() fails.
Commit 28a57fb2c5df ("net: iptunnel: fix stale transport header during
tunnel decapsulation") fixed one source of such offsets. Other code that
removes bytes from the front of a packet can leave the same stale header.
Return SKB_DROP_REASON_SKB_BAD_GSO for a negative offset in the TCP branch.
SKB_GSO_UDP_L4 and the other GSO types read no header and still get a wrong
qdisc_pkt_len(). On a 64-bit kernel only packets that cause the read after
the skb today get a new result. Then __dev_queue_xmit() drops them and
returns -EINVAL, but sch_handle_ingress() ignores the result. Their content
can be valid. Thus the code that leaves the header stale needs its own fix.
Fixes: 7fb4c1967011 ("net: pull headers in qdisc_pkt_len_segs_init()")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
CC: stable@vger.kernel.org
Link: https://patch.msgid.link/20261101194433.2637113-1-alexei.starovoitov@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ Backport to 6.18.y: in 6.18.y the function is qdisc_pkt_len_init()
and __dev_queue_xmit() is its only caller; sch_handle_ingress() does
not call it. The code change is identical to upstream. ]
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/core/dev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 40f3bb73c0ca3..c0aa4e8625b5d 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4164,7 +4164,9 @@ static enum skb_drop_reason qdisc_pkt_len_init(struct sk_buff *skb)
if (likely(shinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))) {
const struct tcphdr *th;
- if (!pskb_may_pull(skb, hdr_len + sizeof(struct tcphdr)))
+ /* A header in front of skb->data gives a negative offset. */
+ if ((int)hdr_len < 0 ||
+ !pskb_may_pull(skb, hdr_len + sizeof(struct tcphdr)))
return SKB_DROP_REASON_SKB_BAD_GSO;
th = (const struct tcphdr *)(skb->data + hdr_len);
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 009/703] sctp: validate cookie AUTH state before use
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (7 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 008/703] net: reject a negative TCP header offset in qdisc_pkt_len_segs_init() Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 010/703] net/sched: codel: bound the dropping loop per dequeue call Greg Kroah-Hartman
` (26 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Jérémy Jean, Xin Long,
Jakub Kicinski, Artem Dinaburg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
[ Upstream commit 3dbb44d88b1e94dd31fe43588af7437b34b44d56 ]
When cookie authentication is disabled, COOKIE_ECHO restores fixed-size
AUTH fields directly from peer-controlled cookie bytes. A forged RANDOM
length, HMAC list, or CHUNKS list can then reach association consumers
with lengths or identifiers that were never validated against the local
backing arrays.
A forged RANDOM length can cause out-of-bounds reads during key-vector
construction. A forged HMAC identifier also caused a 32-byte write past
a zero-length AUTH chunk, providing a primitive for a local privilege
escalation chain.
Validate the cookie's RANDOM, HMACS, and CHUNKS parameters at the cookie
trust boundary before copying them into the association. Reject invalid
types, malformed lengths, unsupported HMAC identifiers, HMAC lists
without SHA1, and forbidden chunk ids.
Fixes: bbd0d59809f9 ("[SCTP]: Implement the receive and verification of AUTH chunk")
Fixes: 1f485649f529 ("[SCTP]: Implement SCTP-AUTH internals")
Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20260804200042.2412009-1-Jeremy.Jean@oss.cyber.gouv.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Backport to 6.18.y: context adjusted in include/net/sctp/auth.h, where
6.18.y still declares sctp_auth_init_hmacs(), and in
sctp_unpack_cookie(), where 6.18.y still sets retval->c.peer_addr
after copying the cookie. No code changes. ]
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/net/sctp/auth.h | 3 ++
net/sctp/auth.c | 75 ++++++++++++++++++++++++++++++++++++++++
net/sctp/sm_make_chunk.c | 3 ++
3 files changed, 81 insertions(+)
diff --git a/include/net/sctp/auth.h b/include/net/sctp/auth.h
index 3d5879e08e78a..fe45c8df210f9 100644
--- a/include/net/sctp/auth.h
+++ b/include/net/sctp/auth.h
@@ -22,6 +22,7 @@ struct sctp_endpoint;
struct sctp_association;
struct sctp_authkey;
struct sctp_hmacalgo;
+struct sctp_cookie;
/* Defines an HMAC algorithm supported by SCTP chunk authentication */
struct sctp_hmac {
@@ -72,6 +73,8 @@ struct sctp_shared_key *sctp_auth_get_shkey(
int sctp_auth_asoc_copy_shkeys(const struct sctp_endpoint *ep,
struct sctp_association *asoc,
gfp_t gfp);
+bool sctp_auth_verify_cookie_params(const struct sctp_endpoint *ep,
+ const struct sctp_cookie *cookie);
int sctp_auth_init_hmacs(struct sctp_endpoint *ep, gfp_t gfp);
const struct sctp_hmac *sctp_auth_get_hmac(__u16 hmac_id);
const struct sctp_hmac *
diff --git a/net/sctp/auth.c b/net/sctp/auth.c
index fbbfa0c279552..95c272948c60a 100644
--- a/net/sctp/auth.c
+++ b/net/sctp/auth.c
@@ -377,6 +377,81 @@ int sctp_auth_asoc_copy_shkeys(const struct sctp_endpoint *ep,
return -ENOMEM;
}
+static bool sctp_auth_chunk_id_forbidden(__u8 chunk_id)
+{
+ switch (chunk_id) {
+ case SCTP_CID_INIT:
+ case SCTP_CID_INIT_ACK:
+ case SCTP_CID_SHUTDOWN_COMPLETE:
+ case SCTP_CID_AUTH:
+ return true;
+ default:
+ return false;
+ }
+}
+
+/* Verify AUTH parameters copied from a state cookie before they are restored
+ * into an association. When cookie authentication is disabled these fields
+ * are peer-controlled, so they must satisfy the same constraints as locally
+ * generated AUTH parameters.
+ */
+bool sctp_auth_verify_cookie_params(const struct sctp_endpoint *ep,
+ const struct sctp_cookie *cookie)
+{
+ const struct sctp_paramhdr *random;
+ const struct sctp_hmac_algo_param *hmacs;
+ const struct sctp_chunks_param *chunks;
+ u16 hmacs_len, chunks_len;
+ u16 n_hmacs, n_chunks, i;
+ bool has_sha1 = false;
+
+ if (sctp_sk(ep->base.sk)->cookie_auth_enable || !ep->auth_enable)
+ return true;
+
+ random = (const struct sctp_paramhdr *)cookie->auth_random;
+ if (random->type != SCTP_PARAM_RANDOM ||
+ ntohs(random->length) != sizeof(*random) + SCTP_AUTH_RANDOM_LENGTH)
+ return false;
+
+ hmacs = (const struct sctp_hmac_algo_param *)cookie->auth_hmacs;
+ hmacs_len = ntohs(hmacs->param_hdr.length);
+ if (hmacs->param_hdr.type != SCTP_PARAM_HMAC_ALGO ||
+ hmacs_len < sizeof(struct sctp_paramhdr) +
+ sizeof(hmacs->hmac_ids[0]) ||
+ hmacs_len > sizeof(cookie->auth_hmacs) ||
+ (hmacs_len - sizeof(struct sctp_paramhdr)) %
+ sizeof(hmacs->hmac_ids[0]))
+ return false;
+
+ n_hmacs = (hmacs_len - sizeof(struct sctp_paramhdr)) /
+ sizeof(hmacs->hmac_ids[0]);
+ for (i = 0; i < n_hmacs; i++) {
+ u16 hmac_id = ntohs(hmacs->hmac_ids[i]);
+
+ if (!sctp_hmac_supported(hmac_id))
+ return false;
+ if (hmac_id == SCTP_AUTH_HMAC_ID_SHA1)
+ has_sha1 = true;
+ }
+ if (!has_sha1)
+ return false;
+
+ chunks = (const struct sctp_chunks_param *)cookie->auth_chunks;
+ chunks_len = ntohs(chunks->param_hdr.length);
+ if (chunks->param_hdr.type != SCTP_PARAM_CHUNKS ||
+ chunks_len < sizeof(struct sctp_paramhdr) ||
+ chunks_len > sizeof(cookie->auth_chunks))
+ return false;
+
+ n_chunks = chunks_len - sizeof(struct sctp_paramhdr);
+ for (i = 0; i < n_chunks; i++) {
+ if (sctp_auth_chunk_id_forbidden(chunks->chunks[i]))
+ return false;
+ }
+
+ return true;
+}
+
/* Public interface to create the association shared key.
* See code above for the algorithm.
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index db9406f4681c9..ae4ca90fce9ab 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1867,6 +1867,9 @@ struct sctp_association *sctp_unpack_cookie(
/* Set up our peer's port number. */
retval->peer.port = ntohs(chunk->sctp_hdr->source);
+ if (!sctp_auth_verify_cookie_params(ep, bear_cookie))
+ goto malformed;
+
/* Populate the association from the cookie. */
memcpy(&retval->c, bear_cookie, sizeof(*bear_cookie));
retval->c.peer_addr = paddr;
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 010/703] net/sched: codel: bound the dropping loop per dequeue call
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (8 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 009/703] sctp: validate cookie AUTH state before use Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 011/703] net: flush skb_defer_nodes in dev_cpu_dead() Greg Kroah-Hartman
` (25 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Vega, Eric Dumazet, Victor Nogueira,
Jamal Hadi Salim, Toke Høiland-Jørgensen,
Jakub Kicinski, Artem Dinaburg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jamal Hadi Salim <jhs@mojatatu.com>
[ Upstream commit 7f4a5ec6258fd7c92633ec4b0493fc51166d9398 ]
The CoDel control law schedules the next drop one interval/sqrt(count)
after the previous drop, using the configured interval
(codel_params.interval). For very small intervals the scheduled step
rounds down to zero, so the dropping loop in codel_dequeue() never
advances and drains the entire backlog under the qdisc lock in one
call - an unprivileged user can trigger a soft lockup this way.
Fix in the shared codel code used by both codel and fq_codel:
1. Make the control-law step at least 1 tick so the dropping loop
always moves forward.
2. Cap the dropping loop at CODEL_MAX_DROPS_PER_DEQUEUE (256) drops
per codel_dequeue() call, resyncing drop_next to now when the cap
is hit: the catch-up owed to the loop grows with the idle gap and
the backlog, which no interval threshold can bound. This is a
deliberate behaviour change after long idle gaps.
The cap applies to fq_codel (4b549a2ef4be) and the mac80211 TXQ path
(fixed interval, cap only).
The target sojourn delay (codel_params.target) is not validated: it
does not feed the control law, so a sub-tick value is aggressive
rather than deadlock-prone.
Conditions to recreate the bug:
- tc qdisc add dev lo root handle 1: tbf rate 1kbit burst 2kb limit 1000000
- tc qdisc add dev lo parent 1:1 handle 10: codel interval 2us target 1ms noecn limit 1000000 (same for fq_codel)
- unpatched kernel: tc accepts it; a UDP flood under the 1kbit tbf
soft-lockups (watchdog: BUG: soft lockup) while one
codel_dequeue() call drops the backlog under the qdisc lock
- patched kernel: same setup, at most 256 drops per dequeue call,
no soft lockup
Testing: claim reproducer and interval 2us/3us variants run clean;
tdc qdisc category passes (see the selftests patch).
Fixes: 76e3cc126bb2 ("codel: Controlled Delay AQM")
Reported-by: Vega <vega@nebusec.ai>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Tested-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@toke.dk>
Link: https://patch.msgid.link/QDISC-1L5H.v1.20260912080102@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Backport to 6.18.y: context adjusted in codel_dequeue(); 6.18.y lacks
the upstream WRITE_ONCE() annotations of the codel state. The added
code is unchanged. ]
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/net/codel.h | 5 +++++
include/net/codel_impl.h | 16 +++++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/include/net/codel.h b/include/net/codel.h
index aa80f744826cd..183d43c2bd434 100644
--- a/include/net/codel.h
+++ b/include/net/codel.h
@@ -140,6 +140,11 @@ struct codel_vars {
/* needed shift to get a Q0.32 number from rec_inv_sqrt */
#define REC_INV_SQRT_SHIFT (32 - REC_INV_SQRT_BITS)
+/* Cap on drops per codel_dequeue() call: the loop's work depends on the
+ * idle gap and backlog, both outside our control; resync when exceeded.
+ */
+#define CODEL_MAX_DROPS_PER_DEQUEUE 256
+
/**
* struct codel_stats - contains codel shared variables and stats
* @maxpacket: largest packet we've seen so far
diff --git a/include/net/codel_impl.h b/include/net/codel_impl.h
index b2c359c6dd1b8..4d5e471472f6a 100644
--- a/include/net/codel_impl.h
+++ b/include/net/codel_impl.h
@@ -93,12 +93,17 @@ static void codel_Newton_step(struct codel_vars *vars)
* CoDel control_law is t + interval/sqrt(count)
* We maintain in rec_inv_sqrt the reciprocal value of sqrt(count) to avoid
* both sqrt() and divide operation.
+ *
+ * Clamp the increment to at least 1 tick: a very small interval (or a
+ * large count) can truncate it to zero, stalling the dropping loop.
*/
static codel_time_t codel_control_law(codel_time_t t,
codel_time_t interval,
u32 rec_inv_sqrt)
{
- return t + reciprocal_scale(interval, rec_inv_sqrt << REC_INV_SQRT_SHIFT);
+ return t + max_t(u32, 1,
+ reciprocal_scale(interval,
+ rec_inv_sqrt << REC_INV_SQRT_SHIFT));
}
static bool codel_should_drop(const struct sk_buff *skb,
@@ -154,6 +159,7 @@ static struct sk_buff *codel_dequeue(void *ctx,
codel_skb_dequeue_t dequeue_func)
{
struct sk_buff *skb = dequeue_func(vars, ctx);
+ unsigned int drops = 0;
codel_time_t now;
bool drop;
@@ -180,6 +186,14 @@ static struct sk_buff *codel_dequeue(void *ctx,
*/
while (vars->dropping &&
codel_time_after_eq(now, vars->drop_next)) {
+ if (++drops > CODEL_MAX_DROPS_PER_DEQUEUE) {
+ /* fell far behind the schedule */
+ WRITE_ONCE(vars->drop_next,
+ codel_control_law(now,
+ params->interval,
+ vars->rec_inv_sqrt));
+ break;
+ }
vars->count++; /* dont care of possible wrap
* since there is no more divide
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 011/703] net: flush skb_defer_nodes in dev_cpu_dead()
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (9 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 010/703] net/sched: codel: bound the dropping loop per dequeue call Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 012/703] ext4: teach ext4_meta_trans_blocks() about number of allocated extents Greg Kroah-Hartman
` (24 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Eric Dumazet, Kris Pan,
Jakub Kicinski, Artem Dinaburg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 06e3f54e8b22040ada01a28343badf1990b4dd7d ]
When a CPU goes offline, dev_cpu_dead() drains its softnet queues
(completion_queue, output_queue, poll_list, process_queue, and
input_pkt_queue), but leaves net_hotdata.skb_defer_nodes untouched.
If oldcpu goes offline while holding pending skbs in its
skb_defer_nodes lists (e.g. below the sysctl_skb_defer_max >> 1 IPI
threshold, or if the IPI races with CPU teardown), those skbs remain
stranded until oldcpu is brought back online. If any of these skbs
hold page_pool fragments, page_pool_destroy() will stall indefinitely
waiting for inflight pages to be returned when a netdev or driver is
torn down while oldcpu is offline.
Additionally, if smp_call_function_single_async() fails in
kick_defer_list_purge() because the target CPU went offline, reset
defer_ipi_scheduled to 0 so future IPI kicks are not blocked when the
CPU comes back online.
Also, if oldcpu was the last online CPU on its NUMA node, drain that
node's slot across all CPUs so no skbs deferred from that node remain
stranded on idle remote CPUs (or if the node itself is subsequently
offlined).
Finally, in skb_attempt_defer_free(), re-check cpu_online(cpu) and
whether the caller migrated CPUs after llist_add(), flushing the node
list if so, to close the preemption TOCTOU race against CPU/node
teardown.
Fixes: 68822bdf76f1 ("net: generalize skb freeing deferral to per-cpu lists")
Fixes: 5628f3fe3b16 ("net: add NUMA awareness to skb_attempt_defer_free()")
Closes: https://lore.kernel.org/netdev/20260916003430.3612956-1-kris.pan@intel.com/
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Kris Pan <kris.pan@intel.com>
Link: https://patch.msgid.link/20260923130318.607255-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Backport to 6.18.y: 6.18.y loads skb->alloc_cpu in the declaration of
cpu and lacks the upstream skb_defer_disable_key and skb_zcopy()
bypasses, so my_cpu is declared separately and the remaining hunks
are adjusted for context. The 6.18.y flush loop has no prefetch();
the new __skb_defer_free_flush() helper adds it as upstream does.
skb_defer_free_flush() keeps the for_each_online_node() iteration
from commit 58fb1e2a33ea ("net: iterate online nodes in
skb_defer_free_flush()"), already in 6.18.y. ]
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/core/dev.c | 46 +++++++++++++++++++++++++++++++++++-----------
net/core/dev.h | 2 ++
net/core/skbuff.c | 11 +++++++++--
3 files changed, 46 insertions(+), 13 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index c0aa4e8625b5d..f7e672a4a39f7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5327,7 +5327,8 @@ void kick_defer_list_purge(unsigned int cpu)
backlog_unlock_irq_restore(sd, flags);
} else if (!cmpxchg(&sd->defer_ipi_scheduled, 0, 1)) {
- smp_call_function_single_async(cpu, &sd->defer_csd);
+ if (smp_call_function_single_async(cpu, &sd->defer_csd))
+ WRITE_ONCE(sd->defer_ipi_scheduled, 0);
}
}
@@ -6865,24 +6866,35 @@ bool napi_complete_done(struct napi_struct *n, int work_done)
}
EXPORT_SYMBOL(napi_complete_done);
-static void skb_defer_free_flush(void)
+static void __skb_defer_free_flush(struct skb_defer_node *sdn, int budget)
{
struct llist_node *free_list;
struct sk_buff *skb, *next;
+
+ if (llist_empty(&sdn->defer_list))
+ return;
+ atomic_long_set(&sdn->defer_count, 0);
+ free_list = llist_del_all(&sdn->defer_list);
+
+ llist_for_each_entry_safe(skb, next, free_list, ll_node) {
+ prefetch(next);
+ napi_consume_skb(skb, budget);
+ }
+}
+
+void skb_defer_node_flush(struct skb_defer_node *sdn)
+{
+ __skb_defer_free_flush(sdn, 0);
+}
+
+static void skb_defer_free_flush(void)
+{
struct skb_defer_node *sdn;
int node;
for_each_online_node(node) {
sdn = this_cpu_ptr(net_hotdata.skb_defer_nodes) + node;
-
- if (llist_empty(&sdn->defer_list))
- continue;
- atomic_long_set(&sdn->defer_count, 0);
- free_list = llist_del_all(&sdn->defer_list);
-
- llist_for_each_entry_safe(skb, next, free_list, ll_node) {
- napi_consume_skb(skb, 1);
- }
+ __skb_defer_free_flush(sdn, 1);
}
}
@@ -12704,6 +12716,7 @@ static int dev_cpu_dead(unsigned int oldcpu)
struct sk_buff **list_skb;
struct sk_buff *skb;
unsigned int cpu;
+ int node;
struct softnet_data *sd, *oldsd, *remsd = NULL;
local_irq_disable();
@@ -12764,6 +12777,17 @@ static int dev_cpu_dead(unsigned int oldcpu)
rps_input_queue_head_incr(oldsd);
}
+ for_each_node(node)
+ skb_defer_node_flush(per_cpu_ptr(net_hotdata.skb_defer_nodes,
+ oldcpu) + node);
+ node = cpu_to_node(oldcpu);
+ if (node_possible(node) &&
+ !cpumask_intersects(cpumask_of_node(node), cpu_online_mask)) {
+ for_each_possible_cpu(cpu)
+ skb_defer_node_flush(per_cpu_ptr(net_hotdata.skb_defer_nodes,
+ cpu) + node);
+ }
+
return 0;
}
diff --git a/net/core/dev.h b/net/core/dev.h
index 6a84413e673ae..7e5bce3c78e3a 100644
--- a/net/core/dev.h
+++ b/net/core/dev.h
@@ -360,6 +360,8 @@ static inline void napi_assert_will_not_race(const struct napi_struct *napi)
WARN_ON(READ_ONCE(napi->list_owner) != -1);
}
+struct skb_defer_node;
+void skb_defer_node_flush(struct skb_defer_node *sdn);
void kick_defer_list_purge(unsigned int cpu);
int dev_set_hwtstamp_phylib(struct net_device *dev,
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 07df2030ccf2a..60eb8b4328f89 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -7324,10 +7324,12 @@ void skb_attempt_defer_free(struct sk_buff *skb)
struct skb_defer_node *sdn;
unsigned long defer_count;
int cpu = skb->alloc_cpu;
+ int my_cpu;
unsigned int defer_max;
bool kick;
- if (cpu == raw_smp_processor_id() ||
+ my_cpu = raw_smp_processor_id();
+ if (cpu == my_cpu ||
WARN_ON_ONCE(cpu >= nr_cpu_ids) ||
!cpu_online(cpu)) {
nodefer: kfree_skb_napi_cache(skb);
@@ -7338,7 +7340,7 @@ nodefer: kfree_skb_napi_cache(skb);
DEBUG_NET_WARN_ON_ONCE(skb->destructor);
DEBUG_NET_WARN_ON_ONCE(skb_nfct(skb));
- sdn = per_cpu_ptr(net_hotdata.skb_defer_nodes, cpu) + numa_node_id();
+ sdn = per_cpu_ptr(net_hotdata.skb_defer_nodes, cpu) + cpu_to_node(my_cpu);
defer_max = READ_ONCE(net_hotdata.sysctl_skb_defer_max);
defer_count = atomic_long_inc_return(&sdn->defer_count);
@@ -7348,6 +7350,11 @@ nodefer: kfree_skb_napi_cache(skb);
llist_add(&skb->ll_node, &sdn->defer_list);
+ if (unlikely(!cpu_online(cpu) || my_cpu != raw_smp_processor_id())) {
+ skb_defer_node_flush(sdn);
+ return;
+ }
+
/* Send an IPI every time queue reaches half capacity. */
kick = (defer_count - 1) == (defer_max >> 1);
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 012/703] ext4: teach ext4_meta_trans_blocks() about number of allocated extents
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (10 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 011/703] net: flush skb_defer_nodes in dev_cpu_dead() Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 013/703] ext4: fix transaction overflow during writeback Greg Kroah-Hartman
` (23 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jan Kara, Theodore Tso, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <jack@suse.cz>
[ Upstream commit 25b2a7e8d420c49fc46f25b6f953603e4dae1dbf ]
So far ext4_meta_trans_blocks() expects that each extent counted in
@pextents will be allocated in the transaction we estimate credits for.
This is correct for the use in ext4_chunk_trans_blocks() and
ext4_chunk_trans_extent() however the use in atomic write path
(ext4_convert_unwritten_extents_atomic() and ext4_iomap_alloc() for
IOMAP_ATOMIC) unnecessarily overestimates the number of necessary
credits as neither of them allocates any data. Add argument to
ext4_meta_trans_blocks() for number of extents that are going to be
allocated in the transaction.
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260805153605.166545-4-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
[ sashal: adjusted ext4.h prototype context for missing upstream declarations, and updated the move_extent.c caller to pass block_len_in_page as the new alloc_extents argument. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/ext4.h | 2 +-
fs/ext4/extents.c | 2 +-
fs/ext4/inode.c | 30 +++++++++++++++---------------
fs/ext4/move_extent.c | 1 +
4 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 9c67a2c28faf5..dc7232e8e8315 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -3123,7 +3123,7 @@ extern int ext4_normal_submit_inode_data_buffers(struct jbd2_inode *jinode);
extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks);
extern int ext4_chunk_trans_extent(struct inode *inode, int nrblocks);
extern int ext4_meta_trans_blocks(struct inode *inode, int lblocks,
- int pextents);
+ int pextents, int alloc_extents);
extern int ext4_zero_partial_blocks(handle_t *handle, struct inode *inode,
loff_t lstart, loff_t lend);
extern vm_fault_t ext4_page_mkwrite(struct vm_fault *vmf);
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 80d41be515644..d789c7c2b5357 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4946,7 +4946,7 @@ int ext4_convert_unwritten_extents_atomic(handle_t *handle, struct inode *inode,
* it can tell if the extent in the cache is a split extent.
* But for now let's assume pextents as 2 always.
*/
- credits = ext4_meta_trans_blocks(inode, max_blocks, 2);
+ credits = ext4_meta_trans_blocks(inode, max_blocks, 2, 0);
}
if (credits) {
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index d46d243d53c47..a8325b778355e 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3731,8 +3731,8 @@ static int ext4_iomap_alloc(struct inode *inode, struct ext4_map_blocks *map,
return ret;
if (map->m_len < orig_mlen) {
map->m_len = orig_mlen;
- dio_credits = ext4_meta_trans_blocks(inode, orig_mlen,
- map->m_len);
+ dio_credits = ext4_meta_trans_blocks(inode, map->m_len,
+ map->m_len, 0);
} else {
dio_credits = ext4_chunk_trans_blocks(inode,
map->m_len);
@@ -6271,17 +6271,17 @@ static int ext4_index_trans_blocks(struct inode *inode, int lblocks,
}
/*
- * Account for index blocks, block groups bitmaps and block group
- * descriptor blocks if modify datablocks and index blocks
- * worse case, the indexs blocks spread over different block groups
- *
- * If datablocks are discontiguous, they are possible to spread over
- * different block groups too. If they are contiguous, with flexbg,
- * they could still across block group boundary.
- *
- * Also account for superblock, inode, quota and xattr blocks
+ * Calculate number of credits needed in a transaction to:
+ * * Allocate data blocks from @alloc_extents different groups - note that
+ * with flexbg a single physical extent can span multiple groups but
+ * single mballoc request only returns extent within one group.
+ * * Allocate metatadata (extent tree blocks, indirect blocks) to store
+ * pointers to @pextents data extents having @lblocks in total.
+ * * Modify extent tree / indirect block tree, inode, superblock, quota
+ * tracking, xattr blocks
*/
-int ext4_meta_trans_blocks(struct inode *inode, int lblocks, int pextents)
+int ext4_meta_trans_blocks(struct inode *inode, int lblocks, int pextents,
+ int alloc_extents)
{
ext4_group_t groups, ngroups = ext4_get_groups_count(inode->i_sb);
int gdpblocks;
@@ -6298,7 +6298,7 @@ int ext4_meta_trans_blocks(struct inode *inode, int lblocks, int pextents)
* Now let's see how many group bitmaps and group descriptors need
* to account
*/
- groups = idxblocks + pextents;
+ groups = idxblocks + alloc_extents;
gdpblocks = groups;
if (groups > ngroups)
groups = ngroups;
@@ -6324,7 +6324,7 @@ int ext4_chunk_trans_extent(struct inode *inode, int nrblocks)
{
int ret;
- ret = ext4_meta_trans_blocks(inode, nrblocks, 1);
+ ret = ext4_meta_trans_blocks(inode, nrblocks, 1, 1);
/* Account for data blocks for journalled mode */
if (ext4_should_journal_data(inode))
ret += nrblocks;
@@ -6342,7 +6342,7 @@ int ext4_chunk_trans_extent(struct inode *inode, int nrblocks)
*/
int ext4_chunk_trans_blocks(struct inode *inode, int nrblocks)
{
- return ext4_meta_trans_blocks(inode, nrblocks, 1);
+ return ext4_meta_trans_blocks(inode, nrblocks, 1, 1);
}
/*
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index e2705ea5e5c63..6a60d29e433bc 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -281,6 +281,7 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode,
again:
*err = 0;
jblocks = ext4_meta_trans_blocks(orig_inode, block_len_in_page,
+ block_len_in_page,
block_len_in_page) * 2;
handle = ext4_journal_start(orig_inode, EXT4_HT_MOVE_EXTENTS, jblocks);
if (IS_ERR(handle)) {
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 013/703] ext4: fix transaction overflow during writeback
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (11 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 012/703] ext4: teach ext4_meta_trans_blocks() about number of allocated extents Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 014/703] bpf: Introduce jit_required flag and remove bpf_prog_has_kfunc_call() Greg Kroah-Hartman
` (22 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Jan Kara, Theodore Tso, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <jack@suse.cz>
[ Upstream commit 46e8e31771f4f1c5e1cdec37a889a6730e42e9f1 ]
Commit 95ad8ee45cdb ("ext4: correct the reserved credits for extent
conversion") was correct to note that we need to reserve enough credits
for all extents possibly underlying a large folio. However it was too
eager to reduce the number of reserved credits. Extent conversion may
not only need to touch several leaf extent blocks, it may also need to
split extents - for example a single large unwritten extent may need to
be split into many small written ones in case of sparse folio dirtying.
This can thus result not only in extent leaf modifications but also in a
need to allocate new extent tree nodes. As a result the reserved
transaction credits were not sufficient in some corner cases. Use
ext4_meta_trans_blocks() for correct upper bound credit estimate.
Fixes: 95ad8ee45cdb ("ext4: correct the reserved credits for extent conversion")
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260805153605.166545-5-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/inode.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index a8325b778355e..2a9167bff4c26 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2862,10 +2862,10 @@ static int ext4_do_writepages(struct mpage_da_data *mpd)
if (ext4_should_dioread_nolock(inode)) {
int bpf = ext4_journal_blocks_per_folio(inode);
/*
- * We may need to convert up to one extent per block in
- * the folio and we may dirty the inode.
+ * We may need to convert up to one extent per block in the
+ * folio.
*/
- rsv_blocks = 1 + ext4_ext_index_trans_blocks(inode, bpf);
+ rsv_blocks = ext4_meta_trans_blocks(inode, bpf, bpf, 0);
}
if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 014/703] bpf: Introduce jit_required flag and remove bpf_prog_has_kfunc_call()
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (12 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 013/703] ext4: fix transaction overflow during writeback Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 015/703] bpf: Reject programs with inlined helpers if JIT is not available Greg Kroah-Hartman
` (21 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexei Starovoitov, KaFai Wan,
Leon Hwang, Tiezhu Yang, Eduard Zingerman, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tiezhu Yang <yangtiezhu@loongson.cn>
[ Upstream commit 9a6df65d5c6a9947ddab4e563e329720f44b8747 ]
Introduce a 'jit_required' bitfield flag in struct bpf_prog to track
whether a BPF program strictly requires the JIT compiler to run. This
prevents a dangerous runtime fallback to the interpreter for features
that are only implemented in the JIT compiler.
Currently, bpf_prog_has_kfunc_call() is used only for kernel function
calls, replace the kfunc-specific helper with the new 'jit_required'
flag. This makes it easy to support other JIT-only BPF features, such
as inlined helpers.
Suggested-by: Alexei Starovoitov <ast@kernel.org>
Suggested-by: KaFai Wan <kafai.wan@linux.dev>
Suggested-by: Leon Hwang <leon.hwang@linux.dev>
Acked-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
[edit]
Adapt the bpf_fixup_call_args() change to fixup_call_args() in
kernel/bpf/verifier.c, and the __bpf_prog_select_runtime() change to
bpf_prog_select_runtime() in kernel/bpf/core.c.
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/bpf.h | 9 ++-------
kernel/bpf/core.c | 7 ++-----
kernel/bpf/verifier.c | 12 ++++--------
3 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 2d8cb15fb9ba7..cc9c58ea53b10 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -1706,8 +1706,9 @@ struct bpf_prog_aux {
struct bpf_prog {
u16 pages; /* Number of allocated pages */
- u16 jited:1, /* Is our filter JIT'ed? */
+ u32 jited:1, /* Is our filter JIT'ed? */
jit_requested:1,/* archs need to JIT the prog */
+ jit_required:1, /* program strictly requires JIT compiler */
gpl_compatible:1, /* Is filter GPL compatible? */
cb_access:1, /* Is control block accessed? */
dst_needed:1, /* Do we need dst entry? */
@@ -2868,7 +2869,6 @@ const struct bpf_func_proto *bpf_base_func_proto(enum bpf_func_id func_id,
const struct bpf_prog *prog);
void bpf_task_storage_free(struct task_struct *task);
void bpf_cgrp_storage_free(struct cgroup *cgroup);
-bool bpf_prog_has_kfunc_call(const struct bpf_prog *prog);
const struct btf_func_model *
bpf_jit_find_kfunc_model(const struct bpf_prog *prog,
const struct bpf_insn *insn);
@@ -3151,11 +3151,6 @@ static inline void bpf_task_storage_free(struct task_struct *task)
{
}
-static inline bool bpf_prog_has_kfunc_call(const struct bpf_prog *prog)
-{
- return false;
-}
-
static inline const struct btf_func_model *
bpf_jit_find_kfunc_model(const struct bpf_prog *prog,
const struct bpf_insn *insn)
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 59c87eeb07cdb..1d1d834482228 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -125,6 +125,7 @@ struct bpf_prog *bpf_prog_alloc_no_stats(unsigned int size, gfp_t gfp_extra_flag
fp->aux->main_prog_aux = aux;
fp->aux->prog = fp;
fp->jit_requested = ebpf_jit_enabled();
+ fp->jit_required = IS_ENABLED(CONFIG_BPF_JIT_ALWAYS_ON);
fp->blinding_requested = bpf_jit_blinding_enabled(fp);
#ifdef CONFIG_CGROUP_BPF
aux->cgroup_atype = CGROUP_BPF_ATTACH_TYPE_INVALID;
@@ -2566,15 +2567,11 @@ struct bpf_prog *bpf_prog_select_runtime(struct bpf_prog *fp, int *err)
/* In case of BPF to BPF calls, verifier did all the prep
* work with regards to JITing, etc.
*/
- bool jit_needed = false;
+ bool jit_needed = fp->jit_required;
if (fp->bpf_func)
goto finalize;
- if (IS_ENABLED(CONFIG_BPF_JIT_ALWAYS_ON) ||
- bpf_prog_has_kfunc_call(fp))
- jit_needed = true;
-
if (!bpf_prog_select_interpreter(fp))
jit_needed = true;
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index a004c95969636..32bb4c3f70fba 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -3383,6 +3383,8 @@ static int add_kfunc_call(struct bpf_verifier_env *env, u32 func_id, s16 offset)
prog_aux->kfunc_tab = tab;
}
+ env->prog->jit_required = 1;
+
/* func_id == 0 is always invalid, but instead of returning an error, be
* conservative and wait until the code elimination pass before returning
* error, so that invalid calls that get pruned out can be in BPF programs
@@ -3491,11 +3493,6 @@ static void sort_kfunc_descs_by_imm_off(struct bpf_prog *prog)
kfunc_desc_cmp_by_imm_off, NULL);
}
-bool bpf_prog_has_kfunc_call(const struct bpf_prog *prog)
-{
- return !!prog->aux->kfunc_tab;
-}
-
const struct btf_func_model *
bpf_jit_find_kfunc_model(const struct bpf_prog *prog,
const struct bpf_insn *insn)
@@ -22533,7 +22530,6 @@ static int fixup_call_args(struct bpf_verifier_env *env)
#ifndef CONFIG_BPF_JIT_ALWAYS_ON
struct bpf_prog *prog = env->prog;
struct bpf_insn *insn = prog->insnsi;
- bool has_kfunc_call = bpf_prog_has_kfunc_call(prog);
int i, depth;
#endif
int err = 0;
@@ -22547,8 +22543,8 @@ static int fixup_call_args(struct bpf_verifier_env *env)
return err;
}
#ifndef CONFIG_BPF_JIT_ALWAYS_ON
- if (has_kfunc_call) {
- verbose(env, "calling kernel functions are not allowed in non-JITed programs\n");
+ if (prog->jit_required) {
+ verbose(env, "program requires BPF JIT compiler but it is not available\n");
return -EINVAL;
}
if (env->subprog_cnt > 1 && env->prog->aux->tail_call_reachable) {
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 015/703] bpf: Reject programs with inlined helpers if JIT is not available
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (13 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 014/703] bpf: Introduce jit_required flag and remove bpf_prog_has_kfunc_call() Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 016/703] bpf: Disallow interpreter fallback for arena-related insns Greg Kroah-Hartman
` (20 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Alexei Starovoitov, KaFai Wan,
Leon Hwang, Tiezhu Yang, Eduard Zingerman, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tiezhu Yang <yangtiezhu@loongson.cn>
[ Upstream commit f1c27922576edccb99d0257827d09bd05c0304a6 ]
When an architecture (such as LoongArch, ARM64, and RISC-V) implements
bpf_jit_inlines_helper_call(), the verifier skips rewriting the helper
call offset (insn->imm) in bpf_do_misc_fixups(). This is because the
helper is expected to be inlined by the JIT compiler later. Therefore,
insn->imm remains as the raw helper enum ID.
However, if JIT is disabled at runtime (net.core.bpf_jit_enable=0) or
if JIT compilation fails dynamically (e.g., due to OOM), the program
falls back to the BPF interpreter.
When the interpreter executes (__bpf_call_base + insn->imm) with the
unpatched raw ID, it jumps into an invalid address space, triggering
an instruction alignment fault or a kernel panic.
Although these helpers have valid C implementations in the kernel, the
omission of offset rewriting makes runtime interpreter fallback fatal.
Fix this by setting 'prog->jit_required = 1' when helper call rewriting
is skipped for JIT inlining. This ensures that such programs are safely
rejected if JIT is not available, preventing the runtime kernel panic.
Fixes: 2ddec2c80b44 ("riscv, bpf: inline bpf_get_smp_processor_id()")
Suggested-by: Alexei Starovoitov <ast@kernel.org>
Suggested-by: KaFai Wan <kafai.wan@linux.dev>
Acked-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
[edit]
Apply the bpf_do_misc_fixups() change from kernel/bpf/fixups.c to
do_misc_fixups() in kernel/bpf/verifier.c.
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/verifier.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 32bb4c3f70fba..d62d844ae3f86 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -23155,8 +23155,10 @@ static int do_misc_fixups(struct bpf_verifier_env *env)
}
/* Skip inlining the helper call if the JIT does it. */
- if (bpf_jit_inlines_helper_call(insn->imm))
+ if (bpf_jit_inlines_helper_call(insn->imm)) {
+ prog->jit_required = 1;
goto next_insn;
+ }
if (insn->imm == BPF_FUNC_get_route_realm)
prog->dst_needed = 1;
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 016/703] bpf: Disallow interpreter fallback for arena-related insns
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (14 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 015/703] bpf: Reject programs with inlined helpers if JIT is not available Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 017/703] bpf: Disallow interpreter fallback for BPF_ADDR_PERCPU insn Greg Kroah-Hartman
` (19 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Leon Hwang, Kumar Kartikeya Dwivedi,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leon Hwang <leon.hwang@linux.dev>
[ Upstream commit 34746b5a84ec37c0ea2bf6808c65c5ed8790eb51 ]
Since the interpreter does not support the arena-related insns,
interpreter fallback should not be allowed for these insns in
core.c::__bpf_prog_select_runtime().
Currently, when the interpreter executes the arena ST/LDX/STX insns,
it would hit the BUG_ON() in ___bpf_prog_run() at run time.
[ 2.579196] BPF interpreter: unknown opcode a2 (imm: 0x0)
[ 2.579998] ------------[ cut here ]------------
[ 2.580652] kernel BUG at kernel/bpf/core.c:2349!
[ 2.581314] Oops: invalid opcode: 0000 [#1] SMP PTI
Set jit_required as true when arena map is used in the prog to disallow
interpreter fallback for arena-related insns.
Fixes: 6082b6c328b5 ("bpf: Recognize addr_space_cast instruction in the verifier.")
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/bpf/20260715141122.15783-2-leon.hwang@linux.dev
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/bpf/verifier.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index d62d844ae3f86..ec862cd11942b 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -21172,6 +21172,7 @@ static int check_map_prog_compatibility(struct bpf_verifier_env *env,
return -EOPNOTSUPP;
}
env->prog->aux->arena = (void *)map;
+ env->prog->jit_required = true;
if (!bpf_arena_get_user_vm_start(env->prog->aux->arena)) {
verbose(env, "arena's user address must be set via map_extra or mmap()\n");
return -EINVAL;
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 017/703] bpf: Disallow interpreter fallback for BPF_ADDR_PERCPU insn
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (15 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 016/703] bpf: Disallow interpreter fallback for arena-related insns Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 018/703] mm/mmzone: read each zoneref slot once when filtering by nodemask Greg Kroah-Hartman
` (18 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Leon Hwang, Kumar Kartikeya Dwivedi,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leon Hwang <leon.hwang@linux.dev>
[ Upstream commit 7a0855e73757ee9cf25ba635a1c735018ecba742 ]
The BPF_MOV64_PERCPU_REG insn requires JIT to emit native code to for
'dst_reg = src_reg + <percpu_base_off>'.
However, the interpreter ignores the 'off' at its ALU64_MOV_X label.
The 'off' indicates the insn is BPF_MOV64_PERCPU_REG insn. Then, when
the interpreter loads memory from the register, it will hit a page
fault.
[ 2.545572] BUG: unable to handle page fault for address: ffffffffacaaf034
[ 2.546485] #PF: supervisor read access in kernel mode
[ 2.547167] #PF: error_code(0x0000) - not-present page
[ 2.547850] PGD 134e63067 P4D 134e63067 PUD 134e64063 PMD 10021c063 PTE 800ffffeca550062
[ 2.548912] Oops: Oops: 0000 [#1] SMP PTI
Set jit_required as true in order to disallow interpreter fallback in
core.c::__bpf_prog_select_runtime(), if any BPF_ADDR_PERCPU insn is
patched to the prog.
BTW, rename the helper bpf_map_supports_cpu_flags() to
bpf_map_is_percpu_map().
Fixes: 7bdbf7446305 ("bpf: add special internal-only MOV instruction to resolve per-CPU addrs")
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/bpf/20260715141122.15783-4-leon.hwang@linux.dev
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
[edit]
Add bpf_map_is_percpu_map() directly because 6.18.y lacks
bpf_map_supports_cpu_flags().
Apply the map lookup and bpf_get_smp_processor_id() changes to
do_misc_fixups() in kernel/bpf/verifier.c.
Omit the current-task helper hunk because 6.18.y lacks the verifier
inlining introduced by commit
eaedea154eb9 ("bpf, x86: inline bpf_get_current_task() for x86_64").
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/bpf.h | 13 +++++++++++++
kernel/bpf/verifier.c | 4 ++++
2 files changed, 17 insertions(+)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index cc9c58ea53b10..74110a8c800d9 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -3784,4 +3784,17 @@ int bpf_prog_get_file_line(struct bpf_prog *prog, unsigned long ip, const char *
const char **linep, int *nump);
struct bpf_prog *bpf_prog_find_from_stack(void);
+static inline bool bpf_map_is_percpu_map(enum bpf_map_type map_type)
+{
+ switch (map_type) {
+ case BPF_MAP_TYPE_PERCPU_ARRAY:
+ case BPF_MAP_TYPE_PERCPU_HASH:
+ case BPF_MAP_TYPE_LRU_PERCPU_HASH:
+ case BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE:
+ return true;
+ default:
+ return false;
+ }
+}
+
#endif /* _LINUX_BPF_H */
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index ec862cd11942b..40265041cc056 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -23346,6 +23346,9 @@ static int do_misc_fixups(struct bpf_verifier_env *env)
return -EFAULT;
}
+ if (bpf_map_is_percpu_map(map_ptr->map_type))
+ prog->jit_required = true;
+
new_prog = bpf_patch_insn_data(env, i + delta,
insn_buf, cnt);
if (!new_prog)
@@ -23450,6 +23453,7 @@ static int do_misc_fixups(struct bpf_verifier_env *env)
* way, it's fine to back out this inlining logic
*/
#ifdef CONFIG_SMP
+ prog->jit_required = true;
insn_buf[0] = BPF_MOV64_IMM(BPF_REG_0, (u32)(unsigned long)&cpu_number);
insn_buf[1] = BPF_MOV64_PERCPU_REG(BPF_REG_0, BPF_REG_0);
insn_buf[2] = BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_0, 0);
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 018/703] mm/mmzone: read each zoneref slot once when filtering by nodemask
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (16 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 017/703] bpf: Disallow interpreter fallback for BPF_ADDR_PERCPU insn Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 019/703] mm/page_alloc: dont increase highatomic reserve after pcp alloc Greg Kroah-Hartman
` (17 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Gregory Price (Meta),
Vlastimil Babka (SUSE), Zi Yan, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gregory Price (Meta) <gourry@gourry.net>
[ Upstream commit e55119ab611a0e47595db7e1d2ac1e69f7a73ff0 ]
__next_zones_zonelist() tests a slot's zone for NULL, then reads the
slot again to look up the zone's node. Offlining a zone's last block
rebuilds the zonelists in place, so the second read can return the
terminator:
CPU 0 CPU 1
__next_zones_zonelist(nodemask)
zonelist_zone(slot 1) = NORMAL
offline_pages()
build_all_zonelists()
[MOVABLE, NORMAL, NULL]
-> [NORMAL, NULL]
zref_in_nodemask(slot 1)
zone_to_nid(NULL)
Current GCC and clang merge the two reads, but nothing requires it.
With mm/mmzone.o built with -fno-inline -fno-ipa-sra, holding a
nodemask allocation between the reads while the node's last movable
block goes offline oopses every time:
BUG: kernel NULL pointer dereference, address: 0000000000000060
RIP: 0010:zone_to_nid+0x0/0x10
Call Trace:
zref_in_nodemask+0x9/0x20
__next_zones_zonelist+0x23/0x70
prepare_alloc_pages.constprop.0+0x16c/0x190
__alloc_frozen_pages_noprof+0xaf/0x330
Read the slot once and test that zone. A NULL zone still ends the walk.
To achieve that, rename zref_in_nodemask() to zone_in_nodemask() and
pass a zone instead of zoneref pointer.
Fixes: 11cd8638c37f ("mm, page_alloc: remove stop_machine from build_all_zonelists")
Cc: stable@vger.kernel.org
Signed-off-by: Gregory Price (Meta) <gourry@gourry.net>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Link: https://patch.msgid.link/20261101021340.2251928-8-gourry@gourry.net
Reviewed-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
[ sashal: Adjusted the context line because the helper still has the old one-line signature, and took upstream's const nodemask_t * post-image unchanged. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/mmzone.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/mm/mmzone.c b/mm/mmzone.c
index 0c8f181d9d500..cabe38127f798 100644
--- a/mm/mmzone.c
+++ b/mm/mmzone.c
@@ -43,12 +43,14 @@ struct zone *next_zone(struct zone *zone)
return zone;
}
-static inline int zref_in_nodemask(struct zoneref *zref, nodemask_t *nodes)
+/* A NULL zone terminates the zonelist, so it ends the search. */
+static inline bool zone_in_nodemask(const struct zone *zone,
+ const nodemask_t *nodes)
{
#ifdef CONFIG_NUMA
- return node_isset(zonelist_node_idx(zref), *nodes);
+ return !zone || node_isset(zone_to_nid(zone), *nodes);
#else
- return 1;
+ return true;
#endif /* CONFIG_NUMA */
}
@@ -66,7 +68,7 @@ struct zoneref *__next_zones_zonelist(struct zoneref *z,
z++;
else
while (zonelist_zone_idx(z) > highest_zoneidx ||
- (zonelist_zone(z) && !zref_in_nodemask(z, nodes)))
+ !zone_in_nodemask(zonelist_zone(z), nodes))
z++;
return z;
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 019/703] mm/page_alloc: dont increase highatomic reserve after pcp alloc
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (17 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 018/703] mm/mmzone: read each zoneref slot once when filtering by nodemask Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 020/703] mm/page_alloc: use existing highatomic reserves on the buddy fastpath Greg Kroah-Hartman
` (16 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Zhiguo Jiang, Frank van der Linden,
Vlastimil Babka (SUSE), Brendan Jackman, Johannes Weiner,
Michal Hocko, Suren Baghdasaryan, Zi Yan, Andrew Morton,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frank van der Linden <fvdl@google.com>
[ Upstream commit b480cbb071020bd590a0dc0166635b448e9fc46b ]
Higher order GFP_ATOMIC allocations can be served through a PCP list with
ALLOC_HIGHATOMIC set. Such an allocation can e.g. happen if a zone is
between the low and min watermarks, and get_page_from_freelist is retried
after the alloc_flags are relaxed.
The call to reserve_highatomic_pageblock() after such a PCP allocation
will result in an increase every single time: the page from the
(unmovable) PCP list will never have migrate type MIGRATE_HIGHATOMIC,
since MIGRATE_HIGHATOMIC pages do not appear on the unmovable PCP list.
So a new pageblock is converted to MIGRATE_HIGHATOMIC.
Eventually that leads to the maximum of 1% of the zone being used up by
(often mostly free) MIGRATE_HIGHATOMIC pageblocks, for no good reason.
Since this space is not available for normal allocations, this wastes
memory and will push things in to reclaim too soon.
This was observed on a system that ran a test with bursts of memory
activity, paired with GFP_ATOMIC SLUB activity. These would lead to a new
slab being allocated with GFP_ATOMIC, sometimes hitting the
get_page_from_freelist retry path by being below the low watermark. While
the frequency of those allocations was low, it kept adding up over time,
and the number of MIGRATE_ATOMIC pageblocks kept increasing.
If a higher order atomic allocation can be served by the unmovable PCP
list, there is probably no need yet to extend the reserves. So, move the
check and possible extension of the highatomic reserves to the buddy case
only, and do not refill the PCP list for ALLOC_HIGHATOMIC if it's empty.
This way, the PCP list is tried for ALLOC_HIGHATOMIC for a fast atomic
allocation. But it will immediately fall back to rmqueue_buddy() if it's
empty. In rmqueue_buddy(), the MIGRATE_HIGHATOMIC buddy lists are tried
first (as before), and the reserves are extended only if that fails.
With this change, the test was stable. Highatomic reserves were built up,
but to a normal level. No highatomic failures were seen.
This is similar to the patch proposed in [1] by Zhiguo Jiang, but
re-arranged a bit.
Link: https://lkml.kernel.org/r/20260320173426.1831267-1-fvdl@google.com
Link: https://lore.kernel.org/all/20231122013925.1507-1-justinjiang@vivo.com/ [1]
Fixes: 44042b449872 ("mm/page_alloc: allow high-order pages to be stored on the per-cpu lists")
Signed-off-by: Zhiguo Jiang <justinjiang@vivo.com>
Signed-off-by: Frank van der Linden <fvdl@google.com>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Zhiguo Jiang <justinjiang@vivo.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/page_alloc.c | 30 +++++++++++++++++++++++-------
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 074178f4d7a07..6b4a1dd7253e8 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -244,6 +244,8 @@ unsigned int pageblock_order __read_mostly;
static void __free_pages_ok(struct page *page, unsigned int order,
fpi_t fpi_flags);
+static void reserve_highatomic_pageblock(struct page *page, int order,
+ struct zone *zone);
/*
* results with 256, 32 in the lowmem_reserve sysctl:
@@ -3256,6 +3258,13 @@ struct page *rmqueue_buddy(struct zone *preferred_zone, struct zone *zone,
spin_unlock_irqrestore(&zone->lock, flags);
} while (check_new_pages(page, order));
+ /*
+ * If this is a high-order atomic allocation then check
+ * if the pageblock should be reserved for the future
+ */
+ if (unlikely(alloc_flags & ALLOC_HIGHATOMIC))
+ reserve_highatomic_pageblock(page, order, zone);
+
__count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order);
zone_statistics(preferred_zone, zone, 1);
@@ -3327,6 +3336,20 @@ struct page *__rmqueue_pcplist(struct zone *zone, unsigned int order,
int batch = nr_pcp_alloc(pcp, zone, order);
int alloced;
+ /*
+ * Don't refill the list for a higher order atomic
+ * allocation under memory pressure, as this would
+ * not build up any HIGHATOMIC reserves, which
+ * might be needed soon.
+ *
+ * Instead, direct it towards the reserves by
+ * returning NULL, which will make the caller fall
+ * back to rmqueue_buddy. This will try to use the
+ * reserves first and grow them if needed.
+ */
+ if (alloc_flags & ALLOC_HIGHATOMIC)
+ return NULL;
+
alloced = rmqueue_bulk(zone, order,
batch, list,
migratetype, alloc_flags);
@@ -3955,13 +3978,6 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
if (page) {
prep_new_page(page, order, gfp_mask, alloc_flags);
- /*
- * If this is a high-order atomic allocation then check
- * if the pageblock should be reserved for the future
- */
- if (unlikely(alloc_flags & ALLOC_HIGHATOMIC))
- reserve_highatomic_pageblock(page, order, zone);
-
return page;
} else {
if (cond_accept_memory(zone, order, alloc_flags))
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 020/703] mm/page_alloc: use existing highatomic reserves on the buddy fastpath
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (18 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 019/703] mm/page_alloc: dont increase highatomic reserve after pcp alloc Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 021/703] xprtrdma: serialize unmap_sync with xprt_disconnect Greg Kroah-Hartman
` (15 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, JP Kobryn, Vlastimil Babka (SUSE),
Johannes Weiner, Shakeel Butt, Brendan Jackman, David Hildenbrand,
Frank van der Linden, Liam R. Howlett, Lorenzo Stoakes,
Michal Hocko, Mike Rapoport, Suren Baghdasaryan, Zi Yan,
Andrew Morton, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: JP Kobryn <jp.kobryn@linux.dev>
[ Upstream commit 9f2fd03c9bde366c928c9242fc9b2e2c5111a134 ]
ALLOC_HIGHATOMIC currently provides both access to MIGRATE_HIGHATOMIC free
pages and permission to create new highatomic pageblock reserves. This
makes it unsuitable for the fastpath.
However, the fastpath can reach rmqueue_buddy() while MIGRATE_HIGHATOMIC
reserves have free pages available. In this situation, the allocation can
fall back to other migratetypes without trying those reserves first.
Allow high-priority non-blocking allocations to use existing
MIGRATE_HIGHATOMIC reserves on the buddy fastpath without growing them.
First tighten the criteria for reserving pageblocks so that growth may
only occur in the slowpath. Then allow fastpath usage by enabling
ALLOC_HIGHATOMIC when the GFP mask describes a non-blocking high-priority
allocation. This logic has been factored out from gfp_to_alloc_flags() to
a new function gfp_to_alloc_flags_nonblocking().
A UDP receive workload was run with free MIGRATE_HIGHATOMIC pageblocks
available in the target zone. Before this patch, the workload did not
consume these blocks. With this patch, eligible order-1 allocations
reaching the buddy path consumed existing MIGRATE_HIGHATOMIC pageblocks,
with no highatomic misses observed. The workload did not grow highatomic
reserves and NAPI page-frag allocations remained healthy with no failures
or order-0 fallbacks.
Link: https://lore.kernel.org/20260623004600.113347-1-jp.kobryn@linux.dev
Signed-off-by: JP Kobryn <jp.kobryn@linux.dev>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Frank van der Linden <fvdl@google.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
mm/page_alloc.c | 44 ++++++++++++++++++++++++++++++--------------
1 file changed, 30 insertions(+), 14 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6b4a1dd7253e8..7c10d42e31d8f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3259,10 +3259,11 @@ struct page *rmqueue_buddy(struct zone *preferred_zone, struct zone *zone,
} while (check_new_pages(page, order));
/*
- * If this is a high-order atomic allocation then check
- * if the pageblock should be reserved for the future
+ * Slowpath (precarious) high-atomic allocations may reserve
+ * a pageblock for future use.
*/
- if (unlikely(alloc_flags & ALLOC_HIGHATOMIC))
+ if (unlikely((alloc_flags & ALLOC_HIGHATOMIC) &&
+ ((alloc_flags & ALLOC_WMARK_MASK) == ALLOC_WMARK_MIN)))
reserve_highatomic_pageblock(page, order, zone);
__count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order);
@@ -4544,6 +4545,29 @@ static void wake_all_kswapds(unsigned int order, gfp_t gfp_mask,
}
}
+static inline unsigned int
+gfp_to_alloc_flags_nonblocking(gfp_t gfp_mask, unsigned int order)
+{
+ unsigned int alloc_flags = 0;
+
+ if (gfp_mask & __GFP_DIRECT_RECLAIM)
+ return 0;
+
+ /*
+ * Not worth trying to allocate harder for __GFP_NOMEMALLOC even
+ * if it can't schedule.
+ */
+ if (gfp_mask & __GFP_NOMEMALLOC)
+ return 0;
+
+ alloc_flags |= ALLOC_NON_BLOCK;
+
+ if (order > 0 && (gfp_mask & __GFP_HIGH))
+ alloc_flags |= ALLOC_HIGHATOMIC;
+
+ return alloc_flags;
+}
+
static inline unsigned int
gfp_to_alloc_flags(gfp_t gfp_mask, unsigned int order)
{
@@ -4566,18 +4590,9 @@ gfp_to_alloc_flags(gfp_t gfp_mask, unsigned int order)
alloc_flags |= (__force int)
(gfp_mask & (__GFP_HIGH | __GFP_KSWAPD_RECLAIM));
- if (!(gfp_mask & __GFP_DIRECT_RECLAIM)) {
- /*
- * Not worth trying to allocate harder for __GFP_NOMEMALLOC even
- * if it can't schedule.
- */
- if (!(gfp_mask & __GFP_NOMEMALLOC)) {
- alloc_flags |= ALLOC_NON_BLOCK;
-
- if (order > 0 && (alloc_flags & ALLOC_MIN_RESERVE))
- alloc_flags |= ALLOC_HIGHATOMIC;
- }
+ alloc_flags |= gfp_to_alloc_flags_nonblocking(gfp_mask, order);
+ if (!(gfp_mask & __GFP_DIRECT_RECLAIM)) {
/*
* Ignore cpuset mems for non-blocking __GFP_HIGH (probably
* GFP_ATOMIC) rather than fail, see the comment for
@@ -5370,6 +5385,7 @@ struct page *__alloc_frozen_pages_noprof(gfp_t gfp, unsigned int order,
* memory until all local zones are considered.
*/
alloc_flags |= alloc_flags_nofragment(zonelist_zone(ac.preferred_zoneref), gfp);
+ alloc_flags |= gfp_to_alloc_flags_nonblocking(gfp, order) & ALLOC_HIGHATOMIC;
/* First allocation attempt */
page = get_page_from_freelist(alloc_gfp, order, alloc_flags, &ac);
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 021/703] xprtrdma: serialize unmap_sync with xprt_disconnect
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (19 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 020/703] mm/page_alloc: use existing highatomic reserves on the buddy fastpath Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 022/703] gve: Fix race between stats query and queue reconfig Greg Kroah-Hartman
` (14 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Chuck Lever, Tim Menninger,
Anna Schumaker, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Menninger <tmenninger@everpuredata.com>
[ Upstream commit 1fa415883c37b02ff17acdd7977ed591d3d389ee ]
frwr_unmap_sync() posts LOCAL_INV Work Requests to the QP and waits
for the matching CQE. This can race with rpcrdma_xprt_disconnect():
1. frwr_unmap_sync() samples r_xprt->rx_ep
2. rpcrdma_xprt_disconnect() drains the QP
3. frwr_unmap_sync() posts LOCAL_INV WRs after the drain
4. No CQE arrives, so wait_for_completion() blocks indefinitely
The hung task appears in the rpciod workqueue:
Workqueue: rpciod rpc_async_schedule [sunrpc]
wait_for_completion()
frwr_unmap_sync()
xprt_rdma_free()
xprt_release()
Serialize synchronous MR invalidation against QP teardown with
rx_unmap_rwsem. frwr_unmap_sync() holds the read side while it builds
and submits the LOCAL_INV chain. Disconnect holds the write side across
QP drain and resource teardown. Drop the read side before waiting so
disconnect can drain the submitted Work Requests and deliver their CQEs.
Disconnect can reset a request while frwr_unmap_sync() waits for the
read side. Recheck rl_registered after acquiring the rwsem and return
without posting if the request has already been reset.
Move the synchronous invalidation completion from the final MR to the
request, whose lifetime covers xprt_rdma_free(). This allows disconnect
to destroy MRs after draining the QP while frwr_unmap_sync() is still
waiting. On a post failure, call rpcrdma_force_disconnect() before
dropping the read side so the endpoint is not dereferenced after
disconnect can run.
frwr_unmap_async() runs inline from Receive completion processing.
rpcrdma_xprt_drain() drains the Receive Queue before the Send Queue, so
asynchronous LOCAL_INV Work Requests are submitted before Send Queue
drain. frwr_unmap_sync(), however, runs from xprt_rdma_free() after the
transport send lock has been released, so it is not ordered against
disconnect.
Tested on v7.4-rc1 under pNFS load with repeated data server restarts
to provoke rapid QP disconnect/reconnect cycling. Without the fix, a
hung task in frwr_unmap_sync() reproduced twice in six attempts. With
the fix, no hang occurred across 200 cycles.
Also observed on v6.8 and v6.18.34.
Fixes: e28ce90083f0 ("xprtrdma: kmalloc rpcrdma_ep separate from rpcrdma_xprt")
Cc: stable@vger.kernel.org
Assisted-by: Claude:opus-4-7
Reviewed-by: Chuck Lever <cel@kernel.org>
Signed-off-by: Tim Menninger <tmenninger@everpuredata.com>
Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/sunrpc/xprtrdma/frwr_ops.c | 89 ++++++++++++++++++++-------------
net/sunrpc/xprtrdma/transport.c | 2 +
net/sunrpc/xprtrdma/verbs.c | 16 ++++--
net/sunrpc/xprtrdma/xprt_rdma.h | 10 +++-
4 files changed, 78 insertions(+), 39 deletions(-)
diff --git a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c
index a82eefe5e6b58..90107c4e8317a 100644
--- a/net/sunrpc/xprtrdma/frwr_ops.c
+++ b/net/sunrpc/xprtrdma/frwr_ops.c
@@ -27,13 +27,17 @@
/* Transport recovery
*
- * frwr_map and frwr_unmap_* cannot run at the same time the transport
- * connect worker is running. The connect worker holds the transport
- * send lock, just as ->send_request does. This prevents frwr_map and
- * the connect worker from running concurrently. When a connection is
- * closed, the Receive completion queue is drained before the allowing
- * the connect worker to get control. This prevents frwr_unmap and the
- * connect worker from running concurrently.
+ * frwr_map() is serialized with the connect worker by the transport
+ * send lock.
+ *
+ * frwr_unmap_async() runs from Receive completion processing.
+ * rpcrdma_xprt_drain() drains the Receive Queue before the Send Queue,
+ * so asynchronous LOCAL_INV Work Requests are submitted before Send
+ * Queue drain.
+ *
+ * frwr_unmap_sync() runs after the transport send lock is released.
+ * rx_unmap_rwsem orders its LOCAL_INV submission before disconnect
+ * drains the QP.
*
* When the underlying transport disconnects, MRs that are in flight
* are flushed and are likely unusable. Thus all MRs are destroyed.
@@ -139,7 +143,6 @@ int frwr_mr_init(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr *mr)
mr->mr_ibmr = frmr;
mr->mr_device = NULL;
INIT_LIST_HEAD(&mr->mr_list);
- init_completion(&mr->mr_linv_done);
frwr_cid_init(ep, mr);
sg_init_table(sg, depth);
@@ -468,40 +471,60 @@ static void frwr_wc_localinv(struct ib_cq *cq, struct ib_wc *wc)
* @cq: completion queue
* @wc: WCE for a completed LocalInv WR
*
- * Awaken anyone waiting for an MR to finish being fenced.
+ * Wake frwr_unmap_sync() after the final LOCAL_INV completion.
*/
static void frwr_wc_localinv_wake(struct ib_cq *cq, struct ib_wc *wc)
{
struct ib_cqe *cqe = wc->wr_cqe;
struct rpcrdma_mr *mr = container_of(cqe, struct rpcrdma_mr, mr_cqe);
+ struct rpcrdma_req *req = mr->mr_req;
/* WARNING: Only wr_cqe and status are reliable at this point */
trace_xprtrdma_wc_li_wake(wc, &mr->mr_cid);
frwr_mr_done(wc, mr);
- complete(&mr->mr_linv_done);
+ complete(&req->rl_linv_done);
rpcrdma_flush_disconnect(cq->cq_context, wc);
}
/**
- * frwr_unmap_sync - invalidate memory regions that were registered for @req
+ * frwr_unmap_sync - synchronously invalidate MRs registered for @req
* @r_xprt: controlling transport instance
- * @req: rpcrdma_req with a non-empty list of MRs to process
+ * @req: request whose registered MRs are to be invalidated
*
- * Sleeps until it is safe for the host CPU to access the previously mapped
- * memory regions. This guarantees that registered MRs are properly fenced
- * from the server before the RPC consumer accesses the data in them. It
- * also ensures proper Send flow control: waking the next RPC waits until
- * this RPC has relinquished all its Send Queue entries.
+ * If @req still owns registered MRs after synchronizing with transport
+ * disconnect, post a chain of LOCAL_INV Work Requests and wait for the
+ * final completion. On successful completion, this fences the mapped
+ * regions from remote access and preserves Send Queue flow control.
+ *
+ * A concurrent disconnect can reset @req while this function waits for
+ * the read side. In that case the MRs have already been released and no
+ * LOCAL_INV Work Requests are posted.
+ *
+ * Context: Process context. Takes and releases
+ * @r_xprt->rx_unmap_rwsem for read. May sleep.
*/
void frwr_unmap_sync(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req)
{
struct ib_send_wr *first, **prev, *last;
- struct rpcrdma_ep *ep = r_xprt->rx_ep;
const struct ib_send_wr *bad_wr;
+ struct rpcrdma_ep *ep;
struct rpcrdma_mr *mr;
int rc;
+ /* serialize against rpcrdma_xprt_disconnect() */
+ down_read(&r_xprt->rx_unmap_rwsem);
+
+ /*
+ * Disconnect can reset this request while we wait for the read side.
+ * Recheck rl_registered in case rx_ep now refers to a new connection.
+ */
+ ep = r_xprt->rx_ep;
+ if (!ep || list_empty(&req->rl_registered)) {
+ up_read(&r_xprt->rx_unmap_rwsem);
+ return;
+ }
+
/* ORDER: Invalidate all of the MRs first
*
* Chain the LOCAL_INV Work Requests and post them with
@@ -528,37 +551,35 @@ void frwr_unmap_sync(struct rpcrdma_xprt *r_xprt, struct rpcrdma_req *req)
prev = &last->next;
} while ((mr = rpcrdma_mr_pop(&req->rl_registered)));
- mr = container_of(last, struct rpcrdma_mr, mr_invwr);
-
/* Strong send queue ordering guarantees that when the
* last WR in the chain completes, all WRs in the chain
* are complete.
*/
last->wr_cqe->done = frwr_wc_localinv_wake;
- reinit_completion(&mr->mr_linv_done);
+ reinit_completion(&req->rl_linv_done);
- /* Transport disconnect drains the receive CQ before it
- * replaces the QP. The RPC reply handler won't call us
- * unless re_id->qp is a valid pointer.
+ /*
+ * The read side prevents disconnect from draining this QP until the
+ * LOCAL_INV chain has been submitted.
*/
bad_wr = NULL;
rc = ib_post_send(ep->re_id->qp, first, &bad_wr);
+ if (rc) {
+ /* On error, the MRs get destroyed once the QP has drained. */
+ trace_xprtrdma_post_linv_err(req, rc);
+
+ /* Force a connection loss to ensure complete recovery.
+ */
+ rpcrdma_force_disconnect(ep);
+ }
+ up_read(&r_xprt->rx_unmap_rwsem);
/* The final LOCAL_INV WR in the chain is supposed to
* do the wake. If it was never posted, the wake will
* not happen, so don't wait in that case.
*/
if (bad_wr != first)
- wait_for_completion(&mr->mr_linv_done);
- if (!rc)
- return;
-
- /* On error, the MRs get destroyed once the QP has drained. */
- trace_xprtrdma_post_linv_err(req, rc);
-
- /* Force a connection loss to ensure complete recovery.
- */
- rpcrdma_force_disconnect(ep);
+ wait_for_completion(&req->rl_linv_done);
}
/**
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index 5ff8e5126a6c2..308fd79e09df3 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -364,6 +364,8 @@ xprt_setup_rdma(struct xprt_create *args)
INIT_DELAYED_WORK(&new_xprt->rx_connect_worker,
xprt_rdma_connect_worker);
+ init_rwsem(&new_xprt->rx_unmap_rwsem);
+
xprt->max_payload = RPCRDMA_MAX_DATA_SEGS << PAGE_SHIFT;
return xprt;
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 111c415f1aeda..3c44c2c28c4f3 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -572,20 +572,24 @@ int rpcrdma_xprt_connect(struct rpcrdma_xprt *r_xprt)
* rpcrdma_xprt_disconnect - Disconnect underlying transport
* @r_xprt: controlling transport instance
*
- * Caller serializes. Either the transport send lock is held,
- * or we're being called to destroy the transport.
+ * Context: Caller serializes. Either the transport send lock is held,
+ * or the transport is being destroyed. Takes and releases
+ * @r_xprt->rx_unmap_rwsem for write. May sleep.
*
* On return, @r_xprt is completely divested of all hardware
* resources and prepared for the next ->connect operation.
*/
void rpcrdma_xprt_disconnect(struct rpcrdma_xprt *r_xprt)
{
- struct rpcrdma_ep *ep = r_xprt->rx_ep;
+ struct rpcrdma_ep *ep;
struct rdma_cm_id *id;
int rc;
+ down_write(&r_xprt->rx_unmap_rwsem);
+
+ ep = r_xprt->rx_ep;
if (!ep)
- return;
+ goto out_unlock;
/* Prevent teardown-generated events from requesting another close. */
atomic_xchg(&ep->re_force_disconnect, 1);
@@ -604,6 +608,9 @@ void rpcrdma_xprt_disconnect(struct rpcrdma_xprt *r_xprt)
rdma_destroy_id(id);
r_xprt->rx_ep = NULL;
+
+out_unlock:
+ up_write(&r_xprt->rx_unmap_rwsem);
}
/* Fixed-size circular FIFO queue. This implementation is wait-free and
@@ -912,6 +919,7 @@ struct rpcrdma_req *rpcrdma_req_create(struct rpcrdma_xprt *r_xprt,
INIT_LIST_HEAD(&req->rl_free_mrs);
INIT_LIST_HEAD(&req->rl_registered);
+ init_completion(&req->rl_linv_done);
spin_lock(&buffer->rb_lock);
list_add(&req->rl_all, &buffer->rb_allreqs);
spin_unlock(&buffer->rb_lock);
diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
index ae14f6a526e6e..d8e02a06771f4 100644
--- a/net/sunrpc/xprtrdma/xprt_rdma.h
+++ b/net/sunrpc/xprtrdma/xprt_rdma.h
@@ -46,6 +46,7 @@
#include <linux/spinlock.h> /* spinlock_t, etc */
#include <linux/atomic.h> /* atomic_t, etc */
#include <linux/kref.h> /* struct kref */
+#include <linux/rwsem.h> /* struct rw_semaphore */
#include <linux/workqueue.h> /* struct work_struct */
#include <linux/llist.h>
@@ -248,7 +249,6 @@ struct rpcrdma_mr {
int mr_nents;
enum dma_data_direction mr_dir;
struct ib_cqe mr_cqe;
- struct completion mr_linv_done;
union {
struct ib_reg_wr mr_regwr;
struct ib_send_wr mr_invwr;
@@ -331,6 +331,7 @@ struct rpcrdma_req {
struct list_head rl_free_mrs;
struct list_head rl_registered;
struct rpcrdma_mr_seg rl_segments[RPCRDMA_MAX_SEGS];
+ struct completion rl_linv_done;
};
static inline struct rpcrdma_req *
@@ -432,6 +433,13 @@ struct rpcrdma_xprt {
struct delayed_work rx_connect_worker;
struct rpc_timeout rx_timeout;
struct rpcrdma_stats rx_stats;
+
+ /*
+ * Orders frwr_unmap_sync()'s LOCAL_INV submission ahead of the
+ * QP drain. Disconnect holds the write side across the drain
+ * and resource teardown.
+ */
+ struct rw_semaphore rx_unmap_rwsem;
};
#define rpcx_to_rdmax(x) container_of(x, struct rpcrdma_xprt, rx_xprt)
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 022/703] gve: Fix race between stats query and queue reconfig
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (20 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 021/703] xprtrdma: serialize unmap_sync with xprt_disconnect Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 023/703] gve: Block invalid ring sizes when device options are 0 Greg Kroah-Hartman
` (13 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Debarghya Kundu, Pin-yen Lin,
Harshitha Ramamurthy, Jakub Kicinski, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pin-yen Lin <treapking@google.com>
[ Upstream commit 7de69da15088ac2add08eb2b5f5c0a79fd461c1e ]
Fix a concurrency bug where network statistics queries race with queue
reconfiguration or interface teardown, causing a Use-After-Free (UAF) or
NULL pointer dereference.
Currently, statistics queries access priv->tx and priv->rx without
locking. When an interface is brought down or reconfigured,
gve_queues_mem_remove() frees these arrays. A concurrent stats query
can dereference freed queue structures and crash the kernel.
This issue was discovered and actually triggered by the
drivers/net/stats.py selftest. When an interface was brought down,
querying per-queue statistics via Netlink caused a kernel NULL pointer
dereference in gve_get_rx_queue_stats():
BUG: kernel NULL pointer dereference, address: 00000000000000a0
RIP: 0010:gve_get_rx_queue_stats+0x17/0x50 [gve]
Call Trace:
<TASK>
netdev_stat_queue_sum+0x11c/0x250
netdev_nl_stats_by_netdev+0x21b/0x2d0
netdev_nl_qstats_get_dumpit+0xd2/0x220
genl_dumpit+0x32/0x90
netlink_dump+0x1d2/0x450
__netlink_dump_start+0x1db/0x2a0
genl_family_rcv_msg_dumpit+0x9b/0x100
...
The per-queue stats callbacks run under the netdev instance lock, so
this NULL dereference is not a race; it happens on any query while the
interface is down.
Additionally, concurrent stats queries during queue reconfiguration can
race with gve_queues_mem_remove(), causing a Use-After-Free.
This affects gve_get_stats(), which does not hold the instance lock.
gve_handle_report_stats() also runs without it; it is stopped before
queue teardown, but can still read priv->rx[idx] while the single-queue
restart path rewrites it.
Fix this by introducing stats_lock to serialize stats queries against
queue teardown. In gve_queues_mem_remove(), queue pointers are set to
NULL under stats_lock before freeing. Stats readers acquire the lock
and verify pointers are non-NULL before reading counters.
The per-queue stats callbacks already run under the instance lock, but
take stats_lock as well for consistency.
The single-queue restart path also rewrites priv->rx[idx] in place, so
gve_rx_queue_stop() and gve_rx_queue_start() do those writes under
stats_lock as well.
This change was tested using the DQO RDA queue format.
Cc: stable@vger.kernel.org
Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
Fixes: 2e5e0932dff5 ("gve: add support for basic queue stats")
Co-developed-by: Debarghya Kundu <debarghyak@google.com>
Signed-off-by: Debarghya Kundu <debarghyak@google.com>
Signed-off-by: Pin-yen Lin <treapking@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20261109182036.2910559-2-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ sashal: Adjusted context in gve_queues_start() and gve_queues_mem_remove() because this tree lacks the qpl, header-split and packet-buffer-size lines, so the unlock follows rx_desc_cnt. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/google/gve/gve.h | 5 +++
drivers/net/ethernet/google/gve/gve_main.c | 43 ++++++++++++++++++++--
2 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/google/gve/gve.h b/drivers/net/ethernet/google/gve/gve.h
index f0bc910dd6d44..2aecaf892d659 100644
--- a/drivers/net/ethernet/google/gve/gve.h
+++ b/drivers/net/ethernet/google/gve/gve.h
@@ -877,6 +877,11 @@ struct gve_priv {
struct workqueue_struct *gve_wq;
struct work_struct service_task;
struct work_struct stats_report_task;
+ /* Protects the priv->tx/priv->rx arrays, the in-place rewrite of
+ * priv->rx[idx] and the queue counts against stats readers that do
+ * not hold the netdev instance lock.
+ */
+ spinlock_t stats_lock;
unsigned long service_task_flags;
unsigned long state_flags;
diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index 9b1f8933813cb..66a3b526b5a6f 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -113,6 +113,7 @@ static void gve_get_stats(struct net_device *dev, struct rtnl_link_stats64 *s)
int num_tx_queues;
int ring;
+ spin_lock_bh(&priv->stats_lock);
num_tx_queues = gve_num_tx_queues(priv);
if (priv->rx) {
for (ring = 0; ring < priv->rx_cfg.num_queues; ring++) {
@@ -140,6 +141,7 @@ static void gve_get_stats(struct net_device *dev, struct rtnl_link_stats64 *s)
s->tx_bytes += bytes;
}
}
+ spin_unlock_bh(&priv->stats_lock);
}
static int gve_alloc_flow_rule_caches(struct gve_priv *priv)
@@ -1343,9 +1345,13 @@ static void gve_queues_mem_remove(struct gve_priv *priv)
struct gve_rx_alloc_rings_cfg rx_alloc_cfg = {0};
gve_get_curr_alloc_cfgs(priv, &tx_alloc_cfg, &rx_alloc_cfg);
- gve_queues_mem_free(priv, &tx_alloc_cfg, &rx_alloc_cfg);
+
+ spin_lock_bh(&priv->stats_lock);
priv->tx = NULL;
priv->rx = NULL;
+ spin_unlock_bh(&priv->stats_lock);
+
+ gve_queues_mem_free(priv, &tx_alloc_cfg, &rx_alloc_cfg);
}
/* The passed-in queue memory is stored into priv and the queues are made live.
@@ -1359,6 +1365,7 @@ static int gve_queues_start(struct gve_priv *priv,
int err;
/* Record new resources into priv */
+ spin_lock_bh(&priv->stats_lock);
priv->tx = tx_alloc_cfg->tx;
priv->rx = rx_alloc_cfg->rx;
@@ -1368,10 +1375,11 @@ static int gve_queues_start(struct gve_priv *priv,
priv->rx_cfg = *rx_alloc_cfg->qcfg_rx;
priv->tx_desc_cnt = tx_alloc_cfg->ring_size;
priv->rx_desc_cnt = rx_alloc_cfg->ring_size;
+ gve_init_sync_stats(priv);
+ spin_unlock_bh(&priv->stats_lock);
gve_tx_start_rings(priv, gve_num_tx_queues(priv));
gve_rx_start_rings(priv, rx_alloc_cfg->qcfg_rx->num_queues);
- gve_init_sync_stats(priv);
err = netif_set_real_num_tx_queues(dev, priv->tx_cfg.num_queues);
if (err)
@@ -2265,6 +2273,7 @@ void gve_handle_report_stats(struct gve_priv *priv)
if (!gve_get_report_stats(priv))
return;
+ spin_lock_bh(&priv->stats_lock);
be64_add_cpu(&priv->stats_report->written_count, 1);
/* tx stats */
if (priv->tx) {
@@ -2329,6 +2338,7 @@ void gve_handle_report_stats(struct gve_priv *priv)
};
}
}
+ spin_unlock_bh(&priv->stats_lock);
}
/* Handle NIC status register changes, reset requests and report stats */
@@ -2601,8 +2611,10 @@ static int gve_rx_queue_stop(struct net_device *dev, void *per_q_mem, int idx)
gve_turnup_and_check_status(priv);
gve_per_q_mem = (struct gve_rx_ring *)per_q_mem;
+ spin_lock_bh(&priv->stats_lock);
*gve_per_q_mem = priv->rx[idx];
memset(&priv->rx[idx], 0, sizeof(priv->rx[idx]));
+ spin_unlock_bh(&priv->stats_lock);
return 0;
}
@@ -2656,7 +2668,9 @@ static int gve_rx_queue_start(struct net_device *dev,
return -EAGAIN;
gve_per_q_mem = (struct gve_rx_ring *)per_q_mem;
+ spin_lock_bh(&priv->stats_lock);
priv->rx[idx] = *gve_per_q_mem;
+ spin_unlock_bh(&priv->stats_lock);
/* Single-queue creation requires quiescence on all queues */
gve_turndown(priv);
@@ -2692,7 +2706,9 @@ static int gve_rx_queue_start(struct net_device *dev,
* which needs the rtnl lock, will not run till this func returns and
* its caller gives up the lock.
*/
+ spin_lock_bh(&priv->stats_lock);
memset(&priv->rx[idx], 0, sizeof(priv->rx[idx]));
+ spin_unlock_bh(&priv->stats_lock);
return err;
}
@@ -2708,9 +2724,15 @@ static void gve_get_rx_queue_stats(struct net_device *dev, int idx,
struct netdev_queue_stats_rx *rx_stats)
{
struct gve_priv *priv = netdev_priv(dev);
- struct gve_rx_ring *rx = &priv->rx[idx];
+ struct gve_rx_ring *rx;
unsigned int start;
+ spin_lock_bh(&priv->stats_lock);
+ if (!priv->rx)
+ goto unlock;
+
+ rx = &priv->rx[idx];
+
do {
start = u64_stats_fetch_begin(&rx->statss);
rx_stats->packets = rx->rpackets;
@@ -2718,20 +2740,32 @@ static void gve_get_rx_queue_stats(struct net_device *dev, int idx,
rx_stats->alloc_fail = rx->rx_skb_alloc_fail +
rx->rx_buf_alloc_fail;
} while (u64_stats_fetch_retry(&rx->statss, start));
+
+unlock:
+ spin_unlock_bh(&priv->stats_lock);
}
static void gve_get_tx_queue_stats(struct net_device *dev, int idx,
struct netdev_queue_stats_tx *tx_stats)
{
struct gve_priv *priv = netdev_priv(dev);
- struct gve_tx_ring *tx = &priv->tx[idx];
+ struct gve_tx_ring *tx;
unsigned int start;
+ spin_lock_bh(&priv->stats_lock);
+ if (!priv->tx)
+ goto unlock;
+
+ tx = &priv->tx[idx];
+
do {
start = u64_stats_fetch_begin(&tx->statss);
tx_stats->packets = tx->pkt_done;
tx_stats->bytes = tx->bytes_done;
} while (u64_stats_fetch_retry(&tx->statss, start));
+
+unlock:
+ spin_unlock_bh(&priv->stats_lock);
}
static void gve_get_base_stats(struct net_device *dev,
@@ -2848,6 +2882,7 @@ static int gve_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
INIT_WORK(&priv->service_task, gve_service_task);
INIT_WORK(&priv->stats_report_task, gve_stats_report_task);
+ spin_lock_init(&priv->stats_lock);
priv->tx_cfg.max_queues = max_tx_queues;
priv->rx_cfg.max_queues = max_rx_queues;
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 023/703] gve: Block invalid ring sizes when device options are 0
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (21 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 022/703] gve: Fix race between stats query and queue reconfig Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 024/703] net: wait for in-flight device unregistrations before netns dismantle Greg Kroah-Hartman
` (12 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Pin-yen Lin, Joshua Washington,
Jordan Rhee, Harshitha Ramamurthy, Jakub Kicinski, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pin-yen Lin <treapking@google.com>
[ Upstream commit edc9a730ad3c98662047a76db2d7f26ea4350b2e ]
On older device versions, minimum ring sizes in the device option are
reported as 0. The driver imports these 0 values, allowing userspace
(`ethtool -G`) to request invalidly small ring sizes.
This issue was discovered and actually triggered by the
drivers/net/ring_reconfig.py selftest (ringparam test case). Halving the
ring size down to 1 triggered a kernel NULL pointer dereference in
gve_tx_alloc_rings_dqo():
BUG: kernel NULL pointer dereference, address: 0000000000000002
RIP: 0010:gve_tx_alloc_rings_dqo+0x1c4/0x510 [gve]
Call Trace:
<TASK>
gve_queues_mem_alloc+0x29/0xa0 [gve]
gve_adjust_config+0x1b/0x140 [gve]
gve_set_ringparam+0x1f4/0x250 [gve]
ethnl_set_rings+0x260/0x440
...
Fix this by falling back to the driver's default minimum ring sizes
(GVE_DEFAULT_MIN_RX_RING_SIZE and GVE_DEFAULT_MIN_TX_RING_SIZE) whenever
the device option reports minimum ring sizes as 0.
The device reports either both minimum ring sizes or neither, so a
single fallback for both is sufficient.
This change was tested using the DQO RDA queue format.
Cc: stable@vger.kernel.org
Fixes: ed4fb326947d ("gve: add support to read ring size ranges from the device")
Signed-off-by: Pin-yen Lin <treapking@google.com>
Reviewed-by: Joshua Washington <joshwash@google.com>
Reviewed-by: Jordan Rhee <jordanrhee@google.com>
Signed-off-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20261109182036.2910559-4-hramamurthy@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/google/gve/gve_adminq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/google/gve/gve_adminq.c b/drivers/net/ethernet/google/gve/gve_adminq.c
index 367a9f0e89b5c..bcd9a340cefc2 100644
--- a/drivers/net/ethernet/google/gve/gve_adminq.c
+++ b/drivers/net/ethernet/google/gve/gve_adminq.c
@@ -189,7 +189,9 @@ void gve_parse_device_option(struct gve_priv *priv,
*dev_op_modify_ring = (void *)(option + 1);
/* device has not provided min ring size */
- if (option_length == GVE_DEVICE_OPTION_NO_MIN_RING_SIZE)
+ if (option_length == GVE_DEVICE_OPTION_NO_MIN_RING_SIZE ||
+ be16_to_cpu((*dev_op_modify_ring)->min_rx_ring_size) == 0 ||
+ be16_to_cpu((*dev_op_modify_ring)->min_tx_ring_size) == 0)
priv->default_min_ring_size = true;
break;
case GVE_DEV_OPT_ID_FLOW_STEERING:
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 024/703] net: wait for in-flight device unregistrations before netns dismantle
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (22 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 023/703] gve: Block invalid ring sizes when device options are 0 Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 025/703] ksmbd: pin parent dentries in SMB2 CREATE ACL path Greg Kroah-Hartman
` (11 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, syzbot+1269fe6cc2016008124e,
Henry Martin, Eric Dumazet, Naman Gulati, Jakub Kicinski,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@kernel.org>
[ Upstream commit c164a431a646983275d0076ff5b0e4c326fbc10b ]
A device can be unregistered by a context other than the cleanup_net()
of its own netns, for instance a veth whose peer in another netns is
deleted. If references on it are still held, it stays in
netdev_wait_allrefs_any(), which rebroadcasts NETDEV_UNREGISTER every
second.
Meanwhile its netns can be dismantled: default_device_exit_batch()
only takes care of devices still listed in the netns, then pernet exit
handlers free their state, and finally struct net is freed while the
device still points to it.
The rebroadcasts then run notifiers against torn down pernet state, or
freed memory. Three instances were reported so far:
- netdev_genl_netdevice_event(): net->genl_sock is NULL [1]
- nh_netdev_event(): net->nexthop.devhash is NULL [2]
- nf_tables netdevice notifiers: use-after-free of the nftables
pernet storage [3]
but any notifier using dev_net(dev) is affected, as is
netdev_wait_allrefs_any() itself (__rtnl_net_lock(dev_net(dev)) with
CONFIG_DEBUG_NET_SMALL_RTNL=y).
This was prevented by rtnl_lock_unregistering() until I removed it
in commit 8a4fc54b07d7 ("net: get rid of rtnl_lock_unregistering()"),
considering only the loopback dependency, and missing the notifiers one.
Restore a per-netns counter of devices sitting in netdev_run_todo(),
and make default_device_exit_batch() wait for it to reach zero, after
it has unregistered all devices of the dying netns(es). At this point
no new unregistration can be started for these netns.
Unlike the old barrier, this only waits for devices of the netns being
dismantled and runs after their own devices are gone.
Tested on a KASAN kernel with a debug-only hack holding a reference
on a veth device for 5 seconds after its unregistration: a nexthop
on the veth in netns X, delete its peer from init_net, then delete X.
Without this patch, the nexthop_flush_dev() null-ptr-deref from [2]
triggers. With it, no splat; netns churn and dismantle of a netns
whose own device is held still work.
[1] https://lore.kernel.org/netdev/6adf9f64.6200f071.51519.0ed1.GAE@google.com/
[2] https://lore.kernel.org/netdev/20261105114707.3030737-1-bsdhenrymartin@gmail.com/
[3] https://lore.kernel.org/netdev/20261105114817.3033625-1-bsdhenrymartin@gmail.com/
Fixes: 8a4fc54b07d7 ("net: get rid of rtnl_lock_unregistering()")
Cc: stable@vger.kernel.org
Reported-by: syzbot+1269fe6cc2016008124e@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/6adf9f64.6200f071.51519.0ed1.GAE@google.com/
Reported-by: Henry Martin <bsdhenrymartin@gmail.com>
Closes: https://lore.kernel.org/netdev/20261105114707.3030737-1-bsdhenrymartin@gmail.com/
Closes: https://lore.kernel.org/netdev/20261105114817.3033625-1-bsdhenrymartin@gmail.com/
Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Reviewed-by: Naman Gulati <namangulati@google.com>
Link: https://patch.msgid.link/20261105144543.1624238-1-edumazet@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ sashal: dropped the nonexistent dev_mc_genid and rtnl_net_flush_workqueue() context lines, keeping only the added dev_unreg_pending field and wait_event(), with fuzz in netdev_run_todo(). ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/net/net_namespace.h | 1 +
net/core/dev.c | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 9a1d7ef17c4e9..9f16cca93227b 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -68,6 +68,7 @@ struct net {
spinlock_t rules_mod_lock;
unsigned int dev_base_seq; /* protected by rtnl_mutex */
+ atomic_t dev_unreg_pending; /* devices in netdev_run_todo() */
u32 ifindex;
spinlock_t nsid_lock;
diff --git a/net/core/dev.c b/net/core/dev.c
index f7e672a4a39f7..7b88c6b8aa4f9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -10832,6 +10832,14 @@ atomic_t dev_unreg_count = ATOMIC_INIT(0);
static void net_set_todo(struct net_device *dev)
{
list_add_tail(&dev->todo_list, &net_todo_list);
+ atomic_inc(&dev_net(dev)->dev_unreg_pending);
+}
+
+/* Paired with net_set_todo(). @net must not be used after this call. */
+static void net_unreg_done(struct net *net)
+{
+ if (atomic_dec_and_test(&net->dev_unreg_pending))
+ wake_up(&netdev_unregistering_wq);
}
static netdev_features_t netdev_sync_upper_features(struct net_device *lower,
@@ -11721,6 +11729,7 @@ void netdev_run_todo(void)
if (unlikely(dev->reg_state != NETREG_UNREGISTERING)) {
netdev_WARN(dev, "run_todo but not unregistering\n");
list_del(&dev->todo_list);
+ net_unreg_done(dev_net(dev));
continue;
}
@@ -11732,8 +11741,11 @@ void netdev_run_todo(void)
cnt = 0;
while (!list_empty(&list)) {
+ struct net *net;
+
dev = netdev_wait_allrefs_any(&list);
list_del(&dev->todo_list);
+ net = dev_net(dev);
/* paranoia */
BUG_ON(netdev_refcnt_read(dev) != 1);
@@ -11752,6 +11764,8 @@ void netdev_run_todo(void)
/* Free network device */
kobject_put(&dev->dev.kobj);
+
+ net_unreg_done(net);
}
if (cnt && atomic_sub_and_test(cnt, &dev_unreg_count))
wake_up(&netdev_unregistering_wq);
@@ -13079,6 +13093,17 @@ static void __net_exit default_device_exit_net(struct net *net)
}
}
+static bool __net_exit netns_dev_unreg_pending(const struct list_head *net_list)
+{
+ struct net *net;
+
+ list_for_each_entry(net, net_list, exit_list) {
+ if (atomic_read(&net->dev_unreg_pending))
+ return true;
+ }
+ return false;
+}
+
static void __net_exit default_device_exit_batch(struct list_head *net_list)
{
/* At exit all network devices most be removed from a network
@@ -13106,6 +13131,16 @@ static void __net_exit default_device_exit_batch(struct list_head *net_list)
}
unregister_netdevice_many(&dev_kill_list);
rtnl_unlock();
+
+ /* Devices of these netns unregistered from another context
+ * (e.g. a veth whose peer was deleted) can still be waiting
+ * in netdev_run_todo() for their last references, while
+ * NETDEV_UNREGISTER is rebroadcast for them. Wait for them
+ * before pernet exit handlers tear down the state used by
+ * netdevice notifiers, and before the netns is freed.
+ * No new unregistration can start: all devices are unlisted.
+ */
+ wait_event(netdev_unregistering_wq, !netns_dev_unreg_pending(net_list));
}
static struct pernet_operations __net_initdata default_device_ops = {
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 025/703] ksmbd: pin parent dentries in SMB2 CREATE ACL path
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (23 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 024/703] net: wait for in-flight device unregistrations before netns dismantle Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 026/703] ksmbd: refuse to read a handle that is not open for reading Greg Kroah-Hartman
` (10 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, stable, Jiwoo Kim, Namjae Jeon,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiwoo Kim <arpe1618@gmail.com>
[ Upstream commit 0383a66dabd7aa06237b9b24713c03656abeffe4 ]
smb2_open() and smb_inherit_dacl() read a child's d_parent without a
dentry reference. A concurrent SMB request can move the child and
remove the parent while CREATE uses its inode for permission, status,
and ACL inheritance work. A remote SMB race with concurrent opener and
mover connections on a writable KSMBD acl_xattr share triggered an
8-byte slab-use-after-free read in get_cached_acl on tmpfs and ext4
KASAN guests. With oops=panic, it also caused an Oops and kernel panic
on an ext4 guest.
Take a parent dentry reference around each parent inode or ACL access
in these paths and release it when the operation completes. Treat a
negative parent dentry as -ENOENT for the affected operation.
On a tmpfs KASAN QEMU guest, two 3,000-round reproducer instances
completed without a KASAN report or Oops; SMB remained reachable. On
an ext4 non-KASAN QEMU guest with oops=panic, a 2,000-operation no-race
control and two 5,000-round reproducer instances completed without an
Oops or panic. An SMB health probe still succeeded.
OpenAI Codex assisted with finding the bug, generating the SMB race
reproducer, drafting this fix and changelog, and running the tests.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Cc: stable@kernel.org
Signed-off-by: Jiwoo Kim <arpe1618@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
[ sashal: Dropped the <kunit/visibility.h> context include and changed const struct mnt_idmap *idmap to non-const struct mnt_idmap *idmap to match the older tree's code. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/smb/server/smb2pdu.c | 39 +++++++++++++++++++++++++++++++--------
fs/smb/server/smbacl.c | 9 ++++++++-
2 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index aae6e9adf2e84..c46b537bdab8a 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -3438,16 +3438,32 @@ int smb2_open(struct ksmbd_work *work)
if ((daccess & FILE_DELETE_LE) ||
(req->CreateOptions & FILE_DELETE_ON_CLOSE_LE)) {
- rc = inode_permission(idmap,
- d_inode(path.dentry->d_parent),
- MAY_EXEC | MAY_WRITE);
+ struct dentry *parent = dget_parent(path.dentry);
+ struct inode *parent_inode = d_inode(parent);
+
+ if (parent_inode)
+ rc = inode_permission(idmap, parent_inode,
+ MAY_EXEC | MAY_WRITE);
+ else
+ rc = -ENOENT;
+ dput(parent);
if (rc)
goto err_out;
}
}
}
- rc = ksmbd_query_inode_status(path.dentry->d_parent);
+ {
+ struct dentry *parent = dget_parent(path.dentry);
+
+ if (!d_inode(parent)) {
+ dput(parent);
+ rc = -ENOENT;
+ goto err_out;
+ }
+ rc = ksmbd_query_inode_status(parent);
+ dput(parent);
+ }
if (rc == KSMBD_INODE_STATUS_PENDING_DELETE) {
rc = -EBUSY;
goto err_out;
@@ -3501,10 +3517,17 @@ int smb2_open(struct ksmbd_work *work)
if (created) {
int posix_acl_rc;
struct inode *inode = d_inode(path.dentry);
-
- posix_acl_rc = ksmbd_vfs_inherit_posix_acl(idmap,
- &path,
- d_inode(path.dentry->d_parent));
+ struct inode *parent_inode;
+ struct dentry *parent;
+
+ parent = dget_parent(path.dentry);
+ parent_inode = d_inode(parent);
+ if (parent_inode)
+ posix_acl_rc = ksmbd_vfs_inherit_posix_acl(idmap, &path,
+ parent_inode);
+ else
+ posix_acl_rc = -ENOENT;
+ dput(parent);
if (posix_acl_rc)
ksmbd_debug(SMB, "inherit posix acl failed : %d\n", posix_acl_rc);
diff --git a/fs/smb/server/smbacl.c b/fs/smb/server/smbacl.c
index 42a638d1d2b97..1bd816153e542 100644
--- a/fs/smb/server/smbacl.c
+++ b/fs/smb/server/smbacl.c
@@ -7,6 +7,7 @@
*/
#include <linux/fs.h>
+#include <linux/dcache.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/mnt_idmapping.h>
@@ -1200,7 +1201,7 @@ int smb_inherit_dacl(struct ksmbd_conn *conn,
struct smb_acl *parent_pdacl;
struct smb_ntsd *parent_pntsd = NULL;
struct smb_sid owner_sid, group_sid;
- struct dentry *parent = path->dentry->d_parent;
+ struct dentry *parent;
struct mnt_idmap *idmap = mnt_idmap(path->mnt);
int inherited_flags = 0, flags = 0, i, nt_size = 0, pdacl_size;
int rc = 0, pntsd_type, ppntsd_size, acl_len, aces_size;
@@ -1210,8 +1211,14 @@ int smb_inherit_dacl(struct ksmbd_conn *conn,
char *aces_base;
bool is_dir = S_ISDIR(d_inode(path->dentry)->i_mode);
+ parent = dget_parent(path->dentry);
+ if (!d_inode(parent)) {
+ dput(parent);
+ return -ENOENT;
+ }
ppntsd_size = ksmbd_vfs_get_sd_xattr(conn, idmap,
parent, &parent_pntsd);
+ dput(parent);
if (ppntsd_size <= 0)
return -ENOENT;
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 026/703] ksmbd: refuse to read a handle that is not open for reading
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (24 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 025/703] ksmbd: pin parent dentries in SMB2 CREATE ACL path Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 027/703] tracing/probes: Fix BTF bitfield parsing and out-of-bounds buffer write Greg Kroah-Hartman
` (9 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Wahid Khan, Ian Bridges, Namjae Jeon,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wahid Khan <wahidzk0091@gmail.com>
[ Upstream commit 2fd145f8865bb1a6c38a3dc68fa44290008789d8 ]
smb2_create_open_flags() picks the open mode from the read and write
bits of the desired access. FILE_EXECUTE and FILE_READ_ATTRIBUTES select
neither, so a request for FILE_WRITE_DATA | FILE_EXECUTE |
FILE_READ_ATTRIBUTES opens the file O_WRONLY.
smb2_read() accepts FILE_READ_ATTRIBUTES and ksmbd_vfs_read() accepts
FILE_EXECUTE, so a later READ on that handle passes both checks and
reaches __kernel_read() on a file that has no FMODE_READ:
WARNING: fs/read_write.c:518 at __kernel_read
__kernel_read
ksmbd_vfs_read
smb2_read
handle_ksmbd_work
Any client that can open a file with write access on a share, including
a guest session, can trigger it; with panic_on_warn it takes the machine
down.
Return STATUS_ACCESS_DENIED when the file is not readable.
Fixes: f44158485826 ("cifsd: add file operations")
Cc: stable@vger.kernel.org
Signed-off-by: Wahid Khan <wahidzk0091@gmail.com>
Reviewed-by: Ian Bridges <icb@fastmail.org>
Tested-by: Ian Bridges <icb@fastmail.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
[ sashal: adjusted context: the new FMODE_READ check is inserted before this tree's if (!work->tcon->posix_extensions) { line instead of upstream's if (!fp->is_posix_ctxt) {. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/smb/server/vfs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c
index 466a0853dc486..96ec655d61900 100644
--- a/fs/smb/server/vfs.c
+++ b/fs/smb/server/vfs.c
@@ -393,6 +393,10 @@ int ksmbd_vfs_read(struct ksmbd_work *work, struct ksmbd_file *fp, size_t count,
if (ksmbd_stream_fd(fp))
return ksmbd_vfs_stream_read(fp, rbuf, pos, count);
+ /* The access granted on open can include FILE_EXECUTE for a write-only file */
+ if (!(filp->f_mode & FMODE_READ))
+ return -EACCES;
+
if (!work->tcon->posix_extensions) {
int ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 027/703] tracing/probes: Fix BTF bitfield parsing and out-of-bounds buffer write
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (25 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 026/703] ksmbd: refuse to read a handle that is not open for reading Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 028/703] comedi: comedi_bond: Fix leak of opened device references Greg Kroah-Hartman
` (8 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Masami Hiramatsu (Google),
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
[ Upstream commit 9b6e9d6a11090ac34516c45f48663b37ac94a9b1 ]
BTF bitfield parsing in trace_probe.c assumes a 64-bit (8-byte) container
when computing FETCH_OP_MOD_BF shift amounts and basesize, whereas the
preceding store instruction only allocates and writes the field's fetch
type size (which may be 1, 2, or 4 bytes when kflag=1). At runtime,
fetch_apply_bitfield() performs an 8-byte read-modify-write on the
smaller ring buffer slot, corrupting adjacent ring buffer data or writing
past the end of the event record.
In addition, signed bitfields with bit widths other than 8/16/32/64 fail
to resolve a fetch type, bitfields whose width is a multiple of 8 inside
a larger integer or spanning a byte boundary fail to emit FETCH_OP_MOD_BF
or select a container wide enough for bitoffs + bitsize, kflag=0 bitfield
offsets >= 8 bits are not folded into the byte offset, and big-endian
architectures use the little-endian left-shift formula in
parse_btf_bitfield().
Compute the bitfield byte and bit offsets consistently during field
lookup, select the smallest unsigned fetch type that covers the bit
offset and bit width, and calculate the FETCH_OP_MOD_BF parameters from
the selected fetch type size for both big- and little-endian bitfields.
Link: https://lore.kernel.org/all/179455850711.403392.10512730891220678403.stgit@devnote2/
Fixes: c440adfbe302 ("tracing/probes: Support BTF based data structure field access")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
[ sashal: Re-indented the BTF field loop one level deeper, and used mtype in place of the upstream container_type helper variable, because this tree has the loop inline instead of a separate helper. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/trace/trace_probe.c | 61 ++++++++++++++++++++++++++++----------
1 file changed, 46 insertions(+), 15 deletions(-)
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
index ac31528b981b6..33fb1a42bbad3 100644
--- a/kernel/trace/trace_probe.c
+++ b/kernel/trace/trace_probe.c
@@ -439,6 +439,18 @@ static const char *fetch_type_from_btf_type(struct btf *btf,
{
u32 intdata;
+ if (ctx->last_bitsize) {
+ u32 bits = ctx->last_bitsize + ctx->last_bitoffs;
+
+ if (bits <= 8)
+ return "u8";
+ if (bits <= 16)
+ return "u16";
+ if (bits <= 32)
+ return "u32";
+ return "u64";
+ }
+
/* TODO: const char * could be converted as a string */
switch (BTF_INFO_KIND(type->info)) {
case BTF_KIND_ENUM:
@@ -476,10 +488,6 @@ static const char *fetch_type_from_btf_type(struct btf *btf,
case 64:
return "u64";
}
- /* bitfield, size is encoded in the type */
- ctx->last_bitsize = BTF_INT_BITS(intdata);
- ctx->last_bitoffs += BTF_INT_OFFSET(intdata);
- return "u64";
}
}
/* TODO: support other types */
@@ -632,6 +640,12 @@ static int parse_btf_field(char *fieldname, const struct btf_type *type,
/* Add anonymous structure/union offset */
bitoffs += anon_offs;
+ type = btf_type_skip_modifiers(btf, field->type, NULL);
+ if (!type) {
+ trace_probe_log_err(ctx->offset, BAD_BTF_TID);
+ return -EINVAL;
+ }
+
/* Accumulate the bit-offsets of the dot-connected fields */
if (btf_type_kflag(mtype)) {
bitoffs += BTF_MEMBER_BIT_OFFSET(field->offset);
@@ -639,12 +653,15 @@ static int parse_btf_field(char *fieldname, const struct btf_type *type,
} else {
bitoffs += field->offset;
ctx->last_bitsize = 0;
- }
-
- type = btf_type_skip_modifiers(btf, field->type, NULL);
- if (!type) {
- trace_probe_log_err(ctx->offset, BAD_BTF_TID);
- return -EINVAL;
+ if (BTF_INFO_KIND(type->info) == BTF_KIND_INT) {
+ u32 intdata = btf_type_int(type);
+
+ bitoffs += BTF_INT_OFFSET(intdata);
+ if ((bitoffs % 8) ||
+ BTF_INT_BITS(intdata) != BYTES_TO_BITS(type->size) ||
+ !is_power_of_2(type->size))
+ ctx->last_bitsize = BTF_INT_BITS(intdata);
+ }
}
ctx->offset += next - fieldname;
@@ -790,13 +807,22 @@ static const struct fetch_type *find_fetch_type_from_btf_type(
}
static int parse_btf_bitfield(struct fetch_insn **pcode,
+ const struct fetch_type *t,
struct traceprobe_parse_context *ctx)
{
struct fetch_insn *code = *pcode;
- if ((ctx->last_bitsize % 8 == 0) && ctx->last_bitoffs == 0)
+ if ((ctx->last_bitsize == 0 ||
+ ctx->last_bitsize == BYTES_TO_BITS(t->size)) &&
+ ctx->last_bitoffs == 0)
return 0;
+ if (ctx->last_bitsize == 0 ||
+ BYTES_TO_BITS(t->size) < (ctx->last_bitsize + ctx->last_bitoffs)) {
+ trace_probe_log_err(ctx->offset, BAD_BITFIELD);
+ return -EINVAL;
+ }
+
code++;
if (code->op != FETCH_OP_NOP) {
trace_probe_log_err(ctx->offset, TOO_MANY_OPS);
@@ -805,9 +831,13 @@ static int parse_btf_bitfield(struct fetch_insn **pcode,
*pcode = code;
code->op = FETCH_OP_MOD_BF;
- code->lshift = 64 - (ctx->last_bitsize + ctx->last_bitoffs);
- code->rshift = 64 - ctx->last_bitsize;
- code->basesize = 64 / 8;
+#ifdef __BIG_ENDIAN_BITFIELD
+ code->lshift = ctx->last_bitoffs;
+#else
+ code->lshift = BYTES_TO_BITS(t->size) - (ctx->last_bitsize + ctx->last_bitoffs);
+#endif
+ code->rshift = BYTES_TO_BITS(t->size) - ctx->last_bitsize;
+ code->basesize = t->size;
return 0;
}
@@ -891,6 +921,7 @@ static int parse_btf_arg(char *varname,
}
static int parse_btf_bitfield(struct fetch_insn **pcode,
+ const struct fetch_type *t,
struct traceprobe_parse_context *ctx)
{
trace_probe_log_err(ctx->offset, NOSUP_BTFARG);
@@ -1570,7 +1601,7 @@ static int finalize_fetch_insn(struct fetch_insn *code,
} else if (IS_ENABLED(CONFIG_PROBE_EVENTS_BTF_ARGS) &&
ctx->last_type) {
/* If user not specified the type, try parsing BTF bitfield. */
- ret = parse_btf_bitfield(&code, ctx);
+ ret = parse_btf_bitfield(&code, parg->type, ctx);
if (ret)
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 028/703] comedi: comedi_bond: Fix leak of opened device references
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (26 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 027/703] tracing/probes: Fix BTF bitfield parsing and out-of-bounds buffer write Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 029/703] rust_binder: push BR_TRANSACTION_COMPLETE before BR_FAILED_REPLY Greg Kroah-Hartman
` (7 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, stable, Wentao Liang, Ian Abbott,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Abbott <abbotti@mev.co.uk>
commit fa0858523f07f8dd71d89b221f4422c3b8096d90 upstream.
bonding_attach() calls do_dev_config() to open other comedi devices
specified by the user and tries to make use of them as part of the
'bonding' device. If it successfully opens the other device but cannot
use it (either because it does not any subdevices of a type the
'bonding' device can use, or because of some error that occurs while
dealing with its subdevices) then it is left in the open state and the
fact that it is open does not get recorded by the 'bonding' device, so
the reference to the opened device gets lost. Fix it by closing the
opened device if it could not be bound to the 'bonding' device.
To match previous behavior, if the opened device is unsuitable then
ignore it (after closing it). The opened devices recorded by the
'bonding' device will eventually get closed by bonding_detach() even if
bonding_attach() returns an error.
Fixes: 3cf840f65ad5 ("Staging: comedi: add comedi_bond driver")
Cc: stable <stable@kernel.org>
Reported-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/lkml/20261103063301.1025860-1-vulab@iscas.ac.cn
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://patch.msgid.link/20261103173610.89687-1-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit fa0858523f07f8dd71d89b221f4422c3b8096d90)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/comedi/drivers/comedi_bond.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/drivers/comedi/drivers/comedi_bond.c b/drivers/comedi/drivers/comedi_bond.c
index 78c39fa841776..076aecae2c776 100644
--- a/drivers/comedi/drivers/comedi_bond.c
+++ b/drivers/comedi/drivers/comedi_bond.c
@@ -182,7 +182,9 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it)
char file[sizeof("/dev/comediXXXXXX")];
int minor = it->options[i];
struct comedi_device *d;
- int sdev = -1, nchans;
+ int sdev = -1;
+ int nchans;
+ int nope = 1;
struct bonded_device *bdev;
struct bonded_device **devs;
@@ -221,11 +223,14 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it)
dev_err(dev->class_dev,
"comedi_get_n_channels() returned %d on minor %u subdev %d!\n",
nchans, minor, sdev);
- return -EINVAL;
+ nope = -EINVAL;
+ break;
}
bdev = kmalloc(sizeof(*bdev), GFP_KERNEL);
- if (!bdev)
- return -ENOMEM;
+ if (!bdev) {
+ nope = -ENOMEM;
+ break;
+ }
bdev->dev = d;
bdev->minor = minor;
@@ -246,10 +251,12 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it)
dev_err(dev->class_dev,
"Could not allocate memory. Out of memory?\n");
kfree(bdev);
- return -ENOMEM;
+ nope = -ENOMEM;
+ break;
}
devpriv->devs = devs;
devpriv->devs[devpriv->ndevs++] = bdev;
+ nope = 0; /* keeps the device open */
{
/* Append dev:subdev to devpriv->name */
char buf[20];
@@ -260,6 +267,13 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it)
sizeof(devpriv->name));
}
}
+
+ if (nope) {
+ /* Opened device cannot be used, so close it. */
+ comedi_close(d);
+ if (nope < 0)
+ return nope;
+ }
}
if (!devpriv->nchans) {
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 029/703] rust_binder: push BR_TRANSACTION_COMPLETE before BR_FAILED_REPLY
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (27 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 028/703] comedi: comedi_bond: Fix leak of opened device references Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 030/703] 8021q: use RCU for egress QoS mappings Greg Kroah-Hartman
` (6 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable; +Cc: Greg Kroah-Hartman, patches, Alice Ryhl, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alice Ryhl <aliceryhl@google.com>
commit ff9de8571f05e8f62f9cbe29f38e0aedda9389cf upstream.
When building a reply fails in Thread::reply_inner(), BR_FAILED_REPLY is
delivered to the caller before BR_TRANSACTION_COMPLETE is pushed to the
replying thread's work list.
In a nested transaction, the caller can wake up upon receiving
BR_FAILED_REPLY and send an outer reply to the replying thread before
BR_TRANSACTION_COMPLETE is queued. This causes the outer BR_REPLY to
arrive ahead of BR_TRANSACTION_COMPLETE, which is not legal. This leads
to userspace tripping on an assertion.
Thus, push BR_TRANSACTION_COMPLETE in Thread::reply_inner() before
delivering BR_FAILED_REPLY to the caller.
As a nice side effect, this lets us remove the now-unused
BR_TRANSACTION_COMPLETE error path in Thread::transaction().
Cc: stable@vger.kernel.org
Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver")
Link: https://patch.msgid.link/20261028-binder-reply-fail-v1-1-8b71d4daaf1d@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[aliceryhl: resolve conflicts in Thread::transaction() and reply_inner()]
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/android/binder/error.rs | 1 -
drivers/android/binder/thread.rs | 46 +++++++++++++++-----------------
2 files changed, 21 insertions(+), 26 deletions(-)
diff --git a/drivers/android/binder/error.rs b/drivers/android/binder/error.rs
index fd9e9d9e5658b..4b5689cdb2b8e 100644
--- a/drivers/android/binder/error.rs
+++ b/drivers/android/binder/error.rs
@@ -78,7 +78,6 @@ fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
BR_DEAD_REPLY => f.pad("BR_DEAD_REPLY"),
BR_FROZEN_REPLY => f.pad("BR_FROZEN_REPLY"),
BR_TRANSACTION_PENDING_FROZEN => f.pad("BR_TRANSACTION_PENDING_FROZEN"),
- BR_TRANSACTION_COMPLETE => f.pad("BR_TRANSACTION_COMPLETE"),
_ => match self.source.as_ref() {
Some(source) => source.fmt(f),
None => self.reply.fmt(f),
diff --git a/drivers/android/binder/thread.rs b/drivers/android/binder/thread.rs
index e2320704c722e..5ae26faaf13bc 100644
--- a/drivers/android/binder/thread.rs
+++ b/drivers/android/binder/thread.rs
@@ -1262,26 +1262,25 @@ fn transaction(self: &Arc<Self>, cmd: u32, reader: &mut UserSliceReader) -> Resu
self.transaction_inner(&mut info)
};
+ // This runs when a transaction fails with an error returned to the caller.
if let Err(err) = ret {
self.push_return_work(err.reply);
- if err.reply != BR_TRANSACTION_COMPLETE {
- info.reply = err.reply;
- if let Some(source) = &err.source {
- info.errno = source.to_errno();
-
- {
- let mut inner = self.inner.lock();
- inner.extended_error =
- ExtendedError::new(info.debug_id as u32, err.reply, source.to_errno());
- }
-
- pr_warn!(
- "{}:{} transaction to {} failed: {err:?}",
- info.from_pid,
- info.from_tid,
- info.to_pid
- );
+ info.reply = err.reply;
+ if let Some(source) = &err.source {
+ info.errno = source.to_errno();
+
+ {
+ let mut inner = self.inner.lock();
+ inner.extended_error =
+ ExtendedError::new(info.debug_id as u32, err.reply, source.to_errno());
}
+
+ pr_warn!(
+ "{}:{} transaction to {} failed: {err:?}",
+ info.from_pid,
+ info.from_tid,
+ info.to_pid
+ );
}
}
@@ -1336,7 +1335,7 @@ fn reply_inner(self: &Arc<Self>, info: &mut TransactionInfo) -> BinderResult {
info.to_pid = orig.from.process.task.pid();
// We need to complete the transaction even if we cannot complete building the reply.
- let out = (|| -> BinderResult<_> {
+ if let Err(err) = (|| -> BinderResult<_> {
let completion = DTRWrap::arc_try_new(DeliverCode::new(BR_TRANSACTION_COMPLETE))?;
let process = orig.from.process.clone();
let allow_fds = orig.flags & TF_ACCEPT_FDS != 0;
@@ -1344,11 +1343,10 @@ fn reply_inner(self: &Arc<Self>, info: &mut TransactionInfo) -> BinderResult {
self.inner.lock().push_work(completion);
orig.from.deliver_reply(Ok(reply), &orig, None);
Ok(())
- })()
- .map_err(|mut err| {
+ })() {
// At this point we only return `BR_TRANSACTION_COMPLETE` to the caller, and we must let
// the sender know that the transaction has completed (with an error in this case).
-
+ self.push_return_work(BR_TRANSACTION_COMPLETE);
pr_warn!(
"{}:{} reply to {} failed: {err:?}",
info.from_pid,
@@ -1360,11 +1358,9 @@ fn reply_inner(self: &Arc<Self>, info: &mut TransactionInfo) -> BinderResult {
let ee = ExtendedError::new(info.debug_id as u32, err.reply, param);
orig.from
.deliver_reply(Err(BR_FAILED_REPLY), &orig, Some(ee));
- err.reply = BR_TRANSACTION_COMPLETE;
- err
- });
+ }
- out
+ Ok(())
}
fn oneway_transaction_inner(self: &Arc<Self>, info: &mut TransactionInfo) -> BinderResult {
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 030/703] 8021q: use RCU for egress QoS mappings
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (28 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 029/703] rust_binder: push BR_TRANSACTION_COMPLETE before BR_FAILED_REPLY Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 031/703] 8021q: delete cleared " Greg Kroah-Hartman
` (5 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Yuan Tan, Longxuan Yu, Ren Wei,
Paolo Abeni, Artem Dinaburg, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Longxuan Yu <ylong030@ucr.edu>
[ Upstream commit fc69decc811b155a0ed8eef17ee940f28c4f6dbc ]
The TX fast path and reporting paths walk egress QoS mappings without
RTNL. Convert the mapping lists to RCU-protected pointers, use RCU
reader annotations in readers, and defer freeing mapping nodes with an
embedded rcu_head.
This prepares the egress QoS mapping code for safe removal of mapping
nodes in a follow-up change while preserving the current behavior.
Co-developed-by: Yuan Tan <yuantan098@gmail.com>
Signed-off-by: Yuan Tan <yuantan098@gmail.com>
Signed-off-by: Longxuan Yu <ylong030@ucr.edu>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Link: https://patch.msgid.link/9136768189f8c6d3f824f476c62d2fa1111688e8.1776647968.git.yuantan098@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ Backport to 6.18.y: context adjusted in vlan_dev_set_egress_priority();
6.18.y predates the kmalloc_obj() conversion. No functional change
from upstream. ]
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/if_vlan.h | 25 ++++++++++++++++---------
net/8021q/vlan_dev.c | 31 ++++++++++++++++---------------
net/8021q/vlan_netlink.c | 10 ++++++----
net/8021q/vlanproc.c | 12 ++++++++----
4 files changed, 46 insertions(+), 32 deletions(-)
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 89472ba4425f0..2c30c5b62fb59 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -147,11 +147,13 @@ extern __be16 vlan_dev_vlan_proto(const struct net_device *dev);
* @priority: skb priority
* @vlan_qos: vlan priority: (skb->priority << 13) & 0xE000
* @next: pointer to next struct
+ * @rcu: used for deferred freeing of mapping nodes
*/
struct vlan_priority_tci_mapping {
u32 priority;
u16 vlan_qos;
- struct vlan_priority_tci_mapping *next;
+ struct vlan_priority_tci_mapping __rcu *next;
+ struct rcu_head rcu;
};
struct proc_dir_entry;
@@ -177,7 +179,7 @@ struct vlan_dev_priv {
unsigned int nr_ingress_mappings;
u32 ingress_priority_map[8];
unsigned int nr_egress_mappings;
- struct vlan_priority_tci_mapping *egress_priority_map[16];
+ struct vlan_priority_tci_mapping __rcu *egress_priority_map[16];
__be16 vlan_proto;
u16 vlan_id;
@@ -209,19 +211,24 @@ static inline u16
vlan_dev_get_egress_qos_mask(struct net_device *dev, u32 skprio)
{
struct vlan_priority_tci_mapping *mp;
+ u16 vlan_qos = 0;
- smp_rmb(); /* coupled with smp_wmb() in vlan_dev_set_egress_priority() */
+ rcu_read_lock();
- mp = vlan_dev_priv(dev)->egress_priority_map[(skprio & 0xF)];
+ mp = rcu_dereference(vlan_dev_priv(dev)->egress_priority_map[skprio & 0xF]);
while (mp) {
if (mp->priority == skprio) {
- return mp->vlan_qos; /* This should already be shifted
- * to mask correctly with the
- * VLAN's TCI */
+ vlan_qos = READ_ONCE(mp->vlan_qos);
+ break;
}
- mp = mp->next;
+ mp = rcu_dereference(mp->next);
}
- return 0;
+ rcu_read_unlock();
+
+ /* This should already be shifted to mask correctly with
+ * the VLAN's TCI.
+ */
+ return vlan_qos;
}
extern bool vlan_do_receive(struct sk_buff **skb);
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 27b84c4120082..f86f6b7706099 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -208,39 +208,34 @@ int vlan_dev_set_egress_priority(const struct net_device *dev,
u32 skb_prio, u16 vlan_prio)
{
struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
- struct vlan_priority_tci_mapping *mp = NULL;
+ struct vlan_priority_tci_mapping *mp;
struct vlan_priority_tci_mapping *np;
+ u32 bucket = skb_prio & 0xF;
u32 vlan_qos = (vlan_prio << VLAN_PRIO_SHIFT) & VLAN_PRIO_MASK;
/* See if a priority mapping exists.. */
- mp = vlan->egress_priority_map[skb_prio & 0xF];
+ mp = rtnl_dereference(vlan->egress_priority_map[bucket]);
while (mp) {
if (mp->priority == skb_prio) {
if (mp->vlan_qos && !vlan_qos)
vlan->nr_egress_mappings--;
else if (!mp->vlan_qos && vlan_qos)
vlan->nr_egress_mappings++;
- mp->vlan_qos = vlan_qos;
+ WRITE_ONCE(mp->vlan_qos, vlan_qos);
return 0;
}
- mp = mp->next;
+ mp = rtnl_dereference(mp->next);
}
/* Create a new mapping then. */
- mp = vlan->egress_priority_map[skb_prio & 0xF];
np = kmalloc(sizeof(struct vlan_priority_tci_mapping), GFP_KERNEL);
if (!np)
return -ENOBUFS;
- np->next = mp;
np->priority = skb_prio;
np->vlan_qos = vlan_qos;
- /* Before inserting this element in hash table, make sure all its fields
- * are committed to memory.
- * coupled with smp_rmb() in vlan_dev_get_egress_qos_mask()
- */
- smp_wmb();
- vlan->egress_priority_map[skb_prio & 0xF] = np;
+ RCU_INIT_POINTER(np->next, rtnl_dereference(vlan->egress_priority_map[bucket]));
+ rcu_assign_pointer(vlan->egress_priority_map[bucket], np);
if (vlan_qos)
vlan->nr_egress_mappings++;
return 0;
@@ -616,11 +611,17 @@ void vlan_dev_free_egress_priority(const struct net_device *dev)
int i;
for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) {
- while ((pm = vlan->egress_priority_map[i]) != NULL) {
- vlan->egress_priority_map[i] = pm->next;
- kfree(pm);
+ pm = rtnl_dereference(vlan->egress_priority_map[i]);
+ RCU_INIT_POINTER(vlan->egress_priority_map[i], NULL);
+ while (pm) {
+ struct vlan_priority_tci_mapping *next;
+
+ next = rtnl_dereference(pm->next);
+ kfree_rcu(pm, rcu);
+ pm = next;
}
}
+ vlan->nr_egress_mappings = 0;
}
static void vlan_dev_uninit(struct net_device *dev)
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index a000b1ef05206..a5b16833e2cee 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -260,13 +260,15 @@ static int vlan_fill_info(struct sk_buff *skb, const struct net_device *dev)
goto nla_put_failure;
for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) {
- for (pm = vlan->egress_priority_map[i]; pm;
- pm = pm->next) {
- if (!pm->vlan_qos)
+ for (pm = rcu_dereference_rtnl(vlan->egress_priority_map[i]); pm;
+ pm = rcu_dereference_rtnl(pm->next)) {
+ u16 vlan_qos = READ_ONCE(pm->vlan_qos);
+
+ if (!vlan_qos)
continue;
m.from = pm->priority;
- m.to = (pm->vlan_qos >> 13) & 0x7;
+ m.to = (vlan_qos >> 13) & 0x7;
if (nla_put(skb, IFLA_VLAN_QOS_MAPPING,
sizeof(m), &m))
goto nla_put_failure;
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index fa67374bda494..0e424e0895b7e 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -262,15 +262,19 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
vlan->ingress_priority_map[7]);
seq_printf(seq, " EGRESS priority mappings: ");
+ rcu_read_lock();
for (i = 0; i < 16; i++) {
- const struct vlan_priority_tci_mapping *mp
- = vlan->egress_priority_map[i];
+ const struct vlan_priority_tci_mapping *mp =
+ rcu_dereference(vlan->egress_priority_map[i]);
while (mp) {
+ u16 vlan_qos = READ_ONCE(mp->vlan_qos);
+
seq_printf(seq, "%u:%d ",
- mp->priority, ((mp->vlan_qos >> 13) & 0x7));
- mp = mp->next;
+ mp->priority, ((vlan_qos >> 13) & 0x7));
+ mp = rcu_dereference(mp->next);
}
}
+ rcu_read_unlock();
seq_puts(seq, "\n");
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 031/703] 8021q: delete cleared egress QoS mappings
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (29 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 030/703] 8021q: use RCU for egress QoS mappings Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 032/703] Bluetooth: btusb: fix use-after-free in force_poll_sync Greg Kroah-Hartman
` (4 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, stable, Yifan Wu, Juefei Pu, Xin Liu,
Yuan Tan, Longxuan Yu, Ren Wei, Paolo Abeni, Artem Dinaburg,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Longxuan Yu <ylong030@ucr.edu>
[ Upstream commit 7dddc74af369478ba7f9bc136d0fc1dc4570cb66 ]
vlan_dev_set_egress_priority() currently keeps cleared egress
priority mappings in the hash as tombstones. Repeated set/clear cycles
with distinct skb priorities therefore accumulate mapping nodes until
device teardown and leak memory.
Delete mappings when vlan_prio is cleared instead of keeping tombstones.
Now that the egress mapping lists are RCU protected, the node can be
unlinked safely and freed after a grace period.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@kernel.org
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Co-developed-by: Yuan Tan <yuantan098@gmail.com>
Signed-off-by: Yuan Tan <yuantan098@gmail.com>
Signed-off-by: Longxuan Yu <ylong030@ucr.edu>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Link: https://patch.msgid.link/ecfa6f6ce2467a42647ff4c5221238ae85b79a59.1776647968.git.yuantan098@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
[ Backport to 6.18.y: context adjusted in vlan_dev_set_egress_priority();
6.18.y predates the kmalloc_obj() conversion. No functional change
from upstream. ]
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/8021q/vlan_dev.c | 20 ++++++++++++++------
net/8021q/vlan_netlink.c | 4 ----
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index f86f6b7706099..5b4ac6c127f08 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -208,26 +208,34 @@ int vlan_dev_set_egress_priority(const struct net_device *dev,
u32 skb_prio, u16 vlan_prio)
{
struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
+ struct vlan_priority_tci_mapping __rcu **mpp;
struct vlan_priority_tci_mapping *mp;
struct vlan_priority_tci_mapping *np;
u32 bucket = skb_prio & 0xF;
u32 vlan_qos = (vlan_prio << VLAN_PRIO_SHIFT) & VLAN_PRIO_MASK;
/* See if a priority mapping exists.. */
- mp = rtnl_dereference(vlan->egress_priority_map[bucket]);
+ mpp = &vlan->egress_priority_map[bucket];
+ mp = rtnl_dereference(*mpp);
while (mp) {
if (mp->priority == skb_prio) {
- if (mp->vlan_qos && !vlan_qos)
+ if (!vlan_qos) {
+ rcu_assign_pointer(*mpp, rtnl_dereference(mp->next));
vlan->nr_egress_mappings--;
- else if (!mp->vlan_qos && vlan_qos)
- vlan->nr_egress_mappings++;
- WRITE_ONCE(mp->vlan_qos, vlan_qos);
+ kfree_rcu(mp, rcu);
+ } else {
+ WRITE_ONCE(mp->vlan_qos, vlan_qos);
+ }
return 0;
}
- mp = rtnl_dereference(mp->next);
+ mpp = &mp->next;
+ mp = rtnl_dereference(*mpp);
}
/* Create a new mapping then. */
+ if (!vlan_qos)
+ return 0;
+
np = kmalloc(sizeof(struct vlan_priority_tci_mapping), GFP_KERNEL);
if (!np)
return -ENOBUFS;
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index a5b16833e2cee..368d53ca7d870 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -263,10 +263,6 @@ static int vlan_fill_info(struct sk_buff *skb, const struct net_device *dev)
for (pm = rcu_dereference_rtnl(vlan->egress_priority_map[i]); pm;
pm = rcu_dereference_rtnl(pm->next)) {
u16 vlan_qos = READ_ONCE(pm->vlan_qos);
-
- if (!vlan_qos)
- continue;
-
m.from = pm->priority;
m.to = (vlan_qos >> 13) & 0x7;
if (nla_put(skb, IFLA_VLAN_QOS_MAPPING,
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 032/703] Bluetooth: btusb: fix use-after-free in force_poll_sync
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (30 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 031/703] 8021q: delete cleared " Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 033/703] tools/bootconfig: Close only opened braces in compact output Greg Kroah-Hartman
` (3 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Bin Yu, Cheng Wen,
Luiz Augusto von Dentz, YuanZhe Liu, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: YuanZhe Liu <25031212351@stu.xidian.edu.cn>
[ Upstream commit 868c886f45f7c10dc888b94c6993352702a84d04 ]
The force_poll_sync debugfs file uses the driver's struct btusb_data as
its private data. The file is created under hdev->debugfs and is removed
only when the HCI device is released, while btusb_disconnect() frees
btusb_data unconditionally. The HCI device can outlive the driver data,
for example when an HCI socket still references it, so reading or
writing the already opened file then dereferences freed memory:
BUG: KASAN: slab-use-after-free in force_poll_sync_read+0x129/0x140
Read of size 1 at addr ffff88800cfb7038
...
Freed by task ...:
kfree
btusb_disconnect
Remove the debugfs file before the private data is freed.
debugfs_remove() waits for callers that are already inside the file
operations, and any later access fails with -EIO instead of reaching the
driver, so the force_poll_sync file can no longer dereference btusb_data
after it is gone.
Fixes: 800fe5ec302e ("Bluetooth: btusb: Add support for queuing during polling interval")
Cc: stable@vger.kernel.org
Co-developed-by: Bin Yu <byu@xidian.edu.cn>
Signed-off-by: Bin Yu <byu@xidian.edu.cn>
Co-developed-by: Cheng Wen <wencheng@xidian.edu.cn>
Signed-off-by: Cheng Wen <wencheng@xidian.edu.cn>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: YuanZhe Liu <25031212351@stu.xidian.edu.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/bluetooth/btusb.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 6143414711c5d..99bee6e6d286f 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1018,6 +1018,8 @@ struct btusb_data {
int oob_wake_irq; /* irq for out-of-band wake-on-bt */
+ struct dentry *force_poll_sync_dentry;
+
struct qca_dump_info qca_dump;
};
@@ -4418,8 +4420,9 @@ static int btusb_probe(struct usb_interface *intf,
usb_set_intfdata(intf, data);
- debugfs_create_file("force_poll_sync", 0644, hdev->debugfs, data,
- &force_poll_sync_fops);
+ data->force_poll_sync_dentry =
+ debugfs_create_file("force_poll_sync", 0644, hdev->debugfs,
+ data, &force_poll_sync_fops);
return 0;
@@ -4455,6 +4458,9 @@ static void btusb_disconnect(struct usb_interface *intf)
if (!data)
return;
+ debugfs_remove(data->force_poll_sync_dentry);
+ data->force_poll_sync_dentry = NULL;
+
hdev = data->hdev;
usb_set_intfdata(data->intf, NULL);
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 033/703] tools/bootconfig: Close only opened braces in compact output
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (31 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 032/703] Bluetooth: btusb: fix use-after-free in force_poll_sync Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 034/703] ipv6: Remove IPV6_ADDRFORM Greg Kroah-Hartman
` (2 subsequent siblings)
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Masami Hiramatsu (Google),
Eduardo Mucelli Rezende Oliveira, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
commit 26fa92f351d4993428268afebf6c60c987477af5 upstream.
A key may have both a value and subkeys. When it has only one subkey,
xbc_show_compact_tree() can print that subkey using dotted notation
without opening a brace. During backtracking, however, it treats the
value node followed by a subkey as evidence that a brace was opened.
For example, a.b=v, a.b.c=w and a.z=q are printed with the brace for a
closed before z. Reading that output back changes a.z into the root key
z, silently changing the configuration.
Check the key children when deciding whether to close a brace. Skip the
value child, and account for a sole subkey that itself has both a value
and subkeys, since that combination is not compacted. This follows the
conditions used to open braces without keeping a depth-indexed array.
Extend the mixed-value/subkey sample to cover the lost sibling.
The stable test script only checks whether the good samples can
be attached. Add the compact-output comparison for the extended
mixed-value/subkey sample and add its expected output file.
Link: https://lore.kernel.org/all/6ad67e4cda05238cd173c99e820a85de2c13f5fc.1794337724.git.edumucelli@gmail.com/
Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/bootconfig/main.c | 29 ++++++++++++++-----
.../samples/exp-good-mixed-kv1.bconf | 7 +++++
tools/bootconfig/samples/good-mixed-kv1.bconf | 5 ++++
tools/bootconfig/test-bootconfig.sh | 6 ++++
4 files changed, 40 insertions(+), 7 deletions(-)
create mode 100644 tools/bootconfig/samples/exp-good-mixed-kv1.bconf
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 6f5d60045f90b..43f0a7fa87c9b 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -39,6 +39,23 @@ static int xbc_show_value(struct xbc_node *node, bool semicolon)
return i;
}
+/* Match the conditions under which the compact formatter opens braces. */
+static bool xbc_node_needs_braces(struct xbc_node *node)
+{
+ struct xbc_node *child = xbc_node_get_child(node);
+
+ if (child && xbc_node_is_value(child))
+ child = xbc_node_get_next(child);
+ if (!child)
+ return false;
+ if (child->next)
+ return true;
+
+ /* A single subkey with both a value and subkeys is not compacted. */
+ child = xbc_node_get_child(child);
+ return child && xbc_node_is_value(child) && child->next;
+}
+
static void xbc_show_compact_tree(void)
{
struct xbc_node *node, *cnode = NULL, *vnode;
@@ -99,14 +116,12 @@ static void xbc_show_compact_tree(void)
node = xbc_node_get_parent(node);
if (!node)
return;
- if (!xbc_node_get_child(node)->next)
+ if (!depth || !xbc_node_needs_braces(node))
continue;
- if (depth) {
- depth--;
- for (i = 0; i < depth; i++)
- printf("\t");
- printf("}\n");
- }
+ depth--;
+ for (i = 0; i < depth; i++)
+ printf("\t");
+ printf("}\n");
}
node = xbc_node_get_next(node);
}
diff --git a/tools/bootconfig/samples/exp-good-mixed-kv1.bconf b/tools/bootconfig/samples/exp-good-mixed-kv1.bconf
new file mode 100644
index 0000000000000..0b8b2f59da31e
--- /dev/null
+++ b/tools/bootconfig/samples/exp-good-mixed-kv1.bconf
@@ -0,0 +1,7 @@
+key = "value";
+key.subkey = "another-value";
+a {
+ b = "v";
+ b.c = "w";
+ z = "q";
+}
diff --git a/tools/bootconfig/samples/good-mixed-kv1.bconf b/tools/bootconfig/samples/good-mixed-kv1.bconf
index 1761547dd05ca..35442ee62b751 100644
--- a/tools/bootconfig/samples/good-mixed-kv1.bconf
+++ b/tools/bootconfig/samples/good-mixed-kv1.bconf
@@ -1,3 +1,8 @@
# value -> subkey pattern
key = value
key.subkey = another-value
+
+# A valued parent with one subkey must not close its enclosing brace.
+a.b = v
+a.b.c = w
+a.z = q
diff --git a/tools/bootconfig/test-bootconfig.sh b/tools/bootconfig/test-bootconfig.sh
index d6211efe6dbee..615f5f72ff1a5 100755
--- a/tools/bootconfig/test-bootconfig.sh
+++ b/tools/bootconfig/test-bootconfig.sh
@@ -200,6 +200,12 @@ for i in samples/good-* ; do
done
+echo "Compact output keeps siblings under their parent"
+xpass $BOOTCONF -a samples/good-mixed-kv1.bconf $INITRD
+$BOOTCONF $INITRD > $OUTFILE
+xpass cmp samples/exp-good-mixed-kv1.bconf $OUTFILE
+
+
echo
echo "=== Summary ==="
echo "# of Passed: $(expr $NO - $NG - 1)"
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 034/703] ipv6: Remove IPV6_ADDRFORM.
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (32 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 033/703] tools/bootconfig: Close only opened braces in compact output Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 035/703] sched_ext: Read exit_kind before flushing in scx_flush_disable_work() Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 036/703] iio: proximity: sx9360: fix sampling frequency write and available range Greg Kroah-Hartman
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Daehyeon Ko, Hyunwoo Kim,
Kuniyuki Iwashima, Jakub Kicinski, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuniyuki Iwashima <kuniyu@google.com>
[ Upstream commit 31c5ea8a3296e1486ac34bccea452bfe8c0bb1f9 ]
Recently, IPV6_ADDRFORM has received many AI-driven bug reports.
Fixing them properly would needlessly churn the fast paths in TCP
and UDP.
IPV6_ADDRFORM was initially introduced in RFC 2133 in 1997,
but only two years later, it was removed from RFC 2553 in 1999.
In 2026, modern applications natively support dual-stack sockets;
notably, systemd's socket activation does not use IPV6_ADDRFORM.
Also, getsockopt(IPV6_ADDRFORM) can be replaced with SO_DOMAIN.
Let's remove IPV6_ADDRFORM.
Later, we can remove sk->sk_prot_creator and revert commit
c26c192c3d48 ("udp: properly deal with xfrm encap and ADDRFORM").
Reported-by: Daehyeon Ko <4ncienth@gmail.com>
Closes: https://lore.kernel.org/netdev/20260902010408.1057857-1-4ncienth@gmail.com/
Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
Closes: https://lore.kernel.org/netdev/20260824033331.1084971-1-imv4bel@gmail.com/
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260904033543.2635540-3-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ Hyunwoo Kim: Remove UDP-Lite handling from the IPV6_ADDRFORM
set/get branches on 6.18.y. ]
Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/net.h | 2 +-
net/core/sock.c | 4 +-
net/ipv4/af_inet.c | 3 --
net/ipv6/af_inet6.c | 4 --
net/ipv6/ipv6_sockglue.c | 95 ----------------------------------------
5 files changed, 2 insertions(+), 106 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index ec09620f40f70..e3b4c1af30917 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -122,7 +122,7 @@ struct socket {
struct file *file;
struct sock *sk;
- const struct proto_ops *ops; /* Might change with IPV6_ADDRFORM or MPTCP. */
+ const struct proto_ops *ops; /* Might change with MPTCP. */
struct socket_wq wq;
};
diff --git a/net/core/sock.c b/net/core/sock.c
index 857790b478e97..ed625b8ac32ab 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -771,7 +771,7 @@ bool sk_mc_loop(const struct sock *sk)
sk = sk_const_to_full_sk(sk);
if (!sk)
return true;
- /* IPV6_ADDRFORM can change sk->sk_family under us. */
+
switch (READ_ONCE(sk->sk_family)) {
case AF_INET:
return inet_test_bit(MC_LOOP, sk);
@@ -3901,7 +3901,6 @@ int sock_common_getsockopt(struct socket *sock, int level, int optname,
{
struct sock *sk = sock->sk;
- /* IPV6_ADDRFORM can change sk->sk_prot under us. */
return READ_ONCE(sk->sk_prot)->getsockopt(sk, level, optname, optval, optlen);
}
EXPORT_SYMBOL(sock_common_getsockopt);
@@ -3923,7 +3922,6 @@ int sock_common_setsockopt(struct socket *sock, int level, int optname,
{
struct sock *sk = sock->sk;
- /* IPV6_ADDRFORM can change sk->sk_prot under us. */
return READ_ONCE(sk->sk_prot)->setsockopt(sk, level, optname, optval, optlen);
}
EXPORT_SYMBOL(sock_common_setsockopt);
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 72cb7d9aee910..a581289384795 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -577,7 +577,6 @@ int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr,
if (addr_len < sizeof(uaddr->sa_family))
return -EINVAL;
- /* IPV6_ADDRFORM can change sk->sk_prot under us. */
prot = READ_ONCE(sk->sk_prot);
if (uaddr->sa_family == AF_UNSPEC)
@@ -778,7 +777,6 @@ int inet_accept(struct socket *sock, struct socket *newsock,
{
struct sock *sk1 = sock->sk, *sk2;
- /* IPV6_ADDRFORM can change sk->sk_prot under us. */
arg->err = -EINVAL;
sk2 = READ_ONCE(sk1->sk_prot)->accept(sk1, arg);
if (!sk2)
@@ -863,7 +861,6 @@ void inet_splice_eof(struct socket *sock)
if (unlikely(inet_send_prepare(sk)))
return;
- /* IPV6_ADDRFORM can change sk->sk_prot under us. */
prot = READ_ONCE(sk->sk_prot);
if (prot->splice_eof)
prot->splice_eof(sock);
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 1c45e1d15506c..6301428bb6c16 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -444,7 +444,6 @@ int inet6_bind_sk(struct sock *sk, struct sockaddr *uaddr, int addr_len)
const struct proto *prot;
int err = 0;
- /* IPV6_ADDRFORM can change sk->sk_prot under us. */
prot = READ_ONCE(sk->sk_prot);
/* If the socket has its own bind function then use it. */
if (prot->bind)
@@ -583,7 +582,6 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCSIFDSTADDR:
return addrconf_set_dstaddr(net, argp);
default:
- /* IPV6_ADDRFORM can change sk->sk_prot under us. */
prot = READ_ONCE(sk->sk_prot);
if (!prot->ioctl)
return -ENOIOCTLCMD;
@@ -654,7 +652,6 @@ int inet6_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
if (unlikely(inet_send_prepare(sk)))
return -EAGAIN;
- /* IPV6_ADDRFORM can change sk->sk_prot under us. */
prot = READ_ONCE(sk->sk_prot);
return INDIRECT_CALL_2(prot->sendmsg, tcp_sendmsg, udpv6_sendmsg,
sk, msg, size);
@@ -671,7 +668,6 @@ int inet6_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
if (likely(!(flags & MSG_ERRQUEUE)))
sock_rps_record_flow(sk);
- /* IPV6_ADDRFORM can change sk->sk_prot under us. */
prot = READ_ONCE(sk->sk_prot);
return INDIRECT_CALL_2(prot->recvmsg, tcp_recvmsg, udpv6_recvmsg,
sk, msg, size, flags);
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index d784a8644ff20..f4a84817579e6 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -548,93 +548,7 @@ int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
sockopt_lock_sock(sk);
- /* Another thread has converted the socket into IPv4 with
- * IPV6_ADDRFORM concurrently.
- */
- if (unlikely(sk->sk_family != AF_INET6))
- goto unlock;
-
switch (optname) {
-
- case IPV6_ADDRFORM:
- if (optlen < sizeof(int))
- goto e_inval;
- if (val == PF_INET) {
- if (sk->sk_type == SOCK_RAW)
- break;
-
- if (sk->sk_protocol == IPPROTO_UDP ||
- sk->sk_protocol == IPPROTO_UDPLITE) {
- struct udp_sock *up = udp_sk(sk);
- if (up->pending == AF_INET6) {
- retv = -EBUSY;
- break;
- }
- } else if (sk->sk_protocol == IPPROTO_TCP) {
- if (sk->sk_prot != &tcpv6_prot) {
- retv = -EBUSY;
- break;
- }
- } else {
- break;
- }
-
- if (sk->sk_state != TCP_ESTABLISHED) {
- retv = -ENOTCONN;
- break;
- }
-
- if (ipv6_only_sock(sk) ||
- !ipv6_addr_v4mapped(&sk->sk_v6_daddr)) {
- retv = -EADDRNOTAVAIL;
- break;
- }
-
- __ipv6_sock_mc_close(sk);
- __ipv6_sock_ac_close(sk);
-
- if (sk->sk_protocol == IPPROTO_TCP) {
- struct inet_connection_sock *icsk = inet_csk(sk);
-
- sock_prot_inuse_add(net, sk->sk_prot, -1);
- sock_prot_inuse_add(net, &tcp_prot, 1);
-
- /* Paired with READ_ONCE(sk->sk_prot) in inet6_stream_ops */
- WRITE_ONCE(sk->sk_prot, &tcp_prot);
- /* Paired with READ_ONCE() in tcp_(get|set)sockopt() */
- WRITE_ONCE(icsk->icsk_af_ops, &ipv4_specific);
- WRITE_ONCE(sk->sk_socket->ops, &inet_stream_ops);
- WRITE_ONCE(sk->sk_family, PF_INET);
- tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
- } else {
- struct proto *prot = &udp_prot;
-
- if (sk->sk_protocol == IPPROTO_UDPLITE)
- prot = &udplite_prot;
-
- sock_prot_inuse_add(net, sk->sk_prot, -1);
- sock_prot_inuse_add(net, prot, 1);
-
- /* Paired with READ_ONCE(sk->sk_prot) in inet6_dgram_ops */
- WRITE_ONCE(sk->sk_prot, prot);
- WRITE_ONCE(sk->sk_socket->ops, &inet_dgram_ops);
- WRITE_ONCE(sk->sk_family, PF_INET);
- }
-
- /* Disable all options not to allocate memory anymore,
- * but there is still a race. See the lockless path
- * in udpv6_sendmsg() and ipv6_local_rxpmtu().
- */
- np->rxopt.all = 0;
-
- inet6_cleanup_sock(sk);
-
- module_put(THIS_MODULE);
- retv = 0;
- break;
- }
- goto e_inval;
-
case IPV6_V6ONLY:
if (optlen < sizeof(int) ||
inet_sk(sk)->inet_num)
@@ -1096,15 +1010,6 @@ int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
if (copy_from_sockptr(&len, optlen, sizeof(int)))
return -EFAULT;
switch (optname) {
- case IPV6_ADDRFORM:
- if (sk->sk_protocol != IPPROTO_UDP &&
- sk->sk_protocol != IPPROTO_UDPLITE &&
- sk->sk_protocol != IPPROTO_TCP)
- return -ENOPROTOOPT;
- if (sk->sk_state != TCP_ESTABLISHED)
- return -ENOTCONN;
- val = sk->sk_family;
- break;
case MCAST_MSFILTER:
if (in_compat_syscall())
return compat_ipv6_get_msfilter(sk, optval, optlen, len);
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 035/703] sched_ext: Read exit_kind before flushing in scx_flush_disable_work()
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (33 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 034/703] ipv6: Remove IPV6_ADDRFORM Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 036/703] iio: proximity: sx9360: fix sampling frequency write and available range Greg Kroah-Hartman
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Sashiko, Kuba Piecuch, Andrea Righi,
Tejun Heo, Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kuba Piecuch <jpiecuch@google.com>
[ Upstream commit 3133107d98057595c0af39ff907c852134926912 ]
scx_disable_workfn() sets exit_kind to SCX_EXIT_DONE before it tears the
scheduler down. scx_flush_disable_work() reads exit_kind after syncing
disable_irq_work and flushing disable_work, so it can observe DONE from
a disable_work that was queued after its flush and return while the
teardown is still running:
CPU A CPU B
----- -----
scx_vexit()
scx_claim_exit() -> true
bpf_struct_ops_map_link_detach()
bpf_scx_unreg()
scx_disable()
scx_claim_exit() -> false
scx_flush_disable_work()
irq_work_sync() // not queued
kthread_flush_work() // not queued
irq_work_queue()
scx_disable_irq_workfn()
kthread_queue_work()
scx_disable_workfn()
exit_kind = SCX_EXIT_DONE
scx_root_disable()
atomic_read() -> SCX_EXIT_DONE
bpf_map_put()
Once bpf_scx_unreg() returns, its caller drops the struct_ops map
reference, and the struct_ops trampolines can be freed while
scx_root_disable() is still running and can still call into the BPF
scheduler, e.g. ops.exit().
Read exit_kind before syncing and flushing, with acquire ordering paired
with the atomic_try_cmpxchg() in scx_disable_workfn(). DONE is only set
from disable_work, so once it is observed, the following
kthread_flush_work() sees the queued work and waits for the teardown to
finish.
This patch was created with the help of an AI coding assistant.
Fixes: d99f7a32f09d ("sched_ext: Fix scx_flush_disable_work() UAF race")
Cc: stable@vger.kernel.org # v7.1+
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/all/sashiko-outbox-195908@kernel.org/
Signed-off-by: Kuba Piecuch <jpiecuch@google.com>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
[ jpiecuch: applied kernel/sched/ext/ext.c hunk to kernel/sched/ext.c;
kept error_irq_work instead of disable_irq_work. ]
Signed-off-by: Kuba Piecuch <jpiecuch@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/sched/ext.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index b3a6d60709403..64a68d698b823 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -4247,10 +4247,17 @@ static void scx_flush_disable_work(struct scx_sched *sch)
{
int kind;
+ /*
+ * scx_disable_workfn() sets SCX_EXIT_DONE before tearing down. Read
+ * exit_kind with acquire ordering (paired with atomic_try_cmpxchg() in
+ * scx_disable_workfn()) before syncing and flushing so that, once DONE
+ * is seen, the following flush observes the queued work and waits for
+ * the teardown to finish.
+ */
do {
+ kind = atomic_read_acquire(&sch->exit_kind);
irq_work_sync(&sch->error_irq_work);
kthread_flush_work(&sch->disable_work);
- kind = atomic_read(&sch->exit_kind);
} while (kind != SCX_EXIT_NONE && kind != SCX_EXIT_DONE);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 6.18 036/703] iio: proximity: sx9360: fix sampling frequency write and available range
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
` (34 preceding siblings ...)
2026-12-04 9:58 ` [PATCH 6.18 035/703] sched_ext: Read exit_kind before flushing in scx_flush_disable_work() Greg Kroah-Hartman
@ 2026-12-04 9:58 ` Greg Kroah-Hartman
35 siblings, 0 replies; 37+ messages in thread
From: Greg Kroah-Hartman @ 2026-12-04 9:58 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, patches, Arnav Kapoor, Jonathan Cameron,
Sasha Levin
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnav Kapoor <kapoorarnav43@gmail.com>
commit d252425c1533bfacd5940faa3371af82196bff5b upstream.
GNRL_CTRL1/2 hold the scan period in units of 8192 / FOSC, but
sx9360_set_samp_freq() computes freq * 8192 / FOSC and mis-scales val2,
which is in micro units. Any integer frequency then programs a period
of 0, and fractional parts above ~0.26 Hz overflow the int, writing
0x10 to GNRL_CTRL1 outside the SCANPERIOD field.
Compute FOSC / (freq * 8192), rounded to the closest value, and reject
frequencies outside the 1..2047 period range.
The available range doesn't match the limits in the comments next to it
either: 4 MHz / 8192 is 488.28125 Hz, not 448.28125 Hz,
4 MHz / (8192 * 2047) is 0.238535 Hz, and (max - min) / 2047 is
0.238419 Hz. Use those values.
Fixes: 1cdb4c47f7f5 ("iio:proximity:sx9360: Add sx9360 support")
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
[ Context: <linux/mod_devicetable.h> is still included here and the ID
tables carry driver data. ]
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/iio/proximity/sx9360.c | 29 +++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/drivers/iio/proximity/sx9360.c b/drivers/iio/proximity/sx9360.c
index 4448988d4e7eb..7bb54eb7b1c89 100644
--- a/drivers/iio/proximity/sx9360.c
+++ b/drivers/iio/proximity/sx9360.c
@@ -14,11 +14,13 @@
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/log2.h>
+#include <linux/math64.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/pm.h>
#include <linux/property.h>
#include <linux/regmap.h>
+#include <linux/units.h>
#include <linux/iio/iio.h>
@@ -44,6 +46,7 @@
#define SX9360_REG_GNRL_CTRL1_SCANPERIOD_MASK GENMASK(2, 0)
#define SX9360_REG_GNRL_CTRL2 0x12
#define SX9360_REG_GNRL_CTRL2_PERIOD_102MS 0x32
+#define SX9360_REG_GNRL_SCANPERIOD_MAX GENMASK(10, 0)
#define SX9360_REG_GNRL_REG_2_PERIOD_MS(_r) \
(((_r) * 8192) / (SX9360_FOSC_HZ / 1000))
#define SX9360_REG_GNRL_FREQ_2_REG(_f) (((_f) * 8192) / SX9360_FOSC_HZ)
@@ -183,9 +186,9 @@ static const struct {
int val;
int val2;
} sx9360_samp_freq_interval[] = {
- { 0, 281250 }, /* 4MHz / (8192 * 2047) */
- { 0, 281250 },
- { 448, 281250 }, /* 4MHz / 8192 */
+ { 0, 238535 }, /* 4MHz / (8192 * 2047) */
+ { 0, 238419 },
+ { 488, 281250 }, /* 4MHz / 8192 */
};
static const struct regmap_range sx9360_writable_reg_ranges[] = {
@@ -384,11 +387,25 @@ static int sx9360_read_avail(struct iio_dev *indio_dev,
static int sx9360_set_samp_freq(struct sx_common_data *data,
int val, int val2)
{
- int reg;
+ unsigned int period_ticks;
+ u64 freq_uHz;
__be16 buf;
- reg = val * 8192 / SX9360_FOSC_HZ + val2 * 8192 / (SX9360_FOSC_MHZ);
- buf = cpu_to_be16(reg);
+ if (val < 0 || val2 < 0)
+ return -EINVAL;
+
+ freq_uHz = (u64)val * MICROHZ_PER_HZ + val2;
+ if (!freq_uHz)
+ return -EINVAL;
+
+ /* The register holds the scan period in ticks of 8192 FOSC cycles. */
+ period_ticks = DIV64_U64_ROUND_CLOSEST((u64)SX9360_FOSC_HZ * MICROHZ_PER_HZ,
+ freq_uHz * 8192);
+ if (!period_ticks || period_ticks > SX9360_REG_GNRL_SCANPERIOD_MAX)
+ return -EINVAL;
+
+ buf = cpu_to_be16(period_ticks);
+
guard(mutex)(&data->mutex);
return regmap_bulk_write(data->regmap, SX9360_REG_GNRL_CTRL1, &buf,
--
2.53.0
^ permalink raw reply related [flat|nested] 37+ messages in thread
end of thread, other threads:[~2026-12-04 10:16 UTC | newest]
Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 9:58 [PATCH 6.18 000/703] 6.18.67-rc1 review Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 001/703] drm/gem-dma: Support dedicated DMA device for allocation and mapping Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 002/703] mpls: add seqcount to protect the platform_label{,s} pair Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 003/703] netlink: do not free nlk->groups while lockless readers can use it Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 004/703] net: init shinfo->gso_segs from qdisc_pkt_len_init() Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 005/703] net: pull headers in qdisc_pkt_len_segs_init() Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 006/703] xfrm: Dont clobber inner headers when already set Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 007/703] net: harden qdisc_pkt_len_segs_init() against malicious GSO packets Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 008/703] net: reject a negative TCP header offset in qdisc_pkt_len_segs_init() Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 009/703] sctp: validate cookie AUTH state before use Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 010/703] net/sched: codel: bound the dropping loop per dequeue call Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 011/703] net: flush skb_defer_nodes in dev_cpu_dead() Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 012/703] ext4: teach ext4_meta_trans_blocks() about number of allocated extents Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 013/703] ext4: fix transaction overflow during writeback Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 014/703] bpf: Introduce jit_required flag and remove bpf_prog_has_kfunc_call() Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 015/703] bpf: Reject programs with inlined helpers if JIT is not available Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 016/703] bpf: Disallow interpreter fallback for arena-related insns Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 017/703] bpf: Disallow interpreter fallback for BPF_ADDR_PERCPU insn Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 018/703] mm/mmzone: read each zoneref slot once when filtering by nodemask Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 019/703] mm/page_alloc: dont increase highatomic reserve after pcp alloc Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 020/703] mm/page_alloc: use existing highatomic reserves on the buddy fastpath Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 021/703] xprtrdma: serialize unmap_sync with xprt_disconnect Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 022/703] gve: Fix race between stats query and queue reconfig Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 023/703] gve: Block invalid ring sizes when device options are 0 Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 024/703] net: wait for in-flight device unregistrations before netns dismantle Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 025/703] ksmbd: pin parent dentries in SMB2 CREATE ACL path Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 026/703] ksmbd: refuse to read a handle that is not open for reading Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 027/703] tracing/probes: Fix BTF bitfield parsing and out-of-bounds buffer write Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 028/703] comedi: comedi_bond: Fix leak of opened device references Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 029/703] rust_binder: push BR_TRANSACTION_COMPLETE before BR_FAILED_REPLY Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 030/703] 8021q: use RCU for egress QoS mappings Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 031/703] 8021q: delete cleared " Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 032/703] Bluetooth: btusb: fix use-after-free in force_poll_sync Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 033/703] tools/bootconfig: Close only opened braces in compact output Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 034/703] ipv6: Remove IPV6_ADDRFORM Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 035/703] sched_ext: Read exit_kind before flushing in scx_flush_disable_work() Greg Kroah-Hartman
2026-12-04 9:58 ` [PATCH 6.18 036/703] iio: proximity: sx9360: fix sampling frequency write and available range Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox