Skip to contentSkip to conversation

7.3.4-rc1 review

PATCH Applied Greg Kroah-Hartman 22 participants 1,287 messages Nov 7 – Nov 10 Page 1 of 10

Subsystems (3)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

cover 7.3.4-rc1 review

This is the start of the stable review cycle for the 7.3.4 release. There are 1257 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 Mon, 09 Nov 2026 13:46:08 +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/v7.x/stable-review/patch-7.3.4-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-7.3.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>

    Linux 7.3.4-rc1

John Johansen <[email protected]>
apparmor: on failed load ensure profile files are removed before parent

John Johansen <[email protected]>
apparmor: fix uninitialized variable warning in aa_inherit_files

Joseph Qi <[email protected]>
ocfs2: read the xattr entry hash before defragmenting the bucket

Avi Weiss <[email protected]>
init/bootconfig: pass init arguments in documented order

Amir Goldstein <[email protected]>
fs: don't fail __d_obtain_alias() for unlinked inodes

Christian Brauner <[email protected]>
ns: don't add init_ipc_ns and init_net without namespace support

Hungyu Lin <[email protected]>
fs: skip copy_file_range write limits when there is no data

Edvard Conrad <[email protected]>
fs: let backing files inherit FMODE_NONOTIFY from the user file

Daehyeon Ko <[email protected]>
splice: avoid stale f_pos writeback on error

Chris Mason <[email protected]>
backing-file: always end a queued write

Chris Mason <[email protected]>
iov_iter: fix NULL deref in iov_iter_alignment()

Christian Brauner <[email protected]>
backing-file: enforce append-only and immutable backing inodes

Chris Mason <[email protected]>
aio: fix NULL deref when a fault races ring truncation

Iván Ezequiel Rodriguez <[email protected]>
arm64/gcs: release GCS on failed fork

Georgia Garcia <[email protected]>
apparmor: fix profile leak when a policy load fails

Georgia Garcia <[email protected]>
apparmor: remove fs entries created by a failed policy load

Cen Zhang (Microsoft) <[email protected]>
apparmor: fix query_data() output overlapping the lookup key

Kyle Zeng <[email protected]>
tcp: fix reordering addition overflow in MTU probing

Kyle Zeng <[email protected]>
net/packet: check TX_RING fragments before memory accounting

Guanglei Zhu <[email protected]>
apparmor: check accept index + 1 is in bounds

Li RongQing <[email protected]>
apparmor: avoid potential double free when remapping DFA tables

John Johansen <[email protected]>
apparmor: fix refcount leak in aa_get_newest_profile()

Josef Bacik <[email protected]>
pidfs: don't let PIDFD_GET_INFO miss a reaped task

Josef Bacik <[email protected]>
nstree: don't end listns() at an inactive namespace

Zhiling Zou <[email protected]>
tcp: check congestion control restriction first

Christian Brauner <[email protected]>
proc: don't let an entry below /proc/<pid>/net be a mountpoint

Kunhai Dai <[email protected]>
blk-iocost: abort weight transfer on invalid donation weights

Christian Brauner <[email protected]>
userns: don't drop the exec securebits

Josef Bacik <[email protected]>
mount: refuse setns() with a shared fs_struct again

Josef Bacik <[email protected]>
iomap: keep large chunks from defeating the bio cap

Christian Brauner <[email protected]>
iomap: don't mark unwritten parts of a folio uptodate

Noam D. Eliyahu <[email protected]>
tg3: Invert restart quirk logic to restrict SNP power-down bypass

Linmao Li <[email protected]>
r8152: Use BMSR to detect the link state

Georgia Garcia <[email protected]>

    apparmor: don't revalidate inherited files under files->file_lock

Maxime Bélair <[email protected]>

    apparmor: fix NULL ctx->peer derefs in unix socket ctx updates

Yongjian Wang <[email protected]>
Revert "net: advertise TCP MSS from the configured MTU, not the learned PMTU"

Avi Weiss <[email protected]>
irqchip/irq-msi-lib: Free wired MSI descriptors

Avi Weiss <[email protected]>
irqchip/riscv-imsic: Report successful hardware retrigger

Eric Biggers <[email protected]>
fsverity: Tell LSMs about signature only after verity is enabled

Eric Biggers <[email protected]>

    fsverity: Be more careful with return value of ->get_verity_descriptor()

Eric Biggers <[email protected]>
fsverity: Explicitly require FMODE_READ to retrieve hashes

Fang Xieyan <[email protected]>
kgdb: Fix buffer overflow in the qRcmd packet handler

Fang Xieyan <[email protected]>
kgdb: Fix buffer overflow in the 'M' and 'X' packet handlers

Fang Xieyan <[email protected]>
kgdb: Fix buffer overflow in the 'm' packet handler

Yingjie Wang <[email protected]>
nvme-tcp: validate the TLS handshake timeout

Yingjie Wang <[email protected]>
nvmet-tcp: validate the TLS handshake timeout

Guixin Liu <[email protected]>
nvmet: Free the old negotiation state when restarting authentication

Guixin Liu <[email protected]>
nvmet: Finish the blk plug when integrity allocation fails

Seiji Nishikawa <[email protected]>
nvme-tcp: fix io_work priority inversion when send_mutex is held

Martin Belanger <[email protected]>
nvme-tcp: start error recovery when read_sock fails

Guixin Liu <[email protected]>
nvmet-fc: Tear down the association when the admin queue allocation fails

Shao Mingyin <[email protected]>
nvmet-auth: fix error handling on CHALLENGE failure

Andrea Parri <[email protected]>
nvmet: pci-epf: require SGLs to match the command data length

Andrea Parri <[email protected]>
nvmet: pci-epf: report transport errors in command completions

Andrea Parri <[email protected]>
nvmet-fc: only send read data for successful commands

Andrew Stellman <[email protected]>
nvmet-rdma: fix out-of-bounds write in nvmet_rdma_map_sgl_inline()

Weiming Shi <[email protected]>
nvmet-rdma: reject short connection requests

Tristan Madani <[email protected]>
ppp: fix stale pointer access after pskb_may_pull in ppp_ccp_peek

Jérémy Jean <[email protected]>
inet: frags: prevent acceptance of partially authenticated reassembly

Peter Ujfalusi <[email protected]>
ASoC: hdac_hda: Keep runtime PM state in sync across codec remove/probe

Huacai Chen <[email protected]>
soc: loongson: loongson2_pm: Fix build warnings for 32BIT

Hongling Zeng <[email protected]>
ntfs3: fix mapping pairs bounds check for alignment

Hyeontae Lee <[email protected]>

    fs/ntfs3: bound DeleteAttribute asize against rec->used in do_action

Hyeontae Lee <[email protected]>
fs/ntfs3: bound CreateAttribute asize against record_size in do_action

David Yang <[email protected]>
net: hisilicon: hisi_femac: Stop the receiver before releasing the RX ring

Xia Yan <[email protected]>
macvlan: fix passthru promiscuity accounting while down

Kamil Sawicki <[email protected]>
net: limit priority VLAN untag depth

Fangzhi Zuo <[email protected]>
drm/amd/display: Poll passive DVI sinks for EDID readiness

Jesse Zhang <[email protected]>
drm/amdkfd: evict the queues only once for CRIU PROCESS_INFO

Jesse Zhang <[email protected]>
drm/amdgpu: drop the gang leader reference when freeing gang jobs

Jesse Zhang <[email protected]>
drm/amdkfd: send SMI process and VM fault events only to allowed clients

Jiale Yao <[email protected]>
drm/amdkfd: validate SRAT subtables before parsing

Kevin Wang <[email protected]>
drm/amd/pm: preserve committed OD features for SMU 14.0.2

Kevin Wang <[email protected]>
drm/amd/pm: preserve committed OD features for SMU 13.0.0/13.0.7

Avi Weiss <[email protected]>
drm/amd/display: Initialize missing TD-LUT programming inputs

Jesse Zhang <[email protected]>
drm/amdkfd: split vram_pages of SVM ranges prefetched without a GPU mapping

Jesse Zhang <[email protected]>
drm/amdgpu: reject CS chunks too large for kvmalloc()

Luigi Lauro <[email protected]>
drm/amd/display: take a runtime PM reference only when a CRTC turns on

Olivier Kaloudoff <[email protected]>
drm/amdgpu: guard VCE/UVD sched entity teardown on failed probe

Olivier Kaloudoff <[email protected]>
drm/amdkfd: stop restore retries on device unplug

Olivier Kaloudoff <[email protected]>
drm/amdkfd: tear down KFD processes before early fini_sw on disconnect

William Palacek <[email protected]>
drm/amdkfd: Validate the control stack of a restored queue

lvyating <[email protected]>
perf machine: Fix NULL deref in thread__resolve_callchain_sample()

Karl Mehltretter <[email protected]>
clocksource: Prevent immediate watchdog rerun after a delay

Zhao Gongyi <[email protected]>
arm64/mm: restrict transparent contpte mappings to valid PTEs

Zhongqiu Han <[email protected]>
cpufreq: stats: Fix potential out-of-bounds access in deferred reset

Tiezhu Yang <[email protected]>
LoongArch: Fix one-shot limitation for perf hardware breakpoints

Tiezhu Yang <[email protected]>
LoongArch: Fix perf hardware breakpoint failure via installation

Tiezhu Yang <[email protected]>
LoongArch: Only send SIGTRAP signal if necessary in do_watch()

Tiezhu Yang <[email protected]>
LoongArch: Fix architectural naming typo for CSR_FWPS_SKIP

Tiezhu Yang <[email protected]>
LoongArch: Fix bitmask corruption in update_bp_registers()

Tiezhu Yang <[email protected]>
LoongArch: Remove redundant call in update_bp_registers()

Tiezhu Yang <[email protected]>
LoongArch: Remove arch-specific __smp_mb__{before,after}_atomic()

Huacai Chen <[email protected]>
LoongArch: Use pa_to_nid()/nid_to_addrbase() rather than hard-code

Huacai Chen <[email protected]>
LoongArch: Don't init & online empty nodes

Huacai Chen <[email protected]>
LoongArch: Call cpu_final_simd() with pure_initcall()

Peter Ujfalusi <[email protected]>
ASoC: hdac_hda: Balance the runtime PM disable in codec remove

Eric Dumazet <[email protected]>
ixgbe: reserve TX timestamp after skb preparation

Peter Ujfalusi <[email protected]>
ALSA: hda: Reject codec reset on ASoC (ext_ops) buses

Tejun Heo <[email protected]>
sched_ext: Fix the stall watchdog testing and blaming the wrong sched under bypass

Sinan Turunc <[email protected]>
ALSA: ua101: Bound packet copies by the PCM buffer size

Sinan Turunc <[email protected]>
ALSA: usb-audio: Bound packet copies by the PCM buffer size

Dominik Maier <[email protected]>
loop: check for read-write open mode on LOOP_SET_STATUS in lo_compat_ioctl()

Paul Moses <[email protected]>
xsk: restore UMEM flags after failed pool assignment

Yingjie Wang <[email protected]>
tcp: limit tcp_tso_rtt_log to a valid shift count

Miquel Raynal <[email protected]>
dt-bindings: clock: ma35d1: Document the missing crystal inputs

Zhiling Zou <[email protected]>
ipmr: drop packets with unknown ingress VIF

Ido Schimmel <[email protected]>
ipmr, ip6mr: validate packets injected into the register vif on xmit

Ido Schimmel <[email protected]>
ipmr: fully initialize the synthetic IP header in ipmr_get_route()

Jiayuan Chen <[email protected]>
bonding: fix out-of-bounds read of arp_ip_target

Wei Jie Law <[email protected]>
net: usb: pegasus: check rx pkt_len against the received length

Srinivas Kandagatla <[email protected]>
ASoC: SDCA: drop pm_runtime reference on probe failure path

Srinivas Kandagatla <[email protected]>
ASoC: SDCA: propagate sdw_slave_read_prop() failure in class_read_prop

Srinivas Kandagatla <[email protected]>
ASoC: codecs: wsa883x: Accept temperatures across the full trim range

Srinivas Kandagatla <[email protected]>
ASoC: codecs: wsa884x: Accept temperatures across the full trim range

Ravi Hothi <[email protected]>
ASoC: qcom: audioreach: fix module cfg blob size handling

Shawn Guo <[email protected]>
ASoC: qcom: q6apm: Unmap DSP buffers before removing the topology

Shawn Guo <[email protected]>
ASoC: qcom: q6apm: Clear the right handle on pos buffer unmap

Shawn Guo <[email protected]>
ASoC: qcom: q6apm: Fix unmap regions response handling

Val Packett <[email protected]>
ASoC: qcom: qdsp6: q6afe: fix clk vote response type mismatch

Chao Yu <[email protected]>
f2fs: fix to update superblock crc in sanity_check_area_boundary()

Alex Markuze <[email protected]>
ceph: fix uninitialized err in ceph_netfs_issue_read()

sung byeongchan <[email protected]>
ceph: validate encoded xattr name lengths

sung byeongchan <[email protected]>
ceph: validate MDS reply fragtree split array length

sung byeongchan <[email protected]>
ceph: bound name skips in ceph_mdsmap_decode() by the message end

sung byeongchan <[email protected]>
ceph: validate fscrypt auth blob length

Venky Shankar <[email protected]>
ceph: don't fail write_begin with -EAGAIN after flushing old snapc

Yuanfu Xie <[email protected]>
ceph: clamp MDS reply result code to the errno range

Darong Lu <[email protected]>
libceph: initialize CRUSH choose argument weights

Jérémy Jean <[email protected]>
libceph: fix out-of-bounds reads from repeated CRUSH bucket entries

Jérémy Jean <[email protected]>
ceph: fix 32-bit overflow in readdir reply count check

Wentao Liang <[email protected]>
ceph: Fix mds session leak in __open_export_target_session()

Wentao Liang <[email protected]>
ceph: Fix xattr buffer leak in __send_cap()

Xiang Mei <[email protected]>
ceph: fix integer overflow in the snap trace bounds check

Yogesh Gaur <[email protected]>
libceph: reject an initial monmap with no monitors

Felix Hoffmann <[email protected]>
libceph: reject mismatched CRUSH weight-set sizes

Raphael Zimmer <[email protected]>
libceph: Fix multiple unsafe decodes in ceph_oloc_decode()

Raphael Zimmer <[email protected]>
libceph: Fix unsafe decode in ceph_redirect_decode()

Xiubo Li <[email protected]>
libceph: only set read_from_replica on read requests

Xiang Mei <[email protected]>
ceph: require the dentry lease record to cover struct ceph_mds_reply_lease

Xiang Mei <[email protected]>
ceph: reject mdsmaps that claim more than CEPH_MAX_MDS ranks

Guanglei Zhu <[email protected]>
ceph: fix out-of-bounds read in ceph_netfs_issue_op_inline()

Jiangshan Yi <[email protected]>
ceph: fix longname buffer overflow in ceph_fname_to_usr()

Max Kellermann <[email protected]>
ceph: avoid pending truncate during nonblocking cap acquire

Marc Zyngier <[email protected]>

    KVM: arm64: Sanitise ID_AA64MMFR3_EL1.S1P[IO]E

Vincent Donnefort <[email protected]>
tracing/remotes: Fix TRACE_REMOTE build when TRACING=n

Fuad Tabba <[email protected]>
KVM: arm64: Set HCR_EL2.BSU to Inner Shareable for guests

Peng Wang <[email protected]>
tick/nohz: Reevaluate the tick for kicks flushed outside hardirq

Hung-Jui Lin <[email protected]>
posix-timers: Report zero remaining time for disarmed SIGEV_NONE timers

Hungyu Lin <[email protected]>
time/namespace: Fix overflow when converting absolute deadlines

Hungyu Lin <[email protected]>
timers/itimer: Keep a nonzero value at CPU timer expiry

Hungyu Lin <[email protected]>
posix-timers: Accept NULL clock_getres() output in stubs

Gao Xiang <[email protected]>
erofs: hold real inodes for shared files

Wang Haoran <[email protected]>
fbdev: atmel_lcdfb: fix list_first_entry() on possibly empty modelist in probe

Alberto Garcia <[email protected]>
ext4: reject encrypted inodes when block size > page size

Alberto Garcia <[email protected]>
ext4: refuse encryption when block size > page size

Baokun Li <[email protected]>
fscrypt: Fix missing barrier in fscrypt_find_mode_key()

Siddharth Chintamaneni <[email protected]>

    mm: multi-gen LRU: fix NULL lruvec->pgdat deref with memcg disabled on cmdline

Lorenzo Stoakes (ARM) <[email protected]>
mm/vma: avoid broken uffd merge on mremap

Yunhui Cui <[email protected]>
riscv: mm: exclude invalid THP PMDs from page table check

SJ Park <[email protected]>
mm/damon/core: filter out damos address filter-split failed region

Gregory Price (Meta) <[email protected]>
mm/mempolicy: apply bind policies against the scoped allocation zone

Gregory Price (Meta) <[email protected]>
mm/vmscan: reclaim every zone in per-node proactive reclaim

Lorenzo Stoakes (ARM) <[email protected]>
mm/mremap: correctly uncharge accountable VMAs in error path

Lorenzo Stoakes (ARM) <[email protected]>
mm/mremap: populate calculated fields in vrm state correctly

Kyle Zeng <[email protected]>
mm/page_vma_mapped: continue past nonmatching huge PMDs

Nickolai Zeldovich <[email protected]>
mm/truncate: fix the zeroing end of pagecache_isize_extended()

Rik van Riel <[email protected]>
mm/page_alloc: count guard pages as free again when their buddy merges

Jiayuan Chen <[email protected]>
mm/swap: fix swap_cache_get_folio() returning a folio that left the swap cache

Vernon Yang <[email protected]>
mm: vmscan: don't count per-node proactive reclaim as memory pressure

Weilin Tong <[email protected]>
ipc/shm: fix RSS accounting for hugetlb shared memory

Pedro Falcato <[email protected]>
mm/madvise: atomically clear the young bit on THP MADV_COLD

Harry Yoo (Meta) <[email protected]>
mm/percpu: account full object size for percpu memory allocations

Cen Zhang (Microsoft) <[email protected]>
userfaultfd: fix UFFDIO_MOVE livelock on large folio with extra references

Nickolai Zeldovich <[email protected]>
mm/mlock: use a long for the page count in mlock_fixup()

Kiryl Shutsemau (Meta) <[email protected]>
mm: page_alloc: make defrag_mode retries follow the promoted order

Wei Yang <[email protected]>
mm/madvise: add cond_resched() in THP branch of madvise_cold_or_pageout_pte_range()

Hongfu Li <[email protected]>
mm/memfd: fix hugetlb reservation accounting in error paths

David Hildenbrand (Arm) <[email protected]>
mm: disallow ioremap'ing ordinary RAM in generic_access_phys()

Donggeun Yoo <[email protected]>
mm/damon/core: prevent size quota overflow in the temporal goal tuner

Karl Mehltretter <[email protected]>
mm/damon/core: preserve the quota passed to damon_new_scheme()

Hongfu Li <[email protected]>
mm/memcg: migrate per-node hugetlb lruvec stat together with hugetlb folio

Hongfu Li <[email protected]>
mm/hugetlb: account migration target folio in per-node NR_HUGETLB vmstat

David Hildenbrand (Arm) <[email protected]>
mm/mremap: fix calling fixup_hugetlb_reservations() on the wrong VMA

Josef Bacik <[email protected]>
mm/hugetlb: don't leave a uffd-wp marker when zapping an RWP entry

David Hildenbrand (Arm) <[email protected]>
mm/hugetlb: tolerate UFFD_WP markers outside uffd-wp VMAs

David Hildenbrand (Arm) <[email protected]>
mm/hugetlb: tolerate uffd bits set without uffd for PROT_NONE PTEs

Josef Bacik <[email protected]>
mm/hugetlb: fix endless write fault on a leftover uffd bit

Josef Bacik <[email protected]>
mm/hugetlb: don't clear the resv_map of a VMA whose lock is held

Josef Bacik <[email protected]>
mm/hugetlb: unmap the page where the other VMA maps it

Josef Bacik <[email protected]>
mm/vma: don't leak the commit charge on mmap failure

Cen Zhang <[email protected]>
ocfs2/cluster: remove zero-address nodes from IP tree on teardown

Cen Zhang <[email protected]>
ocfs2: snapshot the dentry name while tracing file release

Caleb Kan <[email protected]>
stackdepot: stop preallocating after the final pool

Hungyu Lin <[email protected]>
compat: avoid double rounding in times()

Stanley Jhu <[email protected]>
scsi: ufs: core: Do not release a reserved request in ufshcd_abort()

Stanley Jhu <[email protected]>
scsi: ufs: core: Remove completed-without-interrupt path in ufshcd_abort()

Stanley Jhu <[email protected]>
scsi: ufs: core: Fix double release in ufshcd_eh_timed_out()

Stanley Jhu <[email protected]>
scsi: ufs: core: Fix double completion in ufshcd_clear_lu_cmds()

Stanley Jhu <[email protected]>

    scsi: ufs: core: Add a helper for clearing hba->outstanding_reqs

Stanley Jhu <[email protected]>
scsi: ufs: core: Remove an always-false WARN_ONCE()

Yingjie Wang <[email protected]>
scsi: handle out-of-range SG_SET_TIMEOUT values

Bart Van Assche <[email protected]>
scsi: sd: Mark the disk dead if runtime resume fails in sd_remove()

Ratnaker Gautam <[email protected]>
scsi: libiscsi_tcp: Prevent R2T range check overflow

Joonhoe Kim <[email protected]>
scsi: ufs: core: Fix a deadlock between clock scaling and device commands

Stanley Jhu <[email protected]>
scsi: ufs: core: Clear stale UIC result byte before peer DME retries

Stanley Jhu <[email protected]>
scsi: ufs: bsg: Reject UIC commands with a non-zero result byte

Stanley Jhu <[email protected]>
scsi: ufs: bsg: Validate request_len before accessing request

Stanley Jhu <[email protected]>
scsi: ufs: bsg: Clear the reply buffer before use

Stanley Jhu <[email protected]>
scsi: ufs: bsg: Complete the job on error

yanxia <[email protected]>
veth: fix stale peer max_mtu on XDP program replacement

Igor Velkov <[email protected]>
genirq/kexec: Do not take the bus lock of an interrupt chip on the crash path

Aamir Ahmed <[email protected]>
gve: fix out-of-bounds read in gve_get_flow_rule_entry()

Sasha Levin <[email protected]>
cgroup: don't kill migrated processes through their exiting threads

Thomas Weißschuh (Schneider Electric) <[email protected]>
timekeeping: Update offsets on sequence counter retry in ktime_get_update_offsets_now()

Daehyeon Ko <[email protected]>
timekeeping: Require permission to set auxiliary clocks

Cen Zhang (Microsoft) <[email protected]>
posix-cpu-timers: Fix pid refcount leak in do_cpu_nanosleep() signal path

Zhiling Zou <[email protected]>
ipmr: only copy pktinfo to cache reports

Pufan Jin <[email protected]>
spi: zynq-qspi: fix address buffer corruption and support 4-byte address

Yafang Shao <[email protected]>
sched: fix stale get_pref_llc() stub for !CONFIG_SCHED_CACHE

Tim Chen <[email protected]>
sched/cache: Honor asym packing over cache aware scheduling on hybrid systems

Christian Marangi <[email protected]>
i2c: mt7621: fix copying uninitialized kernel stack with reduced page_len

Alex Kazinsky <[email protected]>
ASoC: tlv320aic32x4: Prevent division by zero in divider callbacks

Jean Delu <[email protected]>
parisc: eisa_enumerator: Fix out-of-bounds reads of the EEPROM buffer

Adrian Ambrozewicz <[email protected]>
gpiolib: don't report -ENOMEM for a requested line without a label

Pei Xiao <[email protected]>
tpm: fix zero-length read discarding the pending response

Pei Xiao <[email protected]>
tpm: tpm_nsc: stop using the cleanup callback as dev.release

Pei Xiao <[email protected]>
tpm: tpm_nsc: fix NULL pointer dereference on init failure

Alexander Sverdlin <[email protected]>
tpm: tpm2_probe: propagate transport errors

Navon John Lukose <[email protected]>
i2c: designware: queue only one read command for block reads

Ma Ke <[email protected]>
i2c: acpi: Fix adapter reference leak in i2c_acpi_new_device_by_fwnode()

Karl Mehltretter <[email protected]>
PM: EM: allocate the cpumask for every perf domain

Tristan Madani <[email protected]>
cpufreq: intel_pstate: cancel HWP notify work in driver cleanup

Nickolai Zeldovich <[email protected]>
ucount: take the rlimit reference before checking the limit

Christian Brauner <[email protected]>
listns: don't wrap around with a U64_MAX cursor

Nikolaos Karaolidis <[email protected]>
fs: don't lose inodes that another LRU walker is isolating

Christian Brauner <[email protected]>
listmount: don't wrap around with a U64_MAX cursor

Christian Brauner <[email protected]>
statmount: don't copy the reserved empty string past the buffer

Chuck Lever <[email protected]>
exportfs: Release the get_name() directory file synchronously

Liz Fong-Jones <[email protected]>
writeback: keep cleanup_offline_cgwb()'s scan out of syncs

Nikolaos Karaolidis <[email protected]>
fs: rotate inodes whose page cache could not be dropped

Guopeng Zhang <[email protected]>
cgroup/cpuset: Fix task checking when enabling a partition

Henry Martin <[email protected]>
tipc: fix broadcast sender hang on last acker departure

Niklas Cassel <[email protected]>
ata: libata-sff: fix race between IRQ deferral and ata_sff_flush_pio_task()

Liu Chao <[email protected]>
net: wwan: iosm: validate msg_head before indexing msg_ring

Qingfang Deng <[email protected]>
pppoe: delete session hash entries by pointer match

Daehyeon Ko <[email protected]>
mshv_vtl: reject poll files with multiple waitqueues

Yu Zhang <[email protected]>

    nvmet: take subsys->lock while force-reconnecting in nvmet_subsys_attr_qid_max_store()

Shawn Lin <[email protected]>
PCI/pwrctrl: Only destroy devices created by pwrctrl core

Alexey Charkov <[email protected]>
PCI/pwrctrl: generic: Fix leaking array from of_regulator_bulk_get_all()

Runyu Xiao <[email protected]>
sh: maple: Use the matching IRQ cookie when invoking free_irq()

Henrik Enquist <[email protected]>
ALSA: aloop: Update the PCM Slave controls for a matching playback

Julian Sun <[email protected]>
writeback: clear old wb dirty state after inode switches

Julian Sun <[email protected]>
writeback: reset dirtied_when when switching wbs

Bartu Alev <[email protected]>
platform/x86: asus-wmi: fix TUF keyboard power state shutdown naming

Michael Kelley <[email protected]>
Documentation: hyperv: Update documentation for sending VMBus packets

Cen Zhang <[email protected]>
ocfs2/cluster: initialize heartbeat regions before publishing them

Joseph Qi <[email protected]>
ocfs2: deal with legacy signed xattr name hash values

Joseph Qi <[email protected]>
ocfs2: use the stored hash when checking xattr bucket collision

Joseph Qi <[email protected]>
ocfs2: deal with legacy signed dir index name hash values

Armaan Sandhu <[email protected]>
lib/cmdline: fix get_options() count and overflow with large ranges

Joseph Qi <[email protected]>
ocfs2: reserve value tree metadata when moving an xattr into the inode

Joseph Qi <[email protected]>
ocfs2: reserve metadata for a new xattr block and its value tree

Matt Turner <[email protected]>
alpha: determine tininess after rounding in the FP emulation

Bryam Vargas <[email protected]>
net/smc: queue the copied chunk when smc_tx_sendmsg() faults

Hengyu Liang <[email protected]>
exfat: fix reading a directory whose FAT chain is longer than its size

Hengyu Liang <[email protected]>
exfat: free clusters beyond EOF when a write fails or is short

Yuezhang Mo <[email protected]>
exfat: mark straddling folio RO and zero the post-EOF range

Hengyu Liang <[email protected]>
exfat: fix a large buffered write failing when the volume is nearly full

Namjae Jeon <[email protected]>
exfat: zero invalid tail on partial overwrites

Jiale Yao <[email protected]>
exfat: drain in-flight DIO before buffered writes

Chi Zhiling <[email protected]>
exfat: make valid_size and zeroed_size atomic

Chi Zhiling <[email protected]>
exfat: dirty all new pages when extending valid_size

Chi Zhiling <[email protected]>
exfat: hold the invalidate lock while truncating

Chi Zhiling <[email protected]>
exfat: advance valid_size to EOF for append writes

Til Kaiser <[email protected]>
mlxsw: Initialize register query payloads

Yingjie Wang <[email protected]>
net: unix: reject negative max_dgram_qlen values

Nguyen Ngoc Thang <[email protected]>
net/rds: ib: don't enable IRQs in rds_ib_conn_free()

Guangshuo Li <[email protected]>
PCI: qcom-ep: Deinitialize endpoint on remove

Yao Yiqi <[email protected]>
fbcon: Retry rotated font allocation after failure

Yao Yiqi <[email protected]>
fbcon: Rebuild rotated font buffer on font change

Yao Yiqi <[email protected]>
fbcon: Include font geometry in the rotated font cache

Tingjie Zhong <[email protected]>
fbdev: bitblit: Fix glyph clipping when fbcon pans

Daehyeon Ko <[email protected]>
ipv6: do not restart DAD for a dead ifaddr

Daehyeon Ko <[email protected]>
ipv6: initialize temporary ifaddr before publication

Daehyeon Ko <[email protected]>
ipv6: serialize address publication with device teardown

Daehyeon Ko <[email protected]>
ipv6: remove ifaddr from hash during ifdown list cleanup

Kees Cook <[email protected]>
netdev: Hide the netdev_priv() origin from GCC in netdev_from_priv()

Zhen Han <[email protected]>
drm/amdkfd: correct vram_available calculation

Daniel Phillips <[email protected]>
amdkfd: Fix memory availability double accounting of kfd pinned objects

Kenneth Feng <[email protected]>
drm/amd/pm:restate all customized OD features on every table upload for smu 13.0.0/smu 14.0.2

John Fisher <[email protected]>
drm/amdgpu: wait for pending page table updates before switching a VM to CPU updates

William Palacek <[email protected]>
drm/amdkfd: wait for a GPU reset before freeing a BO

Keita Morisaki <[email protected]>
drm/amd/display: Fix swap in median3() for DSC rate control

Elena Sakhnovitch <[email protected]>
drm/amdgpu/gmc9: add extra type-2 TLB flush for gfx942/gfx950

Harish Kasiviswanathan <[email protected]>
drm/amdkfd: fix NULL deref in SDMA HQD debugfs dump on GC 12.1

Jesse Zhang <[email protected]>
drm/amdkfd: don't drop an SVM CWSR reference that was never taken

Kevin Wang <[email protected]>
drm/amd/pm: reapply umd profile state after recovery

Jesse Zhang <[email protected]>
drm/amdgpu: reject ANONONLY userptrs that span multiple VMAs

Mario Limonciello <[email protected]>
drm/amd/display: don't WARN when removing an unallocated MST payload

Henry Martin <[email protected]>
drm/amdkfd: fix doorbell allocation race creating duplicate allocations

Maciej Kucharek <[email protected]>
drm/amdgpu: reset VI ASIC on Apple boards with VRAM at 0

Maciej Kucharek <[email protected]>
drm/amdgpu: reset CIK ASIC on Apple boards with VRAM at 0

Maciej Kucharek <[email protected]>
drm/amdgpu: reset SI ASIC on MacBookPros with VRAM at 0

Luigi Lauro <[email protected]>
drm/amdgpu: require _PR3 for BOCO

Daeho Jeong <[email protected]>
f2fs: don't use truncate_inode_pages_final() on live inodes

Wang Yan <[email protected]>
selftests/landlock: Fix snprintf truncation checks in test files

Nirmoy Das <[email protected]>
blk-mq: clear stale inactive flag on hctx reuse

Sahaj Chaudhari <[email protected]>
gpio: pca953x: Handle direction register read errors in IRQ paths

Sahaj Chaudhari <[email protected]>
gpio: pca953x: Preserve wakeup accounting on parent IRQ failure

Sahaj Chaudhari <[email protected]>
gpio: davinci: Clear interrupt status in every bank on suspend

Takashi Iwai <[email protected]>
ALSA: line6: Handle period elapsed calls outside the locks

Baek Kyu, Kim <[email protected]>
gpiolib: Free chip resources when allocating the label fails

Rong Zhang <[email protected]>
platform/x86: lenovo-wmi-capdata: Do not stop the AC notifier chain on error

Takashi Iwai <[email protected]>
ALSA: emux: Stop voices before freeing zones in all cases

Wang Yan <[email protected]>
ALSA: mtpav: restore negation dropped in guard() conversion

Hongling Zeng <[email protected]>
ntfs: roll back the ACL xattr commit when the WSL mode update fails

DaeMyung Kang <[email protected]>
ntfs: flush the block device when syncing a directory

DaeMyung Kang <[email protected]>
ntfs: report block device flush failures from fsync

Karl Mehltretter <[email protected]>
ntfs: fix kmap_local leak in ntfs_check_logfile()

Karl Mehltretter <[email protected]>
ntfs: fix kunmap_local() of advanced pointers in check_mft_mirror()

Matthias Goergens <[email protected]>
ntfs: balance the $MFT runlist lock in data extension error paths

Matthias Goergens <[email protected]>
ntfs: add a runlist merge that leaves the source runlist to the caller

Matthias Goergens <[email protected]>
ntfs: do not use a stale runlist pointer when undoing $MFT extension

Matthias Goergens <[email protected]>
ntfs: hold the runlist lock while expanding a non-resident attribute

Matthias Goergens <[email protected]>
ntfs: fail the mount when $MFT's data size exceeds its allocation

Matthias Goergens <[email protected]>
ntfs: do not map a vcn as a hole when its runlist lookup failed

Matthias Goergens <[email protected]>
ntfs: fail the mount when $MFT needs its own extent records

Matthias Goergens <[email protected]>
ntfs: do not turn an unmappable runlist fragment into delalloc on write

Matthias Goergens <[email protected]>
ntfs: do not map an unmappable runlist fragment as a hole

Hyunchul Lee <[email protected]>
ntfs: validate attribute-list sizes before allocation

Hongling Zeng <[email protected]>
ntfs: mount hibernated volumes read-only regardless of errors=

Karl Mehltretter <[email protected]>
ntfs: include the final partial cluster in sync writes

Hongling Zeng <[email protected]>
ntfs: fail remount on sync errors and keep the dirty bit on SB_FORCE

Hongling Zeng <[email protected]>
ntfs: check the dirty-state commit on remount and unmount

Hongling Zeng <[email protected]>
ntfs: do not clear the volume dirty bit during sync

Hongling Zeng <[email protected]>
ntfs: persist the dirty state after the final put_super() commits

Hongling Zeng <[email protected]>
ntfs: sync the volume dirty bit with the recorded error state

Hongling Zeng <[email protected]>
ntfs: set the volume dirty bit unconditionally on metadata changes

Hongling Zeng <[email protected]>
ntfs: fix volume flag update races

Hyunchul Lee <[email protected]>
ntfs: avoid truncate and writeback deadlock

Hongling Zeng <[email protected]>
ntfs: use fatal_signal_pending() for fallocate interruption checks

Hongling Zeng <[email protected]>

    ntfs: NULL vol->vol_ino in the load_system_files() error teardown

Hyunchul Lee <[email protected]>
ntfs: wait for attribute folio writeback before update

Hyunchul Lee <[email protected]>
ntfs: trigger page_mkwrite for native 4Kn size extension

Hyunchul Lee <[email protected]>
ntfs: use sync flag for direct MFT writes

Hyunchul Lee <[email protected]>
ntfs: write MFT records through containing I/O units

Hyunchul Lee <[email protected]>
ntfs: write MFT folios through mapped I/O units

Hyunchul Lee <[email protected]>
ntfs: track direct MFT writes until BIO completion

Hyunchul Lee <[email protected]>
ntfs: serialize raw MFT updates against folio writeback

Hyunchul Lee <[email protected]>
ntfs: write MFT mirror data in mapped I/O units

Hyunchul Lee <[email protected]>
ntfs: validate the MFT I/O geometry

Hyunchul Lee <[email protected]>
ntfs: read MFT writeback bounds under size_lock

Chengfeng Ye <[email protected]>
l2tp: snapshot sequencing state when building transmit headers

Peter Ujfalusi <[email protected]>
ALSA: compress: reject restarting an ACTIVE task via origin_seqno

Peter Ujfalusi <[email protected]>
ALSA: compress: add missing OPEN-state gate to SET_METADATA

Peter Ujfalusi <[email protected]>
ALSA: compress: reject buffer geometry change on gapless next_track

Peter Ujfalusi <[email protected]>
ALSA: compress: fix buffer leak on failed SET_PARAMS

Thomas Nemer <[email protected]>
ALSA: usb-audio: Skip sample-rate read-back on PreSonus AudioBox USB

Sorah Fukumori <[email protected]>
net: gro: don't chain linear parts larger than gso_size into frag_list

Jamal Hadi Salim <[email protected]>
netdevsim: reject cls_bpf programs bound to another device

Kir Kolyshkin <[email protected]>
cgroup: fix cgroup.kill for exited thread group leader

Michal Blaszczyk <[email protected]>
sched_ext: Reset runnable_at when a task leaves its scheduler

Alexander Kochetkov <[email protected]>
Revert "Input: matrix_keypad - force switch rows to input mode"

Dmitry Torokhov <[email protected]>
Input: always accept EV_SYN in input_event()

Armin Wolf <[email protected]>
hwmon: (acpi_power_meter) Fix 18.45 TW bug

Baek Kyu, Kim <[email protected]>
hwmon: (sht3x) Return the consumed count for heater writes

Baek Kyu, Kim <[email protected]>
hwmon: (mcp9982) Update the interval cache only after successful writes

Igor Velkov <[email protected]>
rtc: pcf8563: pass the driver data to the alarm interrupt handler

Ma Ke <[email protected]>
platform/x86/amd/pmc: Fix RTC reference leak in amd_pmc_verify_czn_rtc()

Gregory Price <[email protected]>
rtc: cmos: Honor explicit use_acpi_alarm parameter value

Gregory Price <[email protected]>
rtc: cmos: Disable ACPI RTC event before handling it

Jianyun Gao <[email protected]>
dax: fix wrong error code returned from dax_dedupe_file_range_compare()

Seongjae Jeong <[email protected]>
f2fs: fix submit accounting for IPU writeback

Wenjie Qi <[email protected]>
f2fs: flush SIT journal during filesystem resize

Vaibhav Nagare <[email protected]>
bnxt_en: don't leave an XDP program installed when the open fails

Jiale Yao <[email protected]>
hwmon: (gigabyte_waterforce) reject short input reports

Ximing Zhang <[email protected]>
hwmon: (coretemp) Fix handling of isolated SMT siblings

Kyle Zeng <[email protected]>
netfilter: nf_reject: initialize IPCB at inet ingress

Thomas Nemer <[email protected]>
ALSA: usb-audio: Fix missing sample-rate control for PreSonus AudioBox USB

George Christidis <[email protected]>
ALSA: hda/realtek: Fix headset mic on ASUS Zenbook 14 UX3402VA

Adrian Ambrozewicz <[email protected]>
gpiolib: cdev: don't set GPIOD_FLAG_IS_OUT

Nickolai Zeldovich <[email protected]>
lib/buildid: reject file offsets that do not fit in pgoff_t

Sanan Hasanov <[email protected]>
hwmon: (corsair-cpro) Make wait_input_report_lock IRQ safe

Baek Kyu, Kim <[email protected]>
hwmon: (sht4x) Reject incomplete heater command transfers

Ricardo Neri <[email protected]>
hwmon: (coretemp) Return -ENODATA for invalid temperature readings

Tom Verdonck <[email protected]>
hwmon: (sht4x) Fix jiffies wraparound in heater-ready check

Weibin Liu <[email protected]>
spi: ch341: handle transfers without a TX or RX buffer

Deep Shah <[email protected]>
RDMA/uverbs: Fix uobject leak in DMABUF release

Vasiliy Kovalev <[email protected]>
ALSA: hda/via: Apply runtime PM workaround for ASUS X55A

Magnus Lindholm <[email protected]>
alpha: do not skip TLB shootdown IPIs for kthread-borrowed mms

Magnus Lindholm <[email protected]>
alpha: do not clear remote MMU contexts in migrate_flush_tlb_page()

Magnus Lindholm <[email protected]>
alpha: invalidate the local context in flush_icache_user_page()

Magnus Lindholm <[email protected]>
alpha: invalidate the local context in flush_tlb_mm()

Magnus Lindholm <[email protected]>
alpha: fix the local TLB invalidate in the UP flush_tlb_page()

Magnus Lindholm <[email protected]>
alpha: fix the local TLB invalidate in flush_tlb_page()

Magnus Lindholm <[email protected]>
alpha: invalidate the local context in flush_tlb_page()

Magnus Lindholm <[email protected]>
alpha: only use a targeted tbi() when the target mm is really current

Magnus Lindholm <[email protected]>
alpha: run check_mmu_context() from finish_arch_post_lock_switch()

Magnus Lindholm <[email protected]>
alpha: load the MMU context when switch_mm() switches the current task

Matt Turner <[email protected]>
alpha: handle VM_FAULT_HWPOISON in do_page_fault()

Andrea Righi <[email protected]>
sched_ext: Don't queue balance callbacks from a core-sched pick

Brandon Williams <[email protected]>
power: supply: qcom_battmgr: Notify charger supplies of online changes

Tim Douglas <[email protected]>
power: supply: generic-adc-battery: fix status with no supplier

Andrew Pam <[email protected]>
power: supply: cros_charge-control: restore EC state on resume

Fabricio Akio <[email protected]>
power: supply: qcom_smbx: set the charge enable after software control

Andrea Righi <[email protected]>
sched_ext: Don't leave balance callbacks queued across a pick retry

Arnaldo Carvalho de Melo <[email protected]>
perf python: Free the parse error entries when parsing fails

Fuad Tabba <[email protected]>
KVM: arm64: vgic-its: Don't map an LPI from more than one event

Luis Gerardo Lopez Hernandez <[email protected]>
ALSA: hda/realtek: Fix internal speakers on Acer Aspire AL16-31P

José Miguel Castellanos Valladolid <[email protected]>

    ALSA: hda/realtek: Enable mute LEDs on HP OmniBook X Flip 14-fm0xxx

Takashi Iwai <[email protected]>
ALSA: seq: oss: Skip events until fully initialized

Paolo Abeni <[email protected]>
mptcp: fix subflow bitfield misuse

Quanye Yang <[email protected]>
mptcp: reset msk state on early connect failure

Kees Cook <[email protected]>
ipc, msg: Account msg_msg allocations with GFP_KERNEL_ACCOUNT again

sonotri <[email protected]>
ublk: pin module while release work is pending

Chengfeng Ye <[email protected]>
fuse: fix copy_file_range reply handling race

Art O Cathain <[email protected]>
ASoC: amd: acp-config: force SoundWire probe on Dell 14S DS14265

Sung Byeongchan <[email protected]>
virtiofs: validate fixed-output response length

Fan Wu <[email protected]>

    virtio_fs: read the vring size under virtio_fs_mutex in ->get_tree

Joanne Koong <[email protected]>
fuse: don't launder folios of a bad inode

Huacai Chen <[email protected]>
cpufreq: loongson3: Replace IOCSR read/write with MMIO ones

Huacai Chen <[email protected]>
cpufreq: loongson3: Use global physical CPU ID in get/target callbacks

Huacai Chen <[email protected]>
cpufreq: loongson3: Replace per-package mutex with per-node

Huacai Chen <[email protected]>
cpufreq: loongson3: Adjust the width of id and val in smc_message

Huacai Chen <[email protected]>
cpufreq: loongson3: Make this driver depend on MACH_LOONGSON64

Rosen Penev <[email protected]>
net: bgmac: enable interrupts only after NAPI is ready

Shubham Antil <[email protected]>
RDS/IB: validate receive fragment completions

Seung Min Shin <[email protected]>
sctp: hold transport reference across connect wait

Zixuan Chai <[email protected]>
ipv6: defrag: orphan skb before queuing

Henry Martin <[email protected]>
rds: fix out-of-bounds conn_path walks via handshake exthdrs

Josef Bacik <[email protected]>
net: skbuff: don't BUG() on a bad csum_start in skb_copy_and_csum_dev()

Ming Lei <[email protected]>
ublk: let STOP_DEV cancel the server's commands before its release

Ming Lei <[email protected]>

    ublk: reset the FETCH round under ub->mutex

Ming Lei <[email protected]>
ublk: reset the FETCH round in release also without a disk

Ming Lei <[email protected]>
ublk: mark the batch fetch command cancelable before linking it

Ming Lei <[email protected]>
ublk: mark the io command cancelable before publishing it

Ming Lei <[email protected]>
ublk: keep a canceled FETCH round canceling until the server is gone

Yun Zhou <[email protected]>
net: erspan: set lltx to avoid sch_direct_xmit deadlock

Jianyun Gao <[email protected]>
dax: fix dax_range_compare_iter() to use correct size and address offset

Jianyun Gao <[email protected]>
dax: Return errors from dax_core_init()

David Carlier <[email protected]>
ring-buffer: Take cpus_read_lock() when changing the subbuf order

Gyokhan Kochmarla <[email protected]>
erofs: use on-disk blkszbits for lz4 max pcluster bound

Weibin Liu <[email protected]>

    spi: amd: fix len==0 underflow and FIFO overflow

Keng-Yu Lin <[email protected]>
PCI/PM: Restore BARs after powering up during enumeration

Weibin Liu <[email protected]>
spi: bcm-qspi: reject oversized dummy bytes in mspi exec_mem_op

Jason Gunthorpe <[email protected]>
iommupt: Do not allow PTEs to be split when dirty logging

Vladyslav Tymoshchuk <[email protected]>
ASoC: qcom: q6asm-dai: wrap the position of a full ring to 0

Vladyslav Tymoshchuk <[email protected]>
ASoC: qcom: q6apm: reset the hw pointer with the fragment queue

Vladyslav Tymoshchuk <[email protected]>
ASoC: qcom: q6apm-dai: wrap the position of a full ring to 0

Radiy Zhambakiev <[email protected]>
mfd: tps65217: Use devres for IRQ domain and wake teardown

Radiy Zhambakiev <[email protected]>
mfd: tps65217: Check return value when masking interrupt sources

Radiy Zhambakiev <[email protected]>
mfd: tps65217: Fix NULL pointer dereference on IRQ init failure

Guixin Liu <[email protected]>
cxl/events: Test CME counter expiry with equality, not bitwise AND

Alexey Charkov <[email protected]>
mfd: bq257xx: Mark self-modifying BQ25792 registers volatile

Weibin Liu <[email protected]>
spi: npcm-fiu: limit UMA data_size to the 16-byte staging buffer

Marc Zyngier <[email protected]>

    KVM: arm64: Turn vcpu->arch.pause into a counter

Marc Zyngier <[email protected]>
KVM: arm64: Move IN_GUEST_MODE ahead of state being loaded

Marc Zyngier <[email protected]>
KVM: arm64: Move OUTSIDE_GUEST_MODE publication past context being saved

Marc Zyngier <[email protected]>

    KVM: arm64: nv: Move L2->L1 switch on interrupt early

Ard Biesheuvel <[email protected]>
efi/libstub: Don't replace an existing LINUX_EFI_MEMRESERVE table

Ard Biesheuvel <[email protected]>
efi/libstub: arm64: Don't use the platform register x18

Weibin Liu <[email protected]>
spi: jcore: fix divide-by-zero when speed_hz is zero

Tal Zussman <[email protected]>
gfs2: fix the escaped block copy in gfs2_before_commit()

Takashi Iwai <[email protected]>
ALSA: ump: Correct return size of fill_rpn()

Au Dang <[email protected]>
irqchip/renesas-rzv2h: Preserve TIEN state in rzv2h_tint_set_type()

Karl Mehltretter <[email protected]>
irqchip/jcore-aic: Fix lost IPIs on SMP

Karl Mehltretter <[email protected]>
irqchip/atmel-aic[5]: Disable interrupts in the irq_pm_shutdown() callbacks

Wentao Liang <[email protected]>
irqchip/mchp-eic: Fix clock reference leak in mchp_eic_probe()

Guangshuo Li <[email protected]>
irqchip/imx-intmux: Fix runtime PM teardown on remove

Fuad Tabba <[email protected]>
irqchip/gic-v3-its: Don't clamp nvecs to zero when id_bits is 32

Ahsan Atta <[email protected]>
crypto: qat - fix use of destroyed vf2pf_lock on VF restart

Ahsan Atta <[email protected]>
crypto: qat - initialise state_lock on every path in adf_devmgr_add_dev()

Zhang Heng <[email protected]>

    ALSA: hda/realtek: Fix quirk for HP Laptop 15-fc0xxx

Andrea Parri <[email protected]>
iommufd: Reject a zero-length dirty bitmap request

Andrea Parri <[email protected]>
iommufd: Keep dmabuf PFNs MMIO when filling another domain

Nathan Chancellor <[email protected]>
kbuild: AutoFDO: Update split machine function argument for upstream rename

Wentao Liang <[email protected]>
PCI: xilinx-xdma: Fix device node reference leak in xilinx_pl_dma_pcie_init_irq_domain()

Hui Su <[email protected]>
cpufreq: schedutil: Serialize sugov_start() against rate limit updates

Siwei Zhang <[email protected]>
Bluetooth: L2CAP: Use default TxWindow for zero socket option

Siwei Zhang <[email protected]>
Bluetooth: L2CAP: Reject invalid TxWindow in configuration requests

Siwei Zhang <[email protected]>
Bluetooth: L2CAP: Reject mode changes on connected channels

Bui Viet Dung <[email protected]>
Bluetooth: selftest: Pin module for selftest debugfs file operations

Bui Viet Dung <[email protected]>
Bluetooth: hci_debugfs: Pin module for debugfs file operations

Bui Viet Dung <[email protected]>
Bluetooth: 6lowpan: Pin module for 6lowpan_control debugfs file

Nikolaj Klitlund Børty <[email protected]>
Bluetooth: btusb: Add device ID for Realtek RTL8761BUE (StarTech AV53C1)

Francesco Orlando <[email protected]>
Input: xpad - add GameSir Nova Lite support

Stian Halseth <[email protected]>
PCI: Set supported_speeds in set_pcie_port_type()

Karl Mehltretter <[email protected]>
ARM: 9523/1: topology: allocate the cacheinfo early on the boot CPU

Karl Mehltretter <[email protected]>
ARM: 9522/1: cacheinfo: guard the CLIDR read in populate_cache_leaves()

Karl Mehltretter <[email protected]>
ARM: 9521/1: cacheinfo: count external caches in early_cache_level()

Karl Mehltretter <[email protected]>
ARM: 9520/1: cacheinfo: avoid out-of-bounds write in populate_cache_leaves()

Karl Mehltretter <[email protected]>
ARM: 9491/1: alignment: restore uaccess state on emulation fault

Karl Mehltretter <[email protected]>
ARM: 9488/1: smp: set current pointer in assembly before jumping into C

Weibin Liu <[email protected]>
spi: cadence-xspi: fix stack buffer overflow in the Marvell b0 path

Weibin Liu <[email protected]>
spi: cadence-xspi: reject SDMA transfers larger than the requested length

Guangshuo Li <[email protected]>
mfd: ab8500: Fix child device leaks on probe failure

Martin Belanger <[email protected]>
nvme: make the DH-HMAC-CHAP secret attributes readable by root only

Matt Fleming <[email protected]>
iommu/amd: Don't allocate kdump device table from DMA32

Matt Fleming <[email protected]>
iommu/amd: Program device table when kdump reuse fails

Tim Douglas <[email protected]>
serial: pmac_zilog: push received data to the port that received it

Nicolai Buchwitz <[email protected]>
serial: amba-pl011: keep transmitter enabled when disabling RS485

Nicolai Buchwitz <[email protected]>
serial: amba-pl011: honour delay_rts_before_send for every write

Ferry Toth <[email protected]>
Revert "serial: 8250_port: Drop duplicate NULL check"

Jiri Slaby (SUSE) <[email protected]>

    serial: 8250_omap: set priv->line before enabling the IRQ

Jiri Slaby (SUSE) <[email protected]>
serial: 8250_lpss: do not touch uninitialized line in ehl_serial_exit()

Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: NUL-terminate the SPM auth token

Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: allow clearing current_password

Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: return -E2BIG from validate_password_input()

Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: fix non-ASCII truncation in hp_get_string_from_buffer()

Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: fix OOB reads in hp_get_string_from_buffer()

Denis Arefev <[email protected]>
ALSA: cs46xx: fix unit mismatch in DSP code area bounds check

Aaron Erhardt <[email protected]>
platform/x86/tuxedo: Fix keyboard LED map ordering

Rudi Heitbaum <[email protected]>
PCI: imx6: Avoid dereferencing a NULL clock name

Iván Ezequiel Rodriguez <[email protected]>

    ALSA: hda/realtek: keep headset mic on Acer SSID 0x1640

Gergo Koteles <[email protected]>
ALSA: hda/tas2781: Skip invalid TAS2563 UEFI calibration data

Gergo Koteles <[email protected]>
ALSA: hda/tas2781: Assign total_sz at the end of the function

Kazuki Hanai <[email protected]>
tmpfs: fix unicode_map leaks in casefold option handling

Giorgi Kobakhia <[email protected]>
ocfs2: fix array out of bound access in __ocfs2_find_path()

Su Yue <[email protected]>
ocfs2: update xattr count before moving bucket entries

Aamir Ahmed <[email protected]>
lib: decompress_bunzip2: fix integer overflow in run-length decoding

Bradley Morgan <[email protected]>
panic: kill the "buffer unavailable" redirect fallback

Bradley Morgan <[email protected]>
panic: allow force_cpu redirect from an NMI

Bradley Morgan <[email protected]>
panic: restore variable arguments to nmi_panic()

Bradley Morgan <[email protected]>
panic: fix va_list reuse in panic_try_force_cpu()

Bradley Morgan <[email protected]>
panic: flatten nmi_panic control flow

Bradley Morgan <[email protected]>
panic: fix redirect CPU race in panic_try_force_cpu()

Matt Turner <[email protected]>
lib/decompress_bunzip2: fix off-by-one in run-length bounds check

Ma Ke <[email protected]>
pinctrl: stm32: Fix fwnode reference leak in stm32_gpiolib_register_bank()

Weibin Liu <[email protected]>
spi: ljca: validate the response length before copying the data

Chao Yu <[email protected]>
f2fs: fix to use bio_in_atomic() in f2fs_read_end_io()

Daeho Jeong <[email protected]>
f2fs: disallow mmap write and data-modifying fallocate on atomic files

Zhan Xusheng <[email protected]>
f2fs: fix defragment writeback range truncation on 32-bit

Hengyu Liang <[email protected]>
f2fs: allow empty strings for journaled quota options

Kaixuan Li <[email protected]>

    f2fs: check every cur_*_segno[] entry on readonly images

Nanzhe Zhao <[email protected]>
f2fs: read i_size once in f2fs_vm_page_mkwrite

Joanne Chang <[email protected]>
f2fs: allow pinning empty compressed files

Nanzhe Zhao <[email protected]>
f2fs: remove mappedtodisk flag usage in mmap write path

Myeonghun Pak <[email protected]>
accel/qaic: Cancel Sahara read data work on removal

Karl Mehltretter <[email protected]>
sh: intc: Sort the prio and sense lists after filling them

Geraldo Nascimento <[email protected]>
PCI: rockchip: Drive at 2.5 GT/s, error other speeds

Geraldo Nascimento <[email protected]>
PCI: rockchip-host: Do not attempt 5.0 GT/s retraining

Geraldo Nascimento <[email protected]>
PCI: rockchip-ep: Do not attempt 5.0 GT/s retraining

Daeho Jeong <[email protected]>
f2fs: convert inline quota files when turning quota on

Andrea Parri <[email protected]>
nvmet: zns: don't leak stale memory in zone management receive

Yehyeong Lee <[email protected]>
nvme: bound FDP config log reads to the received buffer

Sung Byeongchan <[email protected]>
nvmet: require authentication before property set

Jérémy Jean <[email protected]>
nvmet: free the bvec on file namespace range errors

Yehyeong Lee <[email protected]>
nvme-auth: fail when the controller does not authenticate itself

Daejun Park <[email protected]>
nvmet: fix preempt of another registrant by the reservation holder

Yehyeong Lee <[email protected]>
nvme-rdma: don't complete a request after a bogus remote invalidation

Andrea Parri <[email protected]>
iomap: don't lose a failed direct I/O bio's error when zeroing the tail

Andrea Parri <[email protected]>
iomap: don't lose a fiemap iteration error when emitting the last extent

Kathiravan Thirumoorthy <[email protected]>
clk: qcom: ipq5210: add 24MHz rate for USB UTMI clock

Kathiravan Thirumoorthy <[email protected]>
clk: qcom: ipq5332: add 24MHz rate for USB UTMI clock

Kathiravan Thirumoorthy <[email protected]>
clk: qcom: ipq5018: add 24MHz rate for USB UTMI clock

Aamir Ahmed <[email protected]>
clk: qcom: ipq-cmn-pll: Assign .num before accessing .hws

Samuel Thibault <[email protected]>
speakup: Fix NULL pointer dereference on VT switch + selection

Wentao Guan <[email protected]>
mei: vsc: Fix packet CRC computed over pointer size

Joshua Mulloy <[email protected]>

    misc: tifm: don't clear dev->driver in tifm_device_remove()

Peter Robinson <[email protected]>
misc: issei: Fix issei architecture deps

Mikulas Patocka <[email protected]>
dm-bufio: fix a race leading to an unsigned integer underflow

Mikulas Patocka <[email protected]>
dm-bufio: fix non-working memory limit

Jiri Slaby (SUSE) <[email protected]>
serial: 8250_exar: store the GPIO platform device in struct exar8250

Hugo Villeneuve <[email protected]>
serial: sc16is7xx: declare MCR and IER as volatile registers

Martin Fuzzey <[email protected]>
serial: sc16is7xx: fix data corruption due to unexpected xon/xoff

Sasha Levin <[email protected]>
tools/dma: fix building from the top level with O=

Ard Biesheuvel <[email protected]>
arm64/mm: Treat faults taken by EFI runtime firmware as kernel faults

Myeonghun Pak <[email protected]>
fbdev: nvidia: Release write-combining handle on probe failure

Myeonghun Pak <[email protected]>
fbdev: kyro: Release WC setup on registration failure

Lorenzo Stoakes (ARM) <[email protected]>
fbdev: sh_mobile_lcdc: check for fb_deferred_io_init() error

Lorenzo Stoakes (ARM) <[email protected]>
fbdev: smscufx: check for fb_deferred_io_init() error

Lorenzo Stoakes (ARM) <[email protected]>
fbdev: udlfb: check for fb_deferred_io_init() error

Lorenzo Stoakes (ARM) <[email protected]>
fbdev: xen-fbfront: check for fb_deferred_io_init() error

Lorenzo Stoakes (ARM) <[email protected]>
fbdev: ssd1307fb: check for fb_deferred_io_init() error

Andrey Misiurov <[email protected]>
fbdev: core: Initialize modelist in framebuffer_alloc()

Karl Mehltretter <[email protected]>
fbdev: sh_mobile_lcdcfb: Restore the per-overlay sysfs attributes

David E. Box <[email protected]>
platform/x86/intel/vsec: Fix inverted walk_header() test in get_features()

Guixiong Wei <[email protected]>
platform/x86/intel-uncore-freq: Continue restoring limits on resume

Mario Limonciello <[email protected]>
platform/x86/amd: hfi: Fix out-of-bounds reads when parsing ranking data

Guangshuo Li <[email protected]>
platform/x86: simatic-ipc: fix platform device leak on registration failure

Antheas Kapenekakis <[email protected]>
platform/x86: oxpec: Fix Apex charge limit control

Marco Scardovi <[email protected]>
platform/x86: asus-wmi: Serialize WMI method evaluations with a mutex

Jack Boykin <[email protected]>
platform/x86/amd/pmf: Fix power_supply refcount leak in amd_pmf_get_battery_prop()

Muhammad Bilal <[email protected]>
platform/x86: hp-wmi: fix heap OOB read and memory corruption in hp_wmi_perform_query()

Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: fix 16-byte heap overflow for empty auth token

Denis Benato <[email protected]>
platform/x86: asus-wmi: fix screenpad power state detection

Denis Benato <[email protected]>

    platform/x86: asus-wmi: fix unclear usage of bd->props.power

Mario Limonciello <[email protected]>
platform/x86/amd: Stop counting intermediate cycles with metrics table

Mario Limonciello <[email protected]>
platform/x86/amd/pmf: Validate the APTS state index

Mario Limonciello <[email protected]>
platform/x86/amd/pmf: Add AMDI0112 ACPI ID

Donggeun Yoo <[email protected]>
mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region

Donggeun Yoo <[email protected]>
mm/damon/core: charge only the part of a region the filter left

David Carlier <[email protected]>
mm/shmem: don't release a swapin-error marker as a swap entry

Hao Ge <[email protected]>
mm/alloc_tag: account for reserved tag ids in the kernel tag check

Breno Leitao <[email protected]>
mm/shmem: report RCU-tasks quiescent states while undoing a range

Hongfu Li <[email protected]>
mm/hugetlb_cgroup: move per-node usage on cgroup reparenting

Hongfu Li <[email protected]>
mm/hugetlb_cgroup: move per-node usage on cross node migration

Yuanhe Shu <[email protected]>
mm/page_alloc: do not boost watermarks in kdump capture kernels

Gregory Price <[email protected]>
mm/madvise: use folio_trylock() in the cold/pageout PMD split

Gregory Price <[email protected]>
mm/madvise: reclaim isolated folios if PTE restart fails

Gregory Price <[email protected]>
proc/task_mmu: handle special PMDs in clear_refs and pagemap

SJ Park <[email protected]>
mm/damon/core-kunit: test invalid damos filter commits

SJ Park <[email protected]>
mm/damon/core-kunit: extend damos_commit_filter_for() for wrong input

SJ Park <[email protected]>
mm/damon/core: return an error from damos_commit_filter_arg()

SJ Park <[email protected]>

    mm/damon/sysfs-schemes: read sysfs_filter->addr_range only once

Vladimir Nedoshivin <[email protected]>
PCI: vmd: Flush DMA writes before handling MSI on Arrow Lake

Rickey Bartlett <[email protected]>
PCI: vmd: Flush DMA writes before handling MSI on Meteor Lake

Imre Kaloz <[email protected]>

    PCI: Avoid D3 on PLX PEX 8532/8533/8548 downstream ports

Yongjian Mu <[email protected]>
xprtrdma: trim head iovec when the payload arrives via a Write chunk

Tim Menninger <[email protected]>
xprtrdma: prevent disconnect feedback during endpoint teardown

Weigang He <[email protected]>
mtd: parsers: qcom: fix offset/size overflow on large partitions

Gabor Juhos <[email protected]>
mtd: rawnand: qcom: fix read location register usage in config_nand_cw_read()

Hengyu Liang <[email protected]>
btrfs: return -ENOTTY for unknown ioctls on the control device

Wentao Liang <[email protected]>
btrfs: zoned: fix block group reference leak in btrfs_repair_one_zone()

Ard Biesheuvel <[email protected]>
arm64/efi: Clear PTE_WRITE when applying EFI_MEMORY_RO

Breno Leitao <[email protected]>
ACPI: APEI: accumulate the queued flag across error sections

Ma Ke <[email protected]>
ALSA: hda: cs35l41: Fix ACPI device reference leak on probe failure

Mikulas Patocka <[email protected]>
dm-snapshot: fix crash if dm_io_client_create fails

Bjoern Doebel <[email protected]>
selftests/filesystems: Fix idmapped_tmpfile layer dir ownership

Johan Hovold <[email protected]>
USB: serial: sierra: fix urb leak on write completion

Christopher Lusk <[email protected]>
m68k: Fix seccomp filtering on ColdFire and 68000

Anup Vishwakarma <[email protected]>
mailbox: qcom-ipcc: Guard against NULL con_priv in send_data()

Wentao Liang <[email protected]>
mailbox: mtk-cmdq: Fix runtime PM leak in cmdq_mbox_flush()

Florian Fainelli <[email protected]>
mailbox: bcm74110: Cap rx_svc_init_list growth to prevent PMC-induced OOM

Runyu Xiao <[email protected]>
mailbox: altera: shut down RX polling timer on channel teardown

Wayne Chang <[email protected]>
usb: typec: ucsi_ccg: Add retry mechanism in ccg_read

Stephen Horvath <[email protected]>
usb: xhci-pci: Add AMD 600 series to xhci-pci-prom21

Mathias Nyman <[email protected]>
xhci: Prevent invalid vdev dereference during sideband unregister

Michal Pecio <[email protected]>
usb: xhci: Fix bounce buffer overflow

Seungjin Bae <[email protected]>
usb: typec: ucsi: ccg: Validate altmode index in GET_CURRENT_CAM response

Gris Ge <[email protected]>
usb: typec: ucsi: Skip CAM query when partner has no alt modes

Ali Resool Tuama <[email protected]>
USB: quirks: add USB_QUIRK_WINDOWS_CONFIG_REQ_SIZE for GameSir G7 SE

Drobyshev Vladimir <[email protected]>
USB: cdc-acm: add VeriFone VX820 device ID

Orgad Shaneh <[email protected]>
usb: octeon-hcd: keep SOF interrupts while a pipe needs them

Orgad Shaneh <[email protected]>
usb: octeon-hcd: release the USB block when initialization fails

Danilo Krummrich <[email protected]>
usb: core: don't set drvdata to NULL in usb_unbind_interface()

Adam Harshbarger <[email protected]>
lib/plist: fix plist_requeue() corrupting order in the last bucket

Vincent Donnefort <[email protected]>
KVM: arm64: Prevent 64-bit overflow when computing hyp clock rate

Evgeny Akhtimirov <[email protected]>
ALSA: hda/realtek: Enable all four speaker amps on Lenovo ThinkBook X G2 IAH

Koichiro Den <[email protected]>
cxl/acpi: Convert QTG _DSM latencies to picoseconds

Koichiro Den <[email protected]>
cxl: Account for link width in latency calculation

Koichiro Den <[email protected]>
cxl/port: Convert PCIe link latency to nanoseconds

Guixin Liu <[email protected]>
cxl/pci: Program the Port GPF timeouts before caching the DVSEC

Guixin Liu <[email protected]>
cxl/pci: Use the Device GPF DVSEC for restricted endpoints

Dave Jiang <[email protected]>
cxl/port: Clear cached dport pointers when a dport is removed

Seongjun Hong <[email protected]>
vfio/mlx5: Fix boundary check in set_report_output()

Xiaofeng Yuan <[email protected]>
RISC-V: KVM: Fix IPI delivery for out-of-order vcpu_id

Ross Lagerwall <[email protected]>
xen-blkfront: Fix IO race during unplug

Zongmin Zhou <[email protected]>
slimbus: messaging: fix leaked PM vote on tid allocation failure

Alexey Charkov <[email protected]>
nvmem: rockchip-otp: Serialize reads

Jianping Li <[email protected]>
misc: fastrpc: Allocate entire reserved memory for Audio PD in probe

Yifei Gao <[email protected]>
misc: fastrpc: fix double-free in fastrpc_map_attach() error path

Johan Hovold <[email protected]>
USB: serial: usb_wwan: fix urb leak on disconnect

Michael Wyraz <[email protected]>
USB: serial: option: add support for ASR 1286:4e3c modem

Reinhard Speyerer <[email protected]>
USB: serial: option: add Rolling Wireless RN947R

Johan Hovold <[email protected]>
USB: cdc-acm: fix urb leak on disconnect

Jiale Yao <[email protected]>
wifi: ath12k: validate MAC/PHY capability count before saving

Olivier Kaloudoff <[email protected]>
ALSA: usb-audio: Add mic resolution quirk for Logitech Webcam C200

Jesse Zhang <[email protected]>
drm/ttm: return an error when kmapping a BO without pages

Krzysztof Karas <[email protected]>
iommu/dma: Catch scatterlist length overflows

Wentao Liang <[email protected]>
xen-pciback: Fix pcistub_device ref leak in pcistub_get_gsi_from_sbdf()

Yehyeong Lee <[email protected]>
xen/pcifront: check that an AER callback exists before calling it

Wentao Liang <[email protected]>
xen/gntdev: Fix gntdev_dmabuf ref leak in dmabuf_exp_wait_released()

Koichiro Den <[email protected]>
xen/privcmd: Only claim ioreqs matching an ioeventfd

Myeonghun Pak <[email protected]>
soc: fsl: dpio: Free the IRQ before releasing the I/O object

Myeonghun Pak <[email protected]>
soc: fsl: dpio: Fix cleanup on IRQ registration failure

Wentao Liang <[email protected]>
soc: fsl: cpm1: tsa: Fix clock leak in tsa_of_parse_tdms()

Abdifatah Suruur <[email protected]>
xen/gntdev: prevent private mappings from becoming writable

Wentao Liang <[email protected]>
clk: imx: Fix clock reference leak in imx_obtain_fixed_clock_hw()

Wentao Liang <[email protected]>
clk: imx: Fix clock reference leak in imx_get_clk_hw_by_name()

Gregory Price <[email protected]>
mm/madvise: use vm_normal_folio_pmd() in cold/pageout PMD range

Gregory Price <[email protected]>
mm/mempolicy: use vm_normal_folio_pmd() in queue_folios_pmd()

Longlong Xia <[email protected]>
mm/zswap: enable zswap_ever_enabled in zswap_pool_create()

Ridong Chen <[email protected]>
mm/mglru: fix ineffective memory protection for non-kswapd reclaim

Ridong Chen <[email protected]>
mm/page_counter: avoid integer overflow in effective_protection()

Bingfang Guo <[email protected]>
mm/memcg: clear folio memcg after changing per memcg stats

Longlong Xia <[email protected]>
mm/zswap: publish the initial pool with list_add_rcu()

Jinmeng Zhou <[email protected]>
mm/hugetlb: fix subpool minimum reservation rollback

Anastasios Papagiannis <[email protected]>
mm/nommu: reject wrapping ranges in access_remote_vm()

Mike Rapoport (Microsoft) <[email protected]>
mm/execmem: free ROX cache chunks only when they span an entire vm area

Hui Zhu <[email protected]>
mm: memcg: reparent non-hierarchical lruvec stats on cgroup v2

Hui Zhu <[email protected]>
mm: memcg: skip the RCU lock when the memcg is not dying

Hui Zhu <[email protected]>
mm: workingset: use lruvec_page_state_local() to count lru pages

Hui Zhu <[email protected]>
mm: memcg: redirect stats updates of dying memcgs for all hierarchies

Luxiao Xu <[email protected]>
mm/memory: constrain generic_access_phys() to page boundary

Jinmeng Zhou <[email protected]>
mm/hugetlb: charge folios to the target mm's memcg

Yogesh Gaur <[email protected]>

    md: don't hand out the array before md_alloc() has added mddev->kobj

Samuel Holland <[email protected]>
riscv: cfi: Only write envcfg CSR when task is current

Samuel Holland <[email protected]>
riscv: cfi: Bounds check restore token before swap

Jake Labelle <[email protected]>
nilfs2: validate directory position after llseek in readdir

Jinjie Ruan <[email protected]>
ext4: fix out-of-bounds read in ext4_get_group_info()

Sergey Senozhatsky <[email protected]>
ext4: fix ABBA deadlock in ext4_rmdir()

Daejun Park <[email protected]>
ext4: don't report delalloc data as a hole on indirect-mapped inodes

Hemanth Selam <[email protected]>
ext4: skip extra isize expansion while unmounting

Daejun Park <[email protected]>
jbd2: don't advance j_fc_off before the buffer is recorded

guzebing <[email protected]>
ext4: reject delalloc to nodelalloc before applying remount options

Hsiu-Hsien Lee <[email protected]>
ext4: fix fast commit replay failing on a read-only mount

guzebing <[email protected]>
ext4: only update tune mount options when requested

Matthias Goergens <[email protected]>
fanotify: report names longer than NAME_MAX

Peter Ujfalusi <[email protected]>
ALSA: hda/hdmi: clamp sad_count in ELD proc write handler

Peter Ujfalusi <[email protected]>

    ALSA: hda/hdmi: clamp num_cvts against cvt_nids[] in hdmi_read_pin_conn

Daehyeon Ko <[email protected]>
crypto: algif_skcipher - rewind rounded output bytes

Matej Sochan <[email protected]>
ALSA: hda/realtek: Fix silent speakers on Lenovo Legion S7 15IMH05

Devin Wittmayer <[email protected]>
wifi: rtw89: usb: shorten the RX aggregation hold on RTL8922AU over USB 3

Tristan Madani <[email protected]>
wifi: rtw89: fix IE length passed to cfg80211_find_ie() in WoW AKM

Krzysztof Wilczyński <[email protected]>
PCI/sysfs: Pass the device name length in UTF-16 code units

Josef Bacik <[email protected]>
aoe: pull in the headers each received packet type reads

Pin-Hao Chen <[email protected]>
spi: stm32: fix double free of SRAM buffer on MDMA fallback

Wentao Liang <[email protected]>
clocksource/drivers/digicolor: Fix clk reference leak on request_irq failure

Wentao Liang <[email protected]>
clocksource/drivers/fttmr010: Fix clk reference leak in error paths

Linlin Yang <[email protected]>

    wifi: mt76: mt7996: fix PCI device reference leak in mt7996_pci_init_hif2()

Yi Cong <[email protected]>
wifi: mt76: mt792x: fix negative errno truncation in offload capability

Wentao Liang <[email protected]>
wifi: mt76: Fix of_node reference leak in mt76_get_rate_power_limits()

Jiale Yao <[email protected]>
wifi: mt76: mt7615: cancel reset work during unregister

Devin Wittmayer <[email protected]>
wifi: mt76: move the channel survey when the channel changes

Devin Wittmayer <[email protected]>
wifi: mt76: mt7925: cancel mlo_pm_work on the USB stop path

Devin Wittmayer <[email protected]>
wifi: mt76: take rcu_read_lock in the USB/SDIO tx completion path

Myeonghun Pak <[email protected]>
wifi: mt76: mt7615: restore DBDC state after ext PHY failure

Eason Lai <[email protected]>
wifi: mt76: fix memory leak in USB TX path

Eason Lai <[email protected]>
wifi: mt76: mt792x: fix UAF in SDIO TX path when out of memory

Mark Anthony Agarro <[email protected]>
wifi: mt76: mt7615: do not tear down BSS/STA state for monitor vifs

Mark Anthony Agarro <[email protected]>
wifi: mt76: mt76x02: validate TX-status rate index before mac80211 handoff

Fuad Tabba <[email protected]>
KVM: arm64: timers: Compute an offset-applied CVAL from the current count

Joseph Qi <[email protected]>
ocfs2: skip uninitialized lockres in ocfs2_mark_lockres_freeing()

Joseph Qi <[email protected]>
ocfs2: restrict OCFS2_INVALID_SLOT suballoc slot to system inodes

Karl Mehltretter <[email protected]>
fork: honor task_struct's declared alignment

Eric Biggers <[email protected]>
raid6: add missing vzeroupper to AVX-512 code

Eric Biggers <[email protected]>
raid6: add missing vzeroupper to AVX2 code

Eric Biggers <[email protected]>
xor: add missing vzeroupper to AVX code

Konstantin Khorenko <[email protected]>
selftests/core: fix unshare_test with large fs.nr_open

Joseph Qi <[email protected]>
ocfs2: free replay slots in ocfs2_recovery_exit()

Joseph Qi <[email protected]>
ocfs2: exit recovery thread on mount error path

Thorsten Blum <[email protected]>
init: fix early boot crash with bare hostname parameter

Zi Yan <[email protected]>
USB: gadgetfs: do not WARN about excessively large memory allocations

Michael Liang <[email protected]>
fault-inject: fix dentry leak

OGAWA Hirofumi <[email protected]>
fat: fix fat_ent_write() for reverting the value

DAI RENJIE <[email protected]>
resource: fix lost wakeup when waiting for a muxed region

Ackerley Tng <[email protected]>
mm: hugetlb: drop refcount before freeing on memcg charge failure

Ackerley Tng <[email protected]>
mm: hugetlb: return -ENOSPC on memcg charge failure

SJ Park <[email protected]>
mm/damon/sysfs: set next refresh jiffies per sysfs context

SJ Park <[email protected]>
mm/damon/core: copy nid for eligible_mem_bp damos quota goal commit

Karl Mehltretter <[email protected]>
mm/damon/core: keep the temporal tuner quota over an unmeasured PSI round

SJ Park <[email protected]>

    mm/damon/core: handle uninitialized damos_quota_goal->last_psi_total

SJ Park <[email protected]>
mm/damon/tests/core-kunit: test committing psi goal to psi goal

Qinyun Tan <[email protected]>
mm/list_lru: don't copy stale shrinker id from non-memcg-aware shrinkers

SJ Park <[email protected]>
mm/damon/core: handle extreme memory state in get_in_active_mem_bp()

SJ Park <[email protected]>
mm/damon/core: handle extreme memory state in get_node_memcg_used_bp()

SJ Park <[email protected]>
mm/damon/core: handle extreme memory state in damon_get_node_mem_bp()

SJ Park <[email protected]>

    mm/damon/vaddr: respect folio end for DAMOS_MIGRATE_{HOT,COLD}

SJ Park <[email protected]>
mm/damon/vaddr: respect folio end for DAMOS_STAT

SJ Park <[email protected]>
mm/damon/paddr: respect folio end for DAMOS actions except STAT

SJ Park <[email protected]>
mm/damon/paddr: respect folio end for DAMOS_STAT

SJ Park <[email protected]>
mm/damon/core: skip applying scheme if region split for quota fails

Zhiling Zou <[email protected]>
mm/page_table_check: skip zero pages

Kiryl Shutsemau (Meta) <[email protected]>
mm/huge_memory: do not touch frozen folios in deferred_split_isolate()

Joe Damato <[email protected]>
mm: memcontrol: raise MEMCG_MAX for charges that fail without reclaiming

Gregory Price <[email protected]>
mm/mempolicy: skip zone device folios when queueing folios

Gregory Price <[email protected]>
mm/madvise: skip zone device folios in cold/pageout PMD range

Gregory Price <[email protected]>
mm/huge_memory: skip zone device folios in madvise_free_huge_pmd()

Gregory Price <[email protected]>
mm/mempolicy: take a cpuset cookie for the interleave node count

Rik van Riel <[email protected]>
mm/memcontrol: fix stuck FLUSHING_CACHED_CHARGE bit on isolated cpus

Hao Jia <[email protected]>
zram: fix idle age_sec underflow in idle_store()

Qi Xi <[email protected]>
mm/page_isolation: guard compound_order() against racing

Qi Xi <[email protected]>
mm/page_isolation: fix UBSAN shift-out-of-bounds warning

Jiayuan Chen <[email protected]>
mm/memcontrol: fix data-race on reading jiffies_64

Chengfeng Ye <[email protected]>
mm/ksm: mark migration stores with WRITE_ONCE()

Nathan Chancellor <[email protected]>
wifi: brcmsmac: Adjust txpwrindex value in nphy_ipa_rxcal_gaintbl_2GHz

Darrick J. Wong <[email protected]>
xfs: cross-reference the primary superblock

Priyank Rathod <[email protected]>
PCI/AER: Fix memory leak in aer_recover_queue() on kfifo buffer overflow

Donggeun Yoo <[email protected]>
PCI/DOE: Fix double free of a duplicate feature's sysfs name

Eric Dumazet <[email protected]>
dlm: fix send buffer backpressure handling

Tommaso Merciai <[email protected]>
dmaengine: sh: rz-dmac: Fix off-by-one in residue lmdesc lookup

Denis Efremov (Oracle) <[email protected]>
floppy: return the drive state flags from the 32-bit FDGETDRVSTAT

Denis Efremov (Oracle) <[email protected]>
floppy: don't store a stack buffer in timeout_message

Diego Fernando Mancera Gomez <[email protected]>
dmaengine: loongson2-apb-cmc: fix descriptor leak in prep_slave_sg()

Myeonghun Pak <[email protected]>
ASoC: codecs: rt5682s: disable jack detection work on shutdown

Myeonghun Pak <[email protected]>
ASoC: stm: stm32_i2s: request IRQ after regmap initialization

Darrick J. Wong <[email protected]>
xfarray: don't crash when sorting if array element crosses a folio

Chuck Lever <[email protected]>
svcrdma: Grant credits from the clamped sc_max_requests

Runyu Xiao <[email protected]>
perf: xgene: initialize lock before requesting IRQ

Karl Mehltretter <[email protected]>
spi: atmel-quadspi: balance runtime PM and pclk across system sleep

Linus Walleij <[email protected]>
power: supply: ab8500_fg: Report sub-percent charge changes

Linus Walleij <[email protected]>
power: supply: ab8500_fg: Accept status from supplied power

Henrik Enquist <[email protected]>
ALSA: aloop: Don't constrain playback params in notify mode

Andrey Albershteyn <[email protected]>
fsverity: hoist statx reporting of fs-verity flag

Wentao Liang <[email protected]>
power: supply: ltc2941: Fix of_node reference leak in ltc294x_i2c_probe()

Maurizio Casciano <[email protected]>
power: supply: core: Honor supplied-from with CONFIG_OF=y

Tharit Tangkijwanichakul <[email protected]>
media: hantro: disable runtime PM before hardware teardown

Jiawen Liu <[email protected]>
media: amphion: fix runtime PM imbalance on probe failure

Tharit Tangkijwanichakul <[email protected]>
media: hantro: release runtime resources when device_run fails

Tharit Tangkijwanichakul <[email protected]>
media: hantro: Harden MPEG-2 control access against NULL

Junrui Luo <[email protected]>
media: vicodec: fix NULL deref on oversized frame

Pengpeng Hou <[email protected]>
media: mediatek: jpeg: retry HW selection after successful wait

Michail Tatas <[email protected]>
media: verisilicon: rockchip: Fix leaks in init

Kazuki Hanai <[email protected]>
media: mediatek: jpeg: Avoid context access after job finish

Guangshuo Li <[email protected]>
media: mediatek: vpu: release reserved memory on remove

Guangshuo Li <[email protected]>
media: mediatek: vcodec: destroy core workqueue on remove

Guangshuo Li <[email protected]>
media: rkvdec: do not destroy borrowed SRAM pool

Wentao Liang <[email protected]>
media: mtk-jpeg: Fix runtime PM leak in mtk_jpegenc_worker()

Wentao Liang <[email protected]>
media: mtk-jpeg: Fix runtime PM leak in mtk_jpegdec_worker()

Wentao Liang <[email protected]>
media: platform: mtk-mdp3: Fix device reference leak in mdp_comp_init()

Fan Wu <[email protected]>
media: mediatek: vpu: free IRQ before destroying watchdog workqueue

Myeonghun Pak <[email protected]>
media: amphion: prevent unbind while video instances are open

Myeonghun Pak <[email protected]>
media: amphion: drain message work before releasing core state

John Keeping <[email protected]>
media: rockchip: rga: fix rotation on rev0 hardware

Michael Freidkin <[email protected]>
media: meson: vdec: size capture planes from the aligned canvas

Guangshuo Li <[email protected]>
media: chips-media: wave5: Check decoder qbuf runtime resume

Linmao Li <[email protected]>
media: chips-media: wave5: Balance runtime PM on encoder close errors

Linmao Li <[email protected]>
media: chips-media: wave5: Handle polling IRQ thread failure

Fan Wu <[email protected]>
media: rockchip: rga: quiesce IRQ before releasing m2m state

Runyu Xiao <[email protected]>
media: sti: delta: use unaligned accessors for MJPEG SOF fields

Nas Chung <[email protected]>
media: v4l2-common: Fix P010 format info

Thorsten Blum <[email protected]>
media: imagination: Fix value clamping in calculate_qp_tables

Karl Mehltretter <[email protected]>
KVM: arm64: vgic-v3: Roll back assignments from the new region

Sven Peter <[email protected]>
phy: apple: atc: Support DUMMY PIPEHANDLER state in configure_pipehandler

Alexey Klimov <[email protected]>
soc: samsung: exynos-pmu: fix error paths in cpuhotplug/idle states setup

Karl Mehltretter <[email protected]>
KVM: arm64: vgic-v3: Undo assignment on iodev registration failure

Kim Phillips <[email protected]>
x86/bugs: Fix CONFIG_MITIGATION_RETPOLINE=n mitigation reporting

Fuad Tabba <[email protected]>
KVM: arm64: Pin the host vCPU before adjusting its PC under pKVM

Fuad Tabba <[email protected]>
KVM: arm64: Validate the host vCPU's VM before reading it under pKVM

Fabio Estevam <[email protected]>
drm/panel: simple: Add Raystar RFF500F-AWH-DNN enable delay

Jérémy Jean <[email protected]>
crypto: ecc - Handle exceptional points in Shamir multiplication

Aldo Ariel Panzardo <[email protected]>
crypto: nx - validate 'ignore' before subtracting in decompress

Thorsten Blum <[email protected]>
hwrng: core - reject unknown RNG names

Thorsten Blum <[email protected]>
hwrng: ba431 - fix reported byte count

Thorsten Blum <[email protected]>
hwrng: amd - report partial reads in non-blocking mode

ZhaoJinming <[email protected]>
crypto: caam - fix double-free in caam_rsa_set_priv_key_form()

Eric Biggers <[email protected]>
crypto: sa2ul - Fix HMAC key preparation

Wei Jie Law <[email protected]>
media: uvcvideo: Fix NULL deref on events for uninitialized controls

Imre Kaloz <[email protected]>
PCI: Disable MSI for ULi M1575 EHCI controller

Anandu Krishnan E <[email protected]>
arm64: dts: qcom: shikra: Remove cdsp compute-cb@9

Runyu Xiao <[email protected]>
block: amiflop: synchronize flush timer before track flush

Vasileios Almpanis <[email protected]>
block: drop the cached plug time when blk_add_rq_to_plug() flushes

Danish Khateeb <[email protected]>
pps: generators: stop the generator on unregister

Vincent Donnefort <[email protected]>
KVM: arm64: Fix MMFR0 TGRAN advertisement for pVMs

Mikulas Patocka <[email protected]>
dm-writecache: fix REQ_FUA processing

Mikulas Patocka <[email protected]>
dm-writecache: fix uncommitted_blocks underflow

Mikulas Patocka <[email protected]>
dm-writecache: fix a crash if we attempt to use non-dax device

Mikulas Patocka <[email protected]>
dm-writecache: fix a quirk in statistics

Mikulas Patocka <[email protected]>
dm-writecache: report I/O error if flush failed

Mikulas Patocka <[email protected]>
dm: fix a bug in dm_accept_partial_bio

Christopher Snowhill <[email protected]>
media: em28xx: fix inverted tuner capability check for VBI device

Kaho Jiang <[email protected]>
media: em28xx: fix double free in em28xx_alloc_urbs

Ginger Li <[email protected]>
media: exynos4-is: Fix a race between s_stream(0) and the interrupt handler

Guangshuo Li <[email protected]>
media: rtl28xxu: fix SDR platform device leak

Wentao Liang <[email protected]>
media: pvrusb2: Fix USB parent device leak in class_dev_create()

Guangshuo Li <[email protected]>
media: tw686x: fix V4L2 device lifetime on probe failure

Linus Walleij <[email protected]>
media: mali-c55: Ignore disconnected queues when checking readiness

David Carlier <[email protected]>
media: mali-c55: Check the statistics buffer address before filling

David Carlier <[email protected]>
media: mali-c55: Check the parameters buffer address before copying

David Carlier <[email protected]>
media: mali-c55: Free the ISP control handler on unregister

Pengpeng Hou <[email protected]>
media: mali-c55: fail power-on when safe stop times out

David Carlier <[email protected]>
media: v4l2-isp: reject zero-sized parameter blocks

Myeonghun Pak <[email protected]>
media: renesas: rzv2h-ivc: manage runtime PM with devres

Arnd Bergmann <[email protected]>
media: mali-c55: add padding to mali_c55_params_ccm structure

Tianchu Chen <[email protected]>
staging: rtl8723bs: fix RX buffer OOB write from device-reported length

Johan Hovold <[email protected]>
staging: greybus: uart: fix racy TIOCMIWAIT implementation

Wentao Liang <[email protected]>
drm/msm/dsi: Fix VM leak in dsi_tx_buf_alloc_6g()

Krzysztof Kozlowski <[email protected]>
drm/msm/hdmi_bridge: Correct poweroff/audio cleanup order in post_disable

Krzysztof Kozlowski <[email protected]>
drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable()

Krzysztof Kozlowski <[email protected]>
drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure

Fan Wu <[email protected]>
i3c: master: adi: free the IRQ before unregistering the master

Franz Schnyder <[email protected]>
arm64: dts: freescale: imx95-aquila: Enable I2C_3_DSI1 on Clover board

Runyu Xiao <[email protected]>
IB/hfi1: Shutdown self-rearming timers before freeing

Alexander Sverdlin <[email protected]>
pwm: tiehrpwm: Clear period on disable to allow reconfiguration

Ryusuke Konishi <[email protected]>
nilfs2: ignore non-fatal signals during synchronous log write wait

Li RongQing <[email protected]>
vfio/pci: Restore 8-byte ioeventfd support

Anirudh Srinivasan <[email protected]>
clk: tenstorrent: Fix refcount leak on shared gate clk enable failure

Aamir Ahmed <[email protected]>
clk: tenstorrent: Assign .num before accessing .hws

Ryusuke Konishi <[email protected]>
nilfs2: clear dirty flag on bdev buffers on log write failure

Runyu Xiao <[email protected]>
ASoC: pcm6240: do not free an unrequested IRQ

Gaurav Batra <[email protected]>
powerpc/pseries/iommu: Add TCEs for 16GB pages when RAM is pre-mapped

Srish Srinivasan <[email protected]>
pseries/plpks: hide wrapping_features when unsupported

Srish Srinivasan <[email protected]>
pseries/plpks: fix self-reference in plpks_var initializer

Srish Srinivasan <[email protected]>
pseries/plpks: clear SED key data after use

Srish Srinivasan <[email protected]>
pseries/plpks: clear signed update authentication buffer

Srish Srinivasan <[email protected]>
pseries/plpks: clear sensitive buffers in wrapping operations

Srish Srinivasan <[email protected]>
pseries/plpks: clear sensitive PLPKS buffers

Srish Srinivasan <[email protected]>
pseries/plpks: validate input to plpks_signed_update_var()

Srish Srinivasan <[email protected]>
pseries/plpks: fix error code for wrapping key reads

Srish Srinivasan <[email protected]>
pseries/plpks: fix error handling in plpks_read_var()

Abhishek Dubey <[email protected]>
powerpc/bpf: fix alignment of long branch trampoline address

Abhishek Dubey <[email protected]>
powerpc/bpf: fix buffer overflow in JIT for large BPF programs

Abhishek Dubey <[email protected]>
powerpc64/bpf: fix percpu private stack leak on JIT failure

Wentao Liang <[email protected]>
clk: starfive: jh7110-isp: fix refcount leak in jh7110_ispcrg_probe()

Takashi Iwai <[email protected]>
ALSA: core: Check shutdown flag at D0 power-state, too

Runyu Xiao <[email protected]>
m68k: dmasound: Keep the Q40 IRQ handler registered

Runyu Xiao <[email protected]>
ALSA: sgio2audio: Only free successfully requested IRQs

Vishnu Reddy <[email protected]>
media: iris: Fix frame interval enumeration for non-divisor framerates

Vishnu Reddy <[email protected]>
media: iris: Fix power-off ordering to disable power domain after clocks

Vishnu Reddy <[email protected]>
media: iris: Fix bus_info prefix in VIDIOC_QUERYCAP

Vishnu Reddy <[email protected]>
media: iris: Fix iova allocation from restrict region

Vishnu Reddy <[email protected]>
media: iris: avoid bit depth validation for capture formats

Vikash Garodia <[email protected]>
media: iris: reset AHB bridge before enabling HW mode

Vishnu Reddy <[email protected]>
media: venus: Fix iova allocation from restrict region

Hans de Goede <[email protected]>
media: qcom: camss: Add "gcc_axi_hf" to 8775p VFE lite clock lists

Hitesh Patel <[email protected]>
media: qcom: camss: vfe: Fix VFE reset while another line is streaming

Hitesh Patel <[email protected]>
media: qcom: camss: vfe-17x: Fix write master selection for RDI lines

Hitesh Patel <[email protected]>
media: qcom: camss: vfe-17x: Fix write master buffer done being dropped

Danish Khateeb <[email protected]>
ALSA: timer: Handle userspace-driven timer ioctls from 32-bit tasks

Jiale Yao <[email protected]>
cxl/acpi: Check ACPI companion before use

Michael Bommarito <[email protected]>
fs/ntfs3: reject an oversized resident attribute on the inline iomap path

Ibrahim Hashimov <[email protected]>
fs/ntfs3: fix integer overflow in find_log_rec() causing OOB read

Lucas Costa <[email protected]>
spi: bcm2835: fix device_node reference leak in bcm2835_spi_setup()

Rupesh Majhi <[email protected]>
iio: pressure: dps310: fix CFG_REG bit definitions

Cheick Traore <[email protected]>
iio: adc: stm32: fix minimum sampling time values

Ariana Lazar <[email protected]>
iio: dac: mcp47feb02: Avoid unjustified probe error on missing label

Jiale Yao <[email protected]>
iio: accel: sca3000: reject devices without match data

Jiale Yao <[email protected]>
iio: accel: adxl380: reject devices without match data

Jiale Yao <[email protected]>
iio: accel: adxl372: reject devices without match data

Jiale Yao <[email protected]>
iio: accel: adxl313: reject devices without match data

Jiale Yao <[email protected]>
iio: adc: ti-ads7950: validate SPI match data

Jiale Yao <[email protected]>
iio: adc: ti-ads131m02: reject devices without match data

Jiale Yao <[email protected]>
iio: adc: ti-ads1018: reject devices without match data

Jiale Yao <[email protected]>
iio: adc: ti-adc128s052: validate SPI match data

Jiale Yao <[email protected]>
iio: adc: mcp3911: reject devices without match data

Jiale Yao <[email protected]>
iio: adc: max11205: reject devices without match data

Jiale Yao <[email protected]>
iio: adc: ad7768-1: reject devices without match data

Jiale Yao <[email protected]>
iio: adc: ad7606: reject devices without match data

Jiale Yao <[email protected]>
iio: adc: ad7192: reject devices without match data

Jiale Yao <[email protected]>
iio: pressure: bmp280: validate SPI match data

Jiale Yao <[email protected]>
iio: potentiometer: x9250: reject devices without match data

Jiale Yao <[email protected]>
iio: imu: adis16400: validate SPI match data

Jiale Yao <[email protected]>
iio: frequency: adf4377: reject devices without match data

Jiale Yao <[email protected]>
iio: dac: mcp4821: reject devices without match data

Jiale Yao <[email protected]>
iio: dac: ad5755: validate SPI match data

Jiale Yao <[email protected]>
iio: amplifiers: ad8366: reject devices without match data

Antoniu Miclaus <[email protected]>
iio: adc: ad4080: enable address ascension for chip identification

Wentao Liang <[email protected]>
ASoC: codecs: wcd9335: Fix SLIM interface device leak in wcd9335_slim_status()

Runyu Xiao <[email protected]>
ALSA: mpu401: shut down timer before freeing MPU

Karl Mehltretter <[email protected]>
fuse: fix GCC 8 build with CONFIG_PROFILE_ALL_BRANCHES

Lu Baolu <[email protected]>
iommu/vt-d: Avoid out-of-range shift in qi_desc_dev_iotlb_pasid()

Kathiravan Thirumoorthy <[email protected]>
arm64: dts: qcom: ipq9574: Wire up USB3 PHY PIPE clock to GCC

David Heidelberg <[email protected]>
arm64: dts: qcom: sdm845-xiaomi-polaris: Extend the xbl_mem region

David Heidelberg <[email protected]>
arm64: dts: qcom: sdm845-xiaomi-beryllium: Extend the xbl_mem region

Piotr Kubik <[email protected]>
netfilter: ctnetlink: fix inverted IPv6 address match in dump filter

Orgad Shaneh <[email protected]>
MIPS: mm: do not write a huge TLB entry when the probe misses

Orgad Shaneh <[email protected]>
MIPS: mm: align hugetlb mappings in arch_get_unmapped_area()

Tom Verdonck <[email protected]>
hwmon: (tmp108) Fix jiffies wraparound in conversion-ready check

Tom Verdonck <[email protected]>
hwmon: (tmp102) Fix jiffies wraparound in conversion-ready check

Runyu Xiao <[email protected]>
peci: npcm: Initialize state before requesting IRQ

Runyu Xiao <[email protected]>
peci: aspeed: Initialize state before requesting IRQ

Ma Ke <[email protected]>
ASoC: wcd9335: Fix device reference leak in wcd9335_slim_status()

David Cemin <[email protected]>
ASoC: sdw_utils: clear stale RT711 device reference on exit

Breno Leitao <[email protected]>
dcache: report a Tasks-RCU quiescent state in dentry_kill()

Ricardo Neri <[email protected]>
hwmon: (coretemp) Refresh the temperature on the first read

Richard Weinberger <[email protected]>
mtd: Call get_wunit() on the master partition

Wentao Liang <[email protected]>
mtd: mtdsuper: Fix MTD device reference leak in mtd_get_sb()

Wentao Liang <[email protected]>
mtd: maps: l440gx: Fix double put of the PM device in init_l440gx()

Wentao Liang <[email protected]>
mtd: maps: l440gx: Fix double put of the ISA bridge in init_l440gx()

Wentao Liang <[email protected]>
mtd: amd76xrom: Fix PCI device reference leak in amd76xrom_init_one()

Orgad Shaneh <[email protected]>
mtd: cfi_cmdset_0002: cap the write-buffer chunk at 256 bytes on an x8 device

Myeonghun Pak <[email protected]>
mtd: maps: pci: balance PCI enable on cleanup

Wentao Liang <[email protected]>
mtd: rawnand: atmel: Fix MCK clock leak in atmel_nand_controller_init()

Guangshuo Li <[email protected]>
mtd: rawnand: nuvoton: fix clock cleanup on probe failure

Michael J. Ruhl <[email protected]>
platform/x86/intel/pmt: Block mmap when callback is present

Joanne Koong <[email protected]>
fuse: don't drop destination page cache on a zero byte copy reply

Joanne Koong <[email protected]>
fuse: don't shorten the folio descriptor at LLONG_MAX

Ridham Khurana <[email protected]>
hwmon: (lm70) Fix rounding of negative temperatures

Ridham Khurana <[email protected]>
hwmon: (lm95245) Fix negative temperature conversion

Wentao Liang <[email protected]>
regulator: core: Fix coupled regulators reference leak on removal

Wei-Lin Chang <[email protected]>
KVM: arm64: ptdump: Fix shadow ptdump sleep-in-atomic-context problem

Wei-Lin Chang <[email protected]>
KVM: arm64: ptdump: Check the page tables aren't freed when accessing

Aamir Ahmed <[email protected]>
clk: mvebu: ap-cpu-clk: Assign .num before accessing .hws

Junjie Cao <[email protected]>
ASoC: rt712-sdca-dmic: fix drvdata type in the gain controls

Guangshuo Li <[email protected]>
ASoC: Intel: atom: Fix platform device leak on probe failure

Jiacheng Xu <[email protected]>
kobject: fix out-of-bounds access in kobject_action_type()

Ryusuke Konishi <[email protected]>
nilfs2: fix deadlock between nilfs_evict_inode() and find_inode()

Tiezhu Yang <[email protected]>
perf loongarch: Fix discarded const qualifier in _get_field()

Lin Wang <[email protected]>
hwmon: (k10temp) Stop matching Hygon devices

Myeonghun Pak <[email protected]>
mfd: twl-core: Unregister the auxiliary platform device on unbind

David Heidelberg <[email protected]>
mfd: wcd934x: Fix NULL pointer dereference on IRQ probe deferral

David Heidelberg <[email protected]>
mfd: wcd934x: set DMA mask on parent to silence "DMA mask not set"

David Heidelberg <[email protected]>
mfd: Fix MAX77705 dependency on regmap

Hongyan Xu <[email protected]>
mfd: da903x: Cancel IRQ work during teardown

Casey Connolly <[email protected]>
drm/panel: ebbg-ft8719: Set prepare_prev_first

Gabor Juhos <[email protected]>
clk: qcom: gcc-ipq5018: mark 'gpll0_main' clock as critical

Francesco Dolcini <[email protected]>
arm64: dts: freescale: imx95-toradex-smarc: enable Wi-Fi SD interface

Francesco Dolcini <[email protected]>
arm64: dts: freescale: imx8mp-verdin-yavia: fix external GPIOs

Francesco Dolcini <[email protected]>
arm64: dts: freescale: imx8mp-toradex-smarc: fix SMARC_SLEEP# gpio-line-names typo

Francesco Dolcini <[email protected]>
arm64: dts: freescale: imx95-aquila: fix gpio-line-names padding

Francesco Dolcini <[email protected]>
arm64: dts: freescale: imx8mp-verdin-ivy: fix DIGI_1/DIGI_2 gpio-line-names

Francesco Dolcini <[email protected]>
arm64: dts: freescale: imx8mm-verdin-ivy: fix DIGI_1/DIGI_2 gpio-line-names

Diego Fernando Mancera Gomez <[email protected]>
memory: stm32_omm: fix child clock leak on set_amcr() error path

Myeonghun Pak <[email protected]>
ASoC: fsl_xcvr: free IRQ before canceling reset work

Guangshuo Li <[email protected]>
media: atmel-isi: release unregistered video device on remove

Guangshuo Li <[email protected]>
media: i2c: ov5647: fix power cleanup on remove

Lucas Sinn <[email protected]>
media: synopsys: hdmirx: fetch colordepth before calculating pixelclock

Wentao Liang <[email protected]>
media: vpif_display: Fix i2c adapter reference leak in vpif_probe()

Wentao Liang <[email protected]>
media: vpif_capture: Fix i2c adapter reference leak in vpif_probe()

Wentao Liang <[email protected]>
media: au0828: Fix media device leak in au0828_usb_probe()

Runyu Xiao <[email protected]>
media: adv7180: Initialize mutex before ancillary clients

Myeonghun Pak <[email protected]>
media: tw68: balance PCI enable on cleanup

Myeonghun Pak <[email protected]>
media: cx18: Disable PCI device on probe failure

Myeonghun Pak <[email protected]>
media: go7007: unregister the I2C adapter on USB probe failure

Myeonghun Pak <[email protected]>
media: marvell: manage the MMP camera clock provider

Ruoyu Wang <[email protected]>
media: adv748x: Fix endpoint reference leaks on probe failure

Rohinthan P <[email protected]>

    media: v4l2-ctrls: do nothing if controls[0] == NULL in cluster functions

Pengpeng Hou <[email protected]>
media: cec: extron: clear response tail before dispatch

Karl Mehltretter <[email protected]>
crypto: qat - zero the VF migration state buffer on save

Weili Qian <[email protected]>
crypto: hisilicon/hpre - fix GFP flags for dma_alloc_coherent

Weili Qian <[email protected]>
crypto: hisilicon/hpre - fix ECDH destination DMA mapping

Weili Qian <[email protected]>
crypto: hisilicon/hpre - return -EOVERFLOW for small ECDH output buffer

Weili Qian <[email protected]>
crypto: hisilicon/hpre - fix pointer dereference before length check

Mohamad Raizudeen <[email protected]>
crypto: amlogic - Fix IRQ handler return value and fallthrough logic

Suman Kumar Chakraborty <[email protected]>
crypto: qat - fix error source for QAT GEN6 transmit interface faults

Yuchao Zhang <[email protected]>
md: validate bblog_size when loading v1.x badblocks metadata

Wentao Liang <[email protected]>
EDAC/i10nm: Fix mdev reference leak in i10nm_get_ddr_munits()

Aldo Ariel Panzardo <[email protected]>
nilfs2: fix checkpoint root lifetime on sysfs errors

Wentao Guan <[email protected]>
cpufreq/amd-pstate: Skip auto_sel write when it already matches the mode

Wentao Liang <[email protected]>
drm/mali-dp: Fix runtime PM leak in malidp_crtc_atomic_enable()

Francesco Dolcini <[email protected]>
arm64: dts: ti: k3-am62p5-verdin: build zinnia dtbs

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62x-phyboard-lyra: Set SD clock pin as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am625-var-som: Set MMC clock pins as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am625-var-som-symphony: Set SD clock pins as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am625-tqma62xx: Set MMC clock pins as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62-phycore-som: Set eMMC clock pin as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am625-sk-common: Set eMMC clock pin as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62x-sk-common: Set SD clock pin as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am625-beagleplay: Set MMC clock pins as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62-pocketbeagle2: Set SD clock pin as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62-lp-sk: Set eMMC clock pins as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62a-phycore-som: Set eMMC clock pin as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62a7-sk: Set SD clock pin as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62a7-sk: Set eMMC clock pin as OUTPUT

Judith Mendez <[email protected]>
arm64: dts: ti: k3-am62a: Fix MMC0_CLK register address

Wentao Liang <[email protected]>
ASoC: ti: davinci-mcasp: Fix runtime PM imbalance in __davinci_mcasp_set_clkdiv()

Sean Young <[email protected]>
media: meson-ir-tx: Prevent divide by zero in meson_irtx_prepare_pulse()

Sean Young <[email protected]>
media: ir_toy: Validate the maximum tx carrier

Sean Young <[email protected]>
media: serial_ir: Fix race condition where timer can be re-armed

Sean Young <[email protected]>
media: ene_ir: Ensure teardown is done in the correct order

Myeonghun Pak <[email protected]>
leds: ktd2692: Pass context to regulator cleanup

Cong Nguyen <[email protected]>
staging: media: imx: csc-scaler: fix ipu_image_convert_run leak on queue error

Hui Peng <[email protected]>

    seccomp: restore knotif->state when SECCOMP_ADDFD_FLAG_SEND is interrupted

Oleg Nesterov <[email protected]>
signalfd: don't dequeue the forced fatal signals

Adrian Hunter <[email protected]>
i3c: mipi-i3c-hci-pci: Set drvdata before creating LTR sysfs attribute

Adrian Hunter <[email protected]>
i3c: mipi-i3c-hci: Bounce short reads irrespective of the IOMMU

Adrian Hunter <[email protected]>
i3c: master: Fix out-of-bounds read in DMA bounce buffer setup

Runyu Xiao <[email protected]>
PCI: pciehp: Make 'pciehp_poll_mode' parameter read-only

Hui Peng <[email protected]>
ata: libata-scsi: abort multi-sector pass-through commands when multi_count is 0

Tsz Shan Chan <[email protected]>
iio: light: apds9306: fix default sampling frequency definition

Jean-Baptiste Maneyrol <[email protected]>
iio: imu: inv_icm42600: force accel odr change when switching power mode

Shehryar Ahmad <[email protected]>
iio: accel: adis16201: fix channel order for buffer mode

Ariana Lazar <[email protected]>
iio: dac: mcp47feb02: Increase EEPROM Programming Write Cycle Time

Ariana Lazar <[email protected]>
iio: dac: mcp47feb02: Return len when disabling EEPROM store

Ariana Lazar <[email protected]>
iio: dac: mcp47feb02: Fix gain field initialization for active channels

Ariana Lazar <[email protected]>
iio: dac: mcp47feb02: initialize dac_data field in channel data struct at probe

Wentao Liang <[email protected]>
regulator: rt6190: Fix runtime PM imbalance in rt6190_out_enable()

Karl Mehltretter <[email protected]>
fpga: Fix of_fpga_mgr_get() reference in fpga_mgr_lock() docs

Wentao Liang <[email protected]>
ASoC: codecs: wm8994: Fix runtime PM leak in wm8994_mic_detect()

Christian Loehle <[email protected]>
cpufreq: CPPC: Create the FIE worker before enabling PCC callbacks

Christian Loehle <[email protected]>
ACPI: CPPC: Propagate errors from cross-CPU FFH calls

Guangshuo Li <[email protected]>
crypto: omap-sham - fix crypto engine cleanup

Guangshuo Li <[email protected]>
crypto: omap-des - fix crypto engine cleanup

Thorsten Blum <[email protected]>
crypto: xilinx - clear AES key buffer before freeing it

Thorsten Blum <[email protected]>
crypto: zynqmp-sha - fix NULL pointer dereference in init_tfm

Maciej W. Rozycki <[email protected]>
PCI: Skip Target Speed quirk on clamped ports with no link

Wentao Liang <[email protected]>
regulator: core: Fix rdev reference leak in regulator_resolve_supply()

Wentao Liang <[email protected]>
regulator: core: Fix c_rdev reference leak in regulator_resolve_coupling()

Jiaming Zhang <[email protected]>
nilfs2: force clear dirty state when restoring from the shadow map

Shengming Hu <[email protected]>
cpufreq: conservative: Restrict deferred downscaling to low load

Johan Alvarado <[email protected]>

    spi: spi-qpic-snand: publish the ECC context to snandc->qspi

Sakari Ailus <[email protected]>
media: imx219: The horizontal blanking step is 8

Sakari Ailus <[email protected]>
media: imx219: Account for rate_factor in control steps

Sakari Ailus <[email protected]>
media: imx219: Account rate_factor in setting upper exposure limit

Junjie Cao <[email protected]>
media: i2c: cvs: Get the wake IRQ without claiming the GPIO

Thomas Zimmermann <[email protected]>
drm/panic: Test address from kmap op for NULL

Thomas Zimmermann <[email protected]>
drm/panic: Do not use un-escaped URL as format string

Martin Wilck <[email protected]>
md/raid5: validate payload size before calculating payload_len

Cao Guanghui <[email protected]>
md/raid5: fix NULL pointer dereference in raid5_free_percpu

Cao Guanghui <[email protected]>
md/raid5: track disks array size to fix extra_page leak on error paths

Guangshuo Li <[email protected]>
iio: adc: at91-sama5d2: disable autosuspend on remove

Guangshuo Li <[email protected]>
iio: accel: mma9553: disable autosuspend on remove

Guangshuo Li <[email protected]>
iio: accel: mma9551: disable autosuspend on remove

Guangshuo Li <[email protected]>
iio: accel: kxcjk-1013: Disable autosuspend on remove

Wentao Liang <[email protected]>
ASoC: arizona-jack: Fix runtime PM imbalance in arizona_start_hpdet_acc_id()

Wentao Liang <[email protected]>
ASoC: wm8994: Fix runtime PM imbalance in wm8994_component_probe()

Liu Chao <[email protected]>
usb: fotg210: validate endpoint index in ep0 handlers

Karl Mehltretter <[email protected]>
crypto: atmel-tdes - sync output bounce buffer before DMA

Yousef Alhouseen <[email protected]>
ntfs3: bound index head insertions by buffer capacity

Yousef Alhouseen <[email protected]>
ntfs3: reject empty iomap before reading its LCN

Muhammad Bilal <[email protected]>
platform/x86: hp-bioscfg: fix slab-out-of-bounds write in hp_convert_hexstr_to_str()

Guangshuo Li <[email protected]>
media: i2c: ov2735: fix power cleanup on remove

Guangshuo Li <[email protected]>
media: i2c: og01a1b: power off sensor on remove

Guangshuo Li <[email protected]>
media: i2c: alvium-csi2: balance runtime PM usage count on remove

Niklas Cassel <[email protected]>
ata: libata: Do not leave ata_host_stop() registered when activation fails

Niklas Cassel <[email protected]>
ata: libahci: Free the IRQs when activating a multi-IRQ host fails

Niklas Cassel <[email protected]>
ata: ahci_st: Assert the power down reset in the probe() error path

Niklas Cassel <[email protected]>
ata: ahci_st: Do not ignore errors when getting the reset controls

Cosmin Tanislav <[email protected]>
pinctrl: renesas: rzt2h: Fix reading pin value in IRQ function

Cosmin Tanislav <[email protected]>
pinctrl: renesas: rzt2h: Setup IRQ in .irq_{request,release}_resources()

Cosmin Tanislav <[email protected]>
pinctrl: renesas: rzt2h: Restore correct pin mode on IRQ free

Ethan Nelson-Moore <[email protected]>
ata: sata_inic162x: remove dangerous broken driver

Guangshuo Li <[email protected]>
ACPI: SBS: Fix NULL pointer dereference on allocation failure

Chao Yu <[email protected]>
f2fs: compress: fix to handle race between truncate and writeback

Jiucheng Xu <[email protected]>
f2fs: force out-place update for all writes on compressed file

Daeho Jeong <[email protected]>
f2fs: drop pending discard commands before reserving device alias

Matthew Sakai <[email protected]>
dm vdo indexer: validate record page numbers better

Matthew Sakai <[email protected]>
dm vdo indexer: prevent delta list overflow on load

Kyle Zeng <[email protected]>
affs: validate blocks before freeing them

Joshua Crofts <[email protected]>
iio: adc: max14001: add missing MODULE_DEVICE_TABLE macro

Fabio Cesari <[email protected]>
iio: light: isl29028: fix runtime PM reference leak on error paths

Koichiro Den <[email protected]>
PCI: endpoint: pci-epf-vntb: Manage virtual NTB and PCI bus lifetime

Nicolin Chen <[email protected]>
iommu/arm-smmu-v3-iommufd: Reject unsupported bits in invalidation commands

Bradley Morgan <[email protected]>
PM: CPU: Restore synchronize_rcu() to cpu_pm_unregister_notifier()

Jiaming Zhang <[email protected]>
gfs2: reject invalid inode sizes

Runyu Xiao <[email protected]>
crypto: ccp - Initialize DBC ioctl mutex before registering device

Karl Mehltretter <[email protected]>
lib/842: require a complete history block for repeat templates

Karl Mehltretter <[email protected]>
lib/842: reject output overflows from index and short data

Karl Mehltretter <[email protected]>
crypto: atmel-aes - fix AADLENR for standalone GHASH

Karl Mehltretter <[email protected]>
crypto: atmel-tdes - zero-initialize device state

Junrui Luo <[email protected]>
media: vicodec: zero-initialize stateful decoder heap buffers

Fan Wu <[email protected]>
media: vivid: cancel svid ctrl work on release

Juan Perdomo <[email protected]>
media: cx231xx: preserve I2C transfer length

Maxim Skokov <[email protected]>
media: vivid: round the height down to the vertical subsampling factor

Lad Prabhakar <[email protected]>
PCI: rzg3s: Fix IRQ domain initialization error handling

Lad Prabhakar <[email protected]>
PCI: rzg3s: Propagate platform_get_irq_byname() errors

Lad Prabhakar <[email protected]>
PCI: rzg3s: Disable refclk on probe failure

Eric Kim <[email protected]>
sched/fair: Reset NUMA fault locality after scan period update

Jean-Baptiste Maneyrol <[email protected]>
iio: imu: inv_icm42600: fix odr change not caught in certain cases

Fan Wu <[email protected]>
power: supply: bq27xxx: Ensure poll work is cancelled on remove

Shengzhuo Wei <[email protected]>
power: supply: bq27xxx: synchronize work cancellation on suspend

Robin Snyders <[email protected]>
power: supply: qcom_smbx: notify battery overvoltage recovery

Robin Snyders <[email protected]>
power: supply: qcom_smbx: validate battery float voltage

Robin Snyders <[email protected]>
power: supply: qcom_smbx: fix float voltage selector

Robin Snyders <[email protected]>
power: supply: qcom_smbx: test battery health status bits

Robin Snyders <[email protected]>
power: supply: qcom_smbx: include base when petting watchdog

Runyu Xiao <[email protected]>
hte: tegra194-test: shut down timer before GPIO release

Karl Mehltretter <[email protected]>
ACPI: pfr_update: zero-initialize capability query result

Runyu Xiao <[email protected]>
dmaengine: altera-msgdma: initialize state before requesting IRQ

Damon Ding <[email protected]>
drm/bridge: analogix_dp: Restore mandatory samsung DP DT properties

Pengpeng Hou <[email protected]>
media: require two-byte Cypress type 04 records

Tharit Tangkijwanichakul <[email protected]>
media: v4l2-ctrls: default HEVC SPS chroma format to 4:2:0

Fan Wu <[email protected]>
media: nuvoton: npcm-video: quiesce VCD IRQ before teardown

Alexander Shiyan <[email protected]>
media: synopsys: hdmirx: use request_any_context_irq() for 5V detection IRQ

Greg Kroah-Hartman <[email protected]>

    media: stv0900: bound DiSEqC reply length to msg[] size

Greg Kroah-Hartman <[email protected]>

    media: stv090x: bound DiSEqC reply length to msg[] size

Greg Kroah-Hartman <[email protected]>
media: adv7604: avoid negative array index in log_status when cp_read fails

Cosmin Tanislav <[email protected]>
pinctrl: renesas: rzt2h: Fix used_irqs indexing in clear path

James Hilliard <[email protected]>
mtd: rawnand: sunxi: fix free OOB section offsets

James Hilliard <[email protected]>
mtd: rawnand: sunxi: reject ECC maximization on small pages

Myeonghun Pak <[email protected]>
media: stm32: csi: unregister async notifier on cleanup

Alain Volmat <[email protected]>
media: stm32: csi: correct remote pad retrieval

Balakrishnan Sambath <[email protected]>
media: microchip-isc: don't sleep in the clk .is_enabled callback

Balakrishnan Sambath <[email protected]>
media: microchip-isc: fix PM runtime leak in AWB work handler

Balakrishnan Sambath <[email protected]>
media: microchip-isc: do not touch WB registers when not streaming

Balakrishnan Sambath <[email protected]>
media: microchip-isc: disable histogram and flush AWB work on teardown

Balakrishnan Sambath <[email protected]>
media: microchip-isc: synchronize the IRQ before disabling clocks on stop

Balakrishnan Sambath <[email protected]>
media: microchip-isc: fix awb_mutex and lock lifecycle

Wang Yan <[email protected]>
perf powerpc-vpadtl: Fix off-by-one in auxtrace_info minimum size check

Srinivas Kandagatla <[email protected]>
ASoC: codecs: lpass-wsa-macro: use v2.5 Compander1 addresses on v2.5+

Stanislaw Gruszka <[email protected]>
wifi: mac80211: queue frames while off-channel

Xu Rao <[email protected]>
media: m2m-deinterlace: fix default capture field

Punnay Sharma <[email protected]>
staging: media: av7110: fix sp8870 initialization failure state

Punnay Sharma <[email protected]>
staging: media: av7110: fix corrupted BER reporting in sp8870

Julian Braha <[email protected]>
media: marvell-cam: fix unmet dependency for VIDEO_MMP_CAMERA

Jeffin Philip <[email protected]>
media: vidtv: fix uaf in vidtv_bridge_on_new_pkts_avail

Piyush Patle <[email protected]>
media: vidtv: fix frontend reference leak on unbind

Junrui Luo <[email protected]>
media: vicodec: make encoder CAPTURE dimensions read-only

Junrui Luo <[email protected]>
media: vicodec: fix out-of-bounds write on under-rounded coded dimensions

Faizel K B <[email protected]>
media: vimc: sensor: fix pixel_rate type to resolve do_div() warning

Younho Choi <[email protected]>
media: vim2m: keep transaction buffer count stable while streaming

Runyu Xiao <[email protected]>
media: saa7146: Initialize interrupt lock before requesting IRQ

Shengzhuo Wei <[email protected]>
media: go7007: bound EZ-USB I2C transfers to the usb_buf size

Linkai Gong <[email protected]>
media: i2c: tc358743: add missing color-space strings

Ruoyu Wang <[email protected]>
media: au0828: Free URBs when starting DVB streaming fails

Takashi Sakamoto <[email protected]>
firewire: core: fix source bus ID detection for AT context in big-endian systems

Andi Shyti <[email protected]>
media: cx231xx: Fix cleanup path on failure

Fan Wu <[email protected]>
media: cx231xx-audio: drain wq_trigger before audio fini

Linkai Gong <[email protected]>
media: pci: hws: only init channels the device actually has

Hao-Qun Huang <[email protected]>
media: hws: Wait for IRQ handler before returning buffers

Ben Hoff <[email protected]>
media: hws: report measured colorimetry

Andrea Pesaresi <[email protected]>
arm64: dts: mediatek: mt7986: correct timer frequency

Baolin Liu <[email protected]>
isofs: fix Rock Ridge CE extent validation on multisession media

GUO Ren (XuanTie) <[email protected]>
riscv: dts: spacemit: k3: fix IMSIC num-guest-ids

Rosen Penev <[email protected]>
mtd: rawnand: ndfc: use devm_platform_ioremap_resource()

Thorsten Blum <[email protected]>

    thermal: intel: int340x: Fix temperature selection around 0 C

Thorsten Blum <[email protected]>
thermal: intel: powerclamp: Reject invalid window_size values

Francesco Dolcini <[email protected]>
arm64: dts: ti: k3-am62-verdin: Set MMC clock pins as OUTPUT

Amir Goldstein <[email protected]>
fs: make sure to call fsnotify_inoderemove() only once when inode is dead

Karl Mehltretter <[email protected]>
fs_pin: publish pins with RCU list helpers

Miquel Raynal <[email protected]>
mtd: spi-nor: Unprepare legacy controllers upon RWW wait interruption

HyeongJun An <[email protected]>
mtd: spi-nor: sfdp: check the length of the SCCR map

HyeongJun An <[email protected]>
mtd: spi-nor: sfdp: check the length of the xSPI Profile 1.0 table

Marek Vasut <[email protected]>
PCI: rcar-gen4: Limit Max_Read_Request_Size to 256 Bytes

Serin Yeh <[email protected]>
media: i2c: ov8856: fix debug message to report actual CSI-2 lane count

Serin Yeh <[email protected]>
media: i2c: ov8856 : remove ACPI node bypass mechanism

Abdun Nihaal <[email protected]>
wifi: ath11k: Fix possible memory leak in ath11k_dp_srng_setup()

Ricardo Ribalda <[email protected]>
clk: mediatek: Add missing depend for COMMON_CLK_MT8173

David Heidelberg <[email protected]>
arm64: dts: qcom: sdm845-google: Set i2c3 frequency to 400 kHz

Antti Laakso <[email protected]>
media: i2c: cvs: Add sensor node in bound callback

Runyu Xiao <[email protected]>
hte: tegra194: Initialize slice locks before registering chip

Yuan Chen <[email protected]>
bpf: Fix queue/stack map u32 index overflow

Yo'av Moshe <[email protected]>
ARM: imx: Fix suspend/resume crash with Clang CFI

hanzhijian <[email protected]>
clk: mstar: msc313-mpll: fix off-by-one in clock array allocation

Hans de Goede <[email protected]>
platform/x86: int3472: Increase handshake GPIO delay to 200 ms

Sakari Ailus <[email protected]>
platform/x86: int3472: Fix uninitialised variable warning

Laxman Acharya Padhya <[email protected]>
wifi: rtw89: cap firmware section_num before parsing

Yi Cong <[email protected]>
wifi: rtw89: 8851b: fix swapped DPK channel/bandwidth backup fields

イムティヤズ <[email protected]>
wifi: rtw88: fix out-of-bounds CAM write when key table is full

Lad Prabhakar <[email protected]>
memory: renesas-rpc-if: Mark XSPI_CDD1BUF0 as volatile

Justin Chen <[email protected]>
memory: brcmstb_dpfe: Bounds check DCPU-supplied MSG_ARG_COUNT

Justin Chen <[email protected]>
memory: brcmstb_dpfe: Fix out-of-bounds access due to DCPU offset

Liu Zhenlong <[email protected]>
PCI: aspeed: Fix clk and PHY leak in aspeed_pcie_port_init() error paths

Sam Price <[email protected]>
microblaze: preserve the MSR carry flags across signals

Ramin Moussavi <[email protected]>
microblaze: restore the ABI argument home area below pt_regs (PTO)

Ramin Moussavi <[email protected]>
microblaze: don't clobber r3/r4 restored by rt_sigreturn

Ramin Moussavi <[email protected]>
microblaze: reserve the ABI argument-home area in the signal frame

Yunpeng Tian <[email protected]>
udf: validate the device specification EA before using it

Christopher Obbard <[email protected]>
PCI: qcom: Only check bridge nodes for PERST# GPIOs

Abel Vesa <[email protected]>
soc: qcom: pmic_glink: Fix device access from worker during suspend

Viken Dadhaniya <[email protected]>
soc: qcom: geni-se: Fix write to read-only firmware buffer

Viken Dadhaniya <[email protected]>
soc: qcom: geni-se: Fix fw_end computed before round-up; propagate size to caller

Viken Dadhaniya <[email protected]>
soc: qcom: geni-se: Widen fw_size to u32 to prevent wrap-around

Viken Dadhaniya <[email protected]>
soc: qcom: geni-se: Fix endian conversion for serial_protocol comparison

HyeongJun An <[email protected]>
remoteproc: elf_loader: Bound the section header table

Maxi Saparov <[email protected]>
kho: do not reserve scratch memory in the kdump kernel

Daehyeon Ko <[email protected]>
ipc/mqueue: release notification resources during inode eviction

Daehyeon Ko <[email protected]>
aio: prevent eventfd/epoll recursion on poll

Jan Kara <[email protected]>
udf: Make sure there's enough space for LVID implementation use field

Eric Sandeen <[email protected]>
devtmpfs: restore mount option reconfiguration on get_tree

Karl Mehltretter <[email protected]>
microblaze: Fix MB_MANAGER build with older binutils

Fan Wu <[email protected]>
media: imx-jpeg: finish the job on device_run() error paths

Sean Young <[email protected]>
media: ir-hix5hd2: Ensure rdev is setup before interrupts are enabled

Sean Young <[email protected]>
media: meson-ir-tx: Ensure probe error is propagated

Sean Young <[email protected]>
media: meson-ir-tx: Ensure rc_free_device() is called on unbind

Sean Young <[email protected]>
media: meson-ir-tx: Ensure clock is disabled on unbind

Sean Young <[email protected]>
media: sunxi-cir: Ensure no more interrupts can occur before free

Sean Young <[email protected]>
media: redrat3: Error path leaves device in transmitting state

Sean Young <[email protected]>
media: redrat3: Ensure all urbs are suspended

Sean Young <[email protected]>
media: redrat3: Ensure we don't read beyond the end of the packet

Sean Young <[email protected]>
media: streamzap: Add missing rc_unregister_device()

Daniel Schwierzeck <[email protected]>
cpufreq: airoha: fix probe failure with correct error check

Esben Haabendal <[email protected]>
iio: light: ltr501: Power down chip if request irq fails

Jakub Szczudlo <[email protected]>
iio: adc: ti-ads1100: Fix incorrect reading when datarate changed in single mode

Harry Wentland <[email protected]>
drm/amd/display: Force GAMCOR for subsampled surfaces with PQ/Gamma22/HLG

YuBiao Wang <[email protected]>
drm/amdgpu: recompute the dw estimate after allocating a new VM update job

Marek Czernohous <[email protected]>
drm/nouveau: don't dereference outp before checking it in nouveau_dp_irq

Marek Czernohous <[email protected]>
drm/nouveau: cancel the DP IRQ work before freeing the connector

Marek Czernohous <[email protected]>
drm/nouveau: disable the fence uevent work instead of just cancelling it

Marek Czernohous <[email protected]>
drm/nouveau/pci: use config-space MSI rearm on MCP79/MCP7A (NVAC)

Zhenhao Wan <[email protected]>
drm/nouveau/svm: drain fault handler before freeing svmm

Zhenhao Wan <[email protected]>
drm/nouveau: reject zero-size notifier object allocation

Lyude Paul <[email protected]>
drm/nouveau/gsp/r570: Set GcOff = 0 in fbsr

Matt Turner <[email protected]>
alpha: honor force_successful_syscall_return() again

Sean Young <[email protected]>
media: rc: Add missing locking for keymap

Sean Young <[email protected]>
media: rc: Replace open coded krealloc() for keymap

Sami Tolvanen <[email protected]>
rust: dma: declare cfi_encoding for dma_data_direction

Sami Tolvanen <[email protected]>
rust: hrtimer: declare cfi_encoding for hrtimer_restart

Sami Tolvanen <[email protected]>
rust: irq: declare cfi_encoding for irqreturn

Hyunwoo Kim <[email protected]>
inet: reject unhashed sockets during established lookups

Mike Rapoport (Microsoft) <[email protected]>
x86/mm/pat: Use pr_warn() for early W^X warnings

Ruide Cao <[email protected]>
mptcp: fix MP_CAPABLE token migration when cloning reqsk

Sean Young <[email protected]>
media: saa7134: Specify rc type at rc_allocate_type()

Sean Young <[email protected]>
media: cx88: Specify rc type at rc_allocate_type()

Tales A. Mendonça <[email protected]>

    drm/xe: Implement Wa_22016122933

-------------

Diffstat:

 Documentation/admin-guide/kernel-parameters.txt    |  10 +
 Documentation/block/ublk.rst                       |   7 +
 .../bindings/clock/nuvoton,ma35d1-clk.yaml         |  16 +-
 Documentation/filesystems/fsverity.rst             |   3 +
 Documentation/hwmon/coretemp.rst                   |   3 +
 Documentation/hwmon/k10temp.rst                    |   8 +-
 Documentation/hwmon/prom21-xhci.rst                |   2 +-
 Documentation/networking/ip-sysctl.rst             |   5 +-
 Documentation/userspace-api/check_exec.rst         |   4 +
 Documentation/virt/hyperv/vmbus.rst                |  17 +-
 Makefile                                           |   4 +-
 arch/alpha/include/asm/mmu_context.h               |  35 +-
 arch/alpha/include/asm/sfp-machine.h               |   4 +
 arch/alpha/include/asm/switch_to.h                 |   1 -
 arch/alpha/include/asm/tlbflush.h                  |   3 +-
 arch/alpha/kernel/entry.S                          |  14 +
 arch/alpha/kernel/smp.c                            |  67 +-
 arch/alpha/mm/fault.c                              |  23 +-
 arch/alpha/mm/tlbflush.c                           |  18 +-
 arch/arm/include/asm/linkage.h                     |  29 +
 arch/arm/include/asm/smp.h                         |   2 +-
 arch/arm/kernel/cacheinfo.c                        |  51 +-
 arch/arm/kernel/head-nommu.S                       |   1 +
 arch/arm/kernel/head.S                             |   1 +
 arch/arm/kernel/smp.c                              |  15 +-
 arch/arm/kernel/topology.c                         |  13 +
 arch/arm/mach-imx/pm-imx6.c                        |  26 +-
 arch/arm/mach-imx/suspend-imx6.S                   |   6 +-
 arch/arm/mm/alignment.c                            |  51 +-
 arch/arm64/Kconfig                                 |   1 +
 .../boot/dts/freescale/imx8mm-verdin-ivy.dtsi      |   4 +-
 .../boot/dts/freescale/imx8mp-toradex-smarc.dtsi   |   2 +-
 .../boot/dts/freescale/imx8mp-verdin-ivy.dtsi      |   4 +-
 .../boot/dts/freescale/imx8mp-verdin-yavia.dtsi    |   7 +-
 .../boot/dts/freescale/imx95-aquila-clover.dts     |   5 +
 arch/arm64/boot/dts/freescale/imx95-aquila.dtsi    |   8 +-
 .../boot/dts/freescale/imx95-toradex-smarc.dtsi    |   1 +
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi          |   1 +
 arch/arm64/boot/dts/qcom/ipq9574.dtsi              |   2 +-
 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi |   2 +
 .../dts/qcom/sdm845-xiaomi-beryllium-common.dtsi   |   6 +
 arch/arm64/boot/dts/qcom/sdm845-xiaomi-polaris.dts |   6 +
 arch/arm64/boot/dts/qcom/shikra.dtsi               |   6 -
 arch/arm64/boot/dts/ti/Makefile                    |   2 +
 arch/arm64/boot/dts/ti/k3-am62-lp-sk.dts           |   2 +-
 arch/arm64/boot/dts/ti/k3-am62-phycore-som.dtsi    |   2 +-
 arch/arm64/boot/dts/ti/k3-am62-pocketbeagle2.dts   |   2 +-
 arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi         |   6 +-
 arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts     |   6 +-
 arch/arm64/boot/dts/ti/k3-am625-sk-common.dtsi     |   2 +-
 .../boot/dts/ti/k3-am625-tqma62xx-mba62xx.dts      |   4 +-
 arch/arm64/boot/dts/ti/k3-am625-tqma62xx.dtsi      |   2 +-
 .../boot/dts/ti/k3-am625-var-som-symphony.dts      |   2 +-
 arch/arm64/boot/dts/ti/k3-am625-var-som.dtsi       |   4 +-
 arch/arm64/boot/dts/ti/k3-am62a-phycore-som.dtsi   |   2 +-
 arch/arm64/boot/dts/ti/k3-am62a7-sk.dts            |   5 +-
 arch/arm64/boot/dts/ti/k3-am62x-phyboard-lyra.dtsi |   2 +-
 arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi     |   2 +-
 arch/arm64/include/asm/kvm_arm.h                   |   2 +-
 arch/arm64/include/asm/kvm_host.h                  |   8 +-
 arch/arm64/include/asm/kvm_mmu.h                   |   6 +-
 arch/arm64/include/asm/pgtable.h                   |   3 +
 arch/arm64/kernel/efi.c                            |   8 +-
 arch/arm64/kernel/process.c                        |  17 +
 arch/arm64/kernel/topology.c                       |   2 +-
 arch/arm64/kvm/Kconfig                             |   2 +-
 arch/arm64/kvm/arch_timer.c                        |  27 +-
 arch/arm64/kvm/arm.c                               |  53 +-
 arch/arm64/kvm/config.c                            |  78 ++
 arch/arm64/kvm/hyp/exception.c                     |   5 +-
 arch/arm64/kvm/hyp/include/hyp/adjust_pc.h         |  28 +
 arch/arm64/kvm/hyp/include/nvhe/pkvm.h             |   2 +
 arch/arm64/kvm/hyp/nvhe/hyp-main.c                 |  21 +-
 arch/arm64/kvm/hyp/nvhe/pkvm.c                     |  37 +
 arch/arm64/kvm/hyp/nvhe/sys_regs.c                 |   3 +
 arch/arm64/kvm/hyp/vhe/switch.c                    |  11 +-
 arch/arm64/kvm/hyp_trace.c                         |  12 +-
 arch/arm64/kvm/nested.c                            |  17 +-
 arch/arm64/kvm/ptdump.c                            |  75 +-
 arch/arm64/kvm/sys_regs.c                          |   2 +
 arch/arm64/kvm/vgic/vgic-its.c                     |  26 +-
 arch/arm64/kvm/vgic/vgic-mmio-v3.c                 |  33 +-
 arch/arm64/kvm/vgic/vgic.c                         |   8 +-
 arch/arm64/mm/contpte.c                            |   4 +-
 arch/arm64/mm/fault.c                              |   5 +-
 arch/loongarch/include/asm/barrier.h               |   3 -
 arch/loongarch/include/asm/hw_breakpoint.h         |   8 +-
 arch/loongarch/include/asm/loongarch.h             |   7 +-
 arch/loongarch/include/asm/numa.h                  |   2 +-
 arch/loongarch/include/asm/processor.h             |   1 +
 arch/loongarch/include/asm/switch_to.h             |   2 +-
 arch/loongarch/kernel/cpu-probe.c                  |   2 +-
 arch/loongarch/kernel/hw_breakpoint.c              |  66 +-
 arch/loongarch/kernel/irq.c                        |   3 +-
 arch/loongarch/kernel/numa.c                       |   8 +-
 arch/loongarch/kernel/traps.c                      |  13 +-
 arch/loongarch/pci/pci.c                           |   3 +-
 arch/m68k/68000/entry.S                            |   3 +-
 arch/m68k/coldfire/entry.S                         |   3 +-
 arch/microblaze/include/asm/entry.h                |  13 +
 arch/microblaze/include/asm/processor.h            |   2 +-
 arch/microblaze/kernel/entry.S                     | 348 ++++----
 arch/microblaze/kernel/hw_exception_handler.S      |   5 +
 arch/microblaze/kernel/process.c                   |   5 +-
 arch/microblaze/kernel/signal.c                    |  26 +
 arch/mips/mm/mmap.c                                |   6 +-
 arch/mips/mm/tlb-r4k.c                             |  21 +-
 arch/powerpc/net/bpf_jit.h                         |  14 +-
 arch/powerpc/net/bpf_jit_comp.c                    |  74 +-
 arch/powerpc/net/bpf_jit_comp32.c                  |   7 +-
 arch/powerpc/net/bpf_jit_comp64.c                  |   7 +-
 arch/powerpc/platforms/pseries/iommu.c             |  67 +-
 arch/powerpc/platforms/pseries/plpks-sysfs.c       |  20 +-
 arch/powerpc/platforms/pseries/plpks.c             |  41 +-
 arch/powerpc/platforms/pseries/plpks_sed_ops.c     |  12 +-
 arch/riscv/boot/dts/spacemit/k3.dtsi               |   2 +-
 arch/riscv/include/asm/pgtable.h                   |   9 +-
 arch/riscv/kernel/usercfi.c                        |  20 +-
 arch/riscv/kvm/vcpu_sbi_replace.c                  |  12 +-
 arch/x86/kernel/cpu/bugs.c                         |   2 +-
 arch/x86/mm/pat/set_memory.c                       |  15 +
 block/blk-iocost.c                                 |   2 +
 block/blk-mq.c                                     |   2 +
 block/bsg.c                                        |   5 +-
 crypto/algif_skcipher.c                            |   8 +-
 crypto/ecc.c                                       |  33 +-
 crypto/testmgr.c                                   |  11 +-
 crypto/testmgr.h                                   | 327 ++++++-
 drivers/accel/qaic/sahara.c                        |   1 +
 drivers/accessibility/speakup/selection.c          |   6 +
 drivers/acpi/apei/ghes.c                           |   6 +-
 drivers/acpi/pfr_update.c                          |   2 +-
 drivers/acpi/riscv/cppc.c                          |  26 +-
 drivers/acpi/sbs.c                                 |   6 +-
 drivers/ata/Kconfig                                |   7 -
 drivers/ata/Makefile                               |   1 -
 drivers/ata/ahci_st.c                              |  78 +-
 drivers/ata/libahci.c                              |  28 +-
 drivers/ata/libahci_platform.c                     |   4 +
 drivers/ata/libata-core.c                          |  75 +-
 drivers/ata/libata-scsi.c                          |   5 +
 drivers/ata/libata-sff.c                           |  37 +-
 drivers/ata/sata_fsl.c                             |   6 +-
 drivers/ata/sata_inic162x.c                        | 903 -------------------
 drivers/ata/sata_qstor.c                           |   8 +-
 drivers/base/devtmpfs.c                            | 108 ++-
 drivers/block/amiflop.c                            |  71 +-
 drivers/block/aoe/aoenet.c                         |  14 +-
 drivers/block/floppy.c                             |   8 +-
 drivers/block/loop.c                               |   6 +-
 drivers/block/ublk_drv.c                           | 204 ++++-
 drivers/block/xen-blkfront.c                       |   4 +-
 drivers/block/zram/zram_drv.c                      |  21 +-
 drivers/bluetooth/btusb.c                          |   2 +
 drivers/char/hw_random/amd-rng.c                   |   2 +-
 drivers/char/hw_random/ba431-rng.c                 |   2 +-
 drivers/char/hw_random/core.c                      |   1 +
 drivers/char/tpm/tpm-dev-common.c                  |   3 +
 drivers/char/tpm/tpm2-cmd.c                        |   3 +-
 drivers/char/tpm/tpm_nsc.c                         |   8 +-
 drivers/clk/imx/clk.c                              |  15 +-
 drivers/clk/mediatek/Kconfig                       |   1 +
 drivers/clk/mstar/clk-msc313-mpll.c                |   2 +-
 drivers/clk/mvebu/ap-cpu-clk.c                     |   4 +-
 drivers/clk/qcom/gcc-ipq5018.c                     |  10 +
 drivers/clk/qcom/gcc-ipq5210.c                     |   1 +
 drivers/clk/qcom/gcc-ipq5332.c                     |   1 +
 drivers/clk/qcom/ipq-cmn-pll.c                     |   3 +-
 drivers/clk/starfive/clk-starfive-jh7110-isp.c     |   2 +-
 drivers/clk/tenstorrent/atlantis-prcm.c            |  24 +-
 drivers/clocksource/timer-digicolor.c              |   2 +
 drivers/clocksource/timer-fttmr010.c               |   2 +
 drivers/cpufreq/Kconfig                            |   1 +
 drivers/cpufreq/airoha-cpufreq.c                   |   2 +-
 drivers/cpufreq/amd-pstate.c                       |   6 +-
 drivers/cpufreq/cppc_cpufreq.c                     |  39 +-
 drivers/cpufreq/cpufreq_conservative.c             |   8 +-
 drivers/cpufreq/cpufreq_governor.c                 |  29 +-
 drivers/cpufreq/cpufreq_governor.h                 |   2 +
 drivers/cpufreq/cpufreq_stats.c                    |   4 +
 drivers/cpufreq/intel_pstate.c                     |   2 +
 drivers/cpufreq/loongson3_cpufreq.c                |  73 +-
 drivers/crypto/amlogic/amlogic-gxl-core.c          |   7 +-
 drivers/crypto/atmel-aes.c                         |   2 +-
 drivers/crypto/atmel-tdes.c                        |   6 +-
 drivers/crypto/caam/caampkc.c                      |   6 +
 drivers/crypto/ccp/dbc.c                           |   4 +-
 drivers/crypto/hisilicon/hpre/hpre_crypto.c        |  20 +-
 drivers/crypto/intel/qat/qat_common/adf_dev_mgr.c  |  10 +-
 .../crypto/intel/qat/qat_common/adf_gen4_vf_mig.c  |   5 +
 drivers/crypto/intel/qat/qat_common/adf_gen6_ras.c |  20 +-
 drivers/crypto/intel/qat/qat_common/adf_gen6_ras.h |  24 +-
 drivers/crypto/intel/qat/qat_common/adf_vf_isr.c   |   2 -
 drivers/crypto/nx/nx-842.c                         |   2 +
 drivers/crypto/omap-des.c                          |   2 +
 drivers/crypto/omap-sham.c                         |   1 +
 drivers/crypto/sa2ul.c                             | 119 +--
 drivers/crypto/xilinx/zynqmp-aes-gcm.c             |   2 +-
 drivers/crypto/xilinx/zynqmp-sha.c                 |   2 +-
 drivers/cxl/acpi.c                                 |  20 +-
 drivers/cxl/core/mbox.c                            |   8 +-
 drivers/cxl/core/pci.c                             |  53 +-
 drivers/cxl/core/port.c                            |  32 +
 drivers/dax/super.c                                |   2 +-
 drivers/dma/altera-msgdma.c                        |  10 +-
 drivers/dma/loongson/loongson2-apb-cmc-dma.c       |   4 +-
 drivers/dma/sh/rz-dmac.c                           |   6 +-
 drivers/edac/i10nm_base.c                          |   1 +
 drivers/firewire/ohci-serdes-test.c                |   4 +-
 drivers/firewire/ohci.h                            |   2 +-
 drivers/firmware/efi/libstub/Makefile              |   2 +-
 drivers/firmware/efi/libstub/efi-stub.c            |   8 +
 drivers/fpga/fpga-mgr.c                            |   2 +-
 drivers/gpio/gpio-davinci.c                        |   6 +-
 drivers/gpio/gpio-pca953x.c                        |  21 +-
 drivers/gpio/gpiolib-cdev.c                        |   5 -
 drivers/gpio/gpiolib.c                             |  12 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu.h                |  11 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h         |  19 +
 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v12_1.c   |  44 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c   | 105 ++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c             |   6 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c         |  17 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c            |  14 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c            |  24 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c         |  33 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c            |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c            |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c            |   3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c             |   5 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c          |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c        |   5 +
 drivers/gpu/drm/amd/amdgpu/cik.c                   |  10 +
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c              |  18 +-
 drivers/gpu/drm/amd/amdgpu/si.c                    |  10 +
 drivers/gpu/drm/amd/amdgpu/vi.c                    |  10 +
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c           |  48 +-
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c              |  35 +-
 drivers/gpu/drm/amd/amdkfd/kfd_device.c            |   9 +-
 .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c  |   9 +
 drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c          |  23 +-
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h       |   9 +
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c   |   2 +
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c   |   2 +
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c   |   2 +
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c |   2 +
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c    |   2 +
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c    |   2 +
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h              |   4 +
 drivers/gpu/drm/amd/amdkfd/kfd_process.c           |   4 +-
 .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c |  30 +-
 drivers/gpu/drm/amd/amdkfd/kfd_queue.c             |  23 +-
 drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c        |  60 +-
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c               |  21 +-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |  15 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c  |  24 +-
 .../gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c   |   2 +-
 .../dml21/src/dml2_core/dml2_core_dcn4_calcs.c     |   2 +
 .../drm/amd/display/modules/color/color_gamma.c    |   3 +-
 drivers/gpu/drm/amd/include/kgd_pp_interface.h     |   2 +
 drivers/gpu/drm/amd/pm/amdgpu_dpm.c                |  85 ++
 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h            |   1 +
 drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c   |  33 +-
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c          |  87 +-
 drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h      |   2 +
 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c   | 200 +++--
 .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c   | 199 +++--
 .../gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c   | 226 +++--
 drivers/gpu/drm/arm/malidp_crtc.c                  |   1 +
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c |  13 +-
 drivers/gpu/drm/drm_panic.c                        |   5 +-
 drivers/gpu/drm/msm/dsi/dsi_host.c                 |   2 +
 drivers/gpu/drm/msm/hdmi/hdmi_bridge.c             |  32 +-
 drivers/gpu/drm/msm/hdmi/hdmi_phy.c                |  16 +-
 drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h  |   1 +
 drivers/gpu/drm/nouveau/nouveau_abi16.c            |   4 +
 drivers/gpu/drm/nouveau/nouveau_connector.c        |   1 +
 drivers/gpu/drm/nouveau/nouveau_dp.c               |   4 +-
 drivers/gpu/drm/nouveau/nouveau_fence.c            |   2 +-
 drivers/gpu/drm/nouveau/nouveau_svm.c              |  13 +
 drivers/gpu/drm/nouveau/nvkm/engine/device/base.c  |   2 +-
 .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c |   2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/pci/Kbuild     |   1 +
 drivers/gpu/drm/nouveau/nvkm/subdev/pci/mcp79.c    |  35 +
 drivers/gpu/drm/panel/panel-ebbg-ft8719.c          |   2 +
 drivers/gpu/drm/panel/panel-simple.c               |   3 +
 drivers/gpu/drm/ttm/ttm_bo_util.c                  |  11 +-
 drivers/gpu/drm/xe/xe_guc.c                        |  16 +
 drivers/gpu/drm/xe/xe_guc.h                        |   2 +
 drivers/gpu/drm/xe/xe_guc_ads.c                    |   3 +-
 drivers/gpu/drm/xe/xe_guc_ct.c                     |   6 +-
 drivers/gpu/drm/xe/xe_guc_engine_activity.c        |   6 +-
 drivers/gpu/drm/xe/xe_guc_log.c                    |   7 +-
 drivers/gpu/drm/xe/xe_guc_pc.c                     |   3 +-
 drivers/gpu/drm/xe/xe_wa_oob.rules                 |   1 +
 drivers/hte/hte-tegra194-test.c                    |   2 +-
 drivers/hte/hte-tegra194.c                         |  10 +-
 drivers/hv/mshv_vtl_main.c                         |  23 +-
 drivers/hwmon/acpi_power_meter.c                   |  10 +-
 drivers/hwmon/coretemp.c                           |  52 +-
 drivers/hwmon/corsair-cpro.c                       |   9 +-
 drivers/hwmon/gigabyte_waterforce.c                |   5 +
 drivers/hwmon/k10temp.c                            |   5 +-
 drivers/hwmon/lm70.c                               |   8 +-
 drivers/hwmon/lm95245.c                            |   6 +-
 drivers/hwmon/mcp9982.c                            |   7 +-
 drivers/hwmon/sht3x.c                              |   5 +-
 drivers/hwmon/sht4x.c                              |  22 +-
 drivers/hwmon/tmp102.c                             |   8 +-
 drivers/hwmon/tmp108.c                             |   8 +-
 drivers/i2c/busses/i2c-designware-master.c         |   8 +
 drivers/i2c/busses/i2c-mt7621.c                    |   9 +-
 drivers/i2c/i2c-core-acpi.c                        |   6 +-
 drivers/i3c/master.c                               |   7 +-
 drivers/i3c/master/adi-i3c-master.c                |   4 +
 drivers/i3c/master/mipi-i3c-hci/dma.c              |   2 +-
 drivers/i3c/master/mipi-i3c-hci/mipi-i3c-hci-pci.c |   4 +-
 drivers/iio/accel/adis16201.c                      |  10 +-
 drivers/iio/accel/adxl313_spi.c                    |   2 +
 drivers/iio/accel/adxl372_spi.c                    |   2 +
 drivers/iio/accel/adxl380_spi.c                    |   2 +
 drivers/iio/accel/kxcjk-1013.c                     |   1 +
 drivers/iio/accel/mma9551.c                        |   1 +
 drivers/iio/accel/mma9553.c                        |   1 +
 drivers/iio/accel/sca3000.c                        |   2 +
 drivers/iio/adc/ad4080.c                           |   3 +-
 drivers/iio/adc/ad7192.c                           |   3 +
 drivers/iio/adc/ad7606_spi.c                       |   6 +-
 drivers/iio/adc/ad7768-1.c                         |   3 +
 drivers/iio/adc/at91-sama5d2_adc.c                 |   1 +
 drivers/iio/adc/max11205.c                         |   2 +
 drivers/iio/adc/max14001.c                         |   1 +
 drivers/iio/adc/mcp3911.c                          |   2 +
 drivers/iio/adc/stm32-adc.c                        |   4 +-
 drivers/iio/adc/ti-adc128s052.c                    |   8 +-
 drivers/iio/adc/ti-ads1018.c                       |   6 +-
 drivers/iio/adc/ti-ads1100.c                       | 107 ++-
 drivers/iio/adc/ti-ads131m02.c                     |   2 +
 drivers/iio/adc/ti-ads7950.c                       |   4 +-
 drivers/iio/amplifiers/ad8366.c                    |   2 +
 drivers/iio/dac/ad5755.c                           |   3 +
 drivers/iio/dac/mcp47feb02.c                       |  31 +-
 drivers/iio/dac/mcp4821.c                          |   7 +-
 drivers/iio/frequency/adf4377.c                    |   3 +
 drivers/iio/imu/adis16400.c                        |   3 +
 drivers/iio/imu/inv_icm42600/inv_icm42600.h        |   1 +
 drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c  |  17 +-
 drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c |   2 +
 drivers/iio/imu/inv_icm42600/inv_icm42600_core.c   |   9 +
 drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c   |   8 +-
 drivers/iio/light/apds9306.c                       |   2 +-
 drivers/iio/light/isl29028.c                       |  33 +-
 drivers/iio/light/ltr501.c                         |   2 +-
 drivers/iio/potentiometer/x9250.c                  |   7 +-
 drivers/iio/pressure/bmp280-spi.c                  |   2 +
 drivers/iio/pressure/dps310.c                      |   6 +-
 drivers/infiniband/core/uverbs_std_types_dmabuf.c  |   7 +-
 drivers/infiniband/hw/hfi1/chip.c                  |   4 +-
 drivers/infiniband/hw/hfi1/fault.c                 |   1 -
 drivers/input/input.c                              |   4 +-
 drivers/input/joystick/xpad.c                      |   1 +
 drivers/input/keyboard/matrix_keypad.c             |   3 -
 drivers/iommu/amd/init.c                           |  23 +-
 .../iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c    | 131 ++-
 drivers/iommu/dma-iommu.c                          |  20 +-
 drivers/iommu/generic_pt/iommu_pt.h                |  30 +-
 drivers/iommu/intel/iommu.h                        |  17 +-
 drivers/iommu/iommufd/io_pagetable.c               |   3 +
 drivers/iommu/iommufd/pages.c                      |  13 +-
 drivers/irqchip/irq-atmel-aic.c                    |   2 +-
 drivers/irqchip/irq-atmel-aic5.c                   |   2 +-
 drivers/irqchip/irq-gic-v3-its.c                   |   2 +-
 drivers/irqchip/irq-imx-intmux.c                   |  15 +-
 drivers/irqchip/irq-jcore-aic.c                    |   4 +-
 drivers/irqchip/irq-mchp-eic.c                     |   4 +-
 drivers/irqchip/irq-msi-lib.c                      |   1 +
 drivers/irqchip/irq-renesas-rzv2h.c                |   6 +-
 drivers/irqchip/irq-riscv-imsic-platform.c         |   2 +-
 drivers/leds/flash/leds-ktd2692.c                  |  10 +-
 drivers/mailbox/bcm74110-mailbox.c                 |  13 +
 drivers/mailbox/mailbox-altera.c                   |   2 +-
 drivers/mailbox/mtk-cmdq-mailbox.c                 |   7 +-
 drivers/mailbox/qcom-ipcc.c                        |   6 +
 drivers/md/dm-bufio.c                              |  45 +-
 drivers/md/dm-snap-persistent.c                    |   7 +-
 drivers/md/dm-vdo/indexer/chapter-index.c          |  15 +-
 drivers/md/dm-vdo/indexer/delta-index.c            |  17 +-
 drivers/md/dm-vdo/indexer/volume.c                 |   6 -
 drivers/md/dm-writecache.c                         |  54 +-
 drivers/md/dm.c                                    |   2 +-
 drivers/md/md.c                                    |  17 +-
 drivers/md/raid5-cache.c                           |  34 +-
 drivers/md/raid5.c                                 |   8 +-
 drivers/md/raid5.h                                 |   1 +
 .../extron-da-hd-4k-plus/extron-da-hd-4k-plus.c    |   4 +-
 drivers/media/common/cypress_firmware.c            |   2 +
 drivers/media/common/saa7146/saa7146_core.c        |   3 +-
 drivers/media/dvb-frontends/stv0900_core.c         |   2 +
 drivers/media/dvb-frontends/stv090x.c              |   2 +
 drivers/media/i2c/adv7180.c                        |   2 +-
 drivers/media/i2c/adv748x/adv748x-core.c           |  13 +-
 drivers/media/i2c/adv7604.c                        |   3 +-
 drivers/media/i2c/alvium-csi2.c                    |   1 +
 drivers/media/i2c/cvs/core.c                       |  16 +-
 drivers/media/i2c/cvs/v4l2.c                       |  13 +-
 drivers/media/i2c/imx219.c                         |  30 +-
 drivers/media/i2c/og01a1b.c                        |   5 +
 drivers/media/i2c/ov2735.c                         |   1 +
 drivers/media/i2c/ov5647.c                         |   4 +
 drivers/media/i2c/ov8856.c                         |  32 +-
 drivers/media/i2c/tc358743.c                       |   3 +-
 drivers/media/pci/cx18/cx18-driver.c               |   9 +-
 drivers/media/pci/cx88/cx88-input.c                |  22 +-
 drivers/media/pci/hws/hws.h                        |   4 +-
 drivers/media/pci/hws/hws_pci.c                    |   2 +-
 drivers/media/pci/hws/hws_reg.h                    |   3 +-
 drivers/media/pci/hws/hws_v4l2_ioctl.c             |   5 +-
 drivers/media/pci/hws/hws_video.c                  |   6 +-
 drivers/media/pci/saa7134/saa7134-input.c          |   7 +-
 drivers/media/pci/tw68/tw68-core.c                 |   2 +-
 drivers/media/pci/tw686x/tw686x-core.c             |  10 +
 drivers/media/platform/amphion/vpu_core.c          |  19 +-
 drivers/media/platform/amphion/vpu_drv.c           |   1 +
 .../media/platform/arm/mali-c55/mali-c55-core.c    |  20 +-
 drivers/media/platform/arm/mali-c55/mali-c55-isp.c |   1 +
 .../media/platform/arm/mali-c55/mali-c55-params.c  |   3 +
 .../media/platform/arm/mali-c55/mali-c55-stats.c   |  18 +-
 drivers/media/platform/atmel/atmel-isi.c           |   7 +-
 .../platform/chips-media/wave5/wave5-vpu-dec.c     |   8 +-
 .../media/platform/chips-media/wave5/wave5-vpu.c   |   7 +
 .../platform/chips-media/wave5/wave5-vpuapi.c      |  15 +-
 .../media/platform/imagination/e5010-jpeg-enc.c    |   4 +-
 drivers/media/platform/m2m-deinterlace.c           |   2 +-
 drivers/media/platform/marvell/Kconfig             |   1 +
 drivers/media/platform/marvell/mmp-driver.c        |   5 +-
 .../media/platform/mediatek/jpeg/mtk_jpeg_core.c   |  21 +-
 .../media/platform/mediatek/mdp3/mtk-mdp3-comp.c   |  14 +-
 .../mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c   |   2 +
 drivers/media/platform/mediatek/vpu/mtk_vpu.c      |   2 +
 .../media/platform/microchip/microchip-isc-base.c  |  56 +-
 .../media/platform/microchip/microchip-isc-clk.c   |   7 +-
 drivers/media/platform/microchip/microchip-isc.h   |   1 +
 .../platform/microchip/microchip-sama5d2-isc.c     |  11 +
 .../platform/microchip/microchip-sama7g5-isc.c     |  11 +
 drivers/media/platform/nuvoton/npcm-video.c        |   9 +-
 drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c     |  21 +-
 drivers/media/platform/qcom/camss/camss-vfe-17x.c  |  46 +-
 drivers/media/platform/qcom/camss/camss-vfe.c      |  14 +-
 drivers/media/platform/qcom/camss/camss.c          |  25 +-
 drivers/media/platform/qcom/iris/iris_core.h       |   6 +
 drivers/media/platform/qcom/iris/iris_probe.c      |  62 +-
 drivers/media/platform/qcom/iris/iris_vdec.c       |  10 -
 drivers/media/platform/qcom/iris/iris_vidc.c       |   6 +-
 drivers/media/platform/qcom/iris/iris_vpu_common.c |   7 +-
 drivers/media/platform/qcom/venus/core.c           |  66 +-
 drivers/media/platform/qcom/venus/core.h           |   6 +
 .../platform/renesas/rzv2h-ivc/rzv2h-ivc-dev.c     |  11 +-
 drivers/media/platform/rockchip/rga/rga-hw.c       |   8 -
 drivers/media/platform/rockchip/rga/rga.c          |   4 +-
 drivers/media/platform/rockchip/rga/rga.h          |   1 +
 drivers/media/platform/rockchip/rkvdec/rkvdec.c    |   3 -
 .../media/platform/samsung/exynos4-is/fimc-lite.c  |   3 +-
 .../media/platform/st/sti/delta/delta-mjpeg-hdr.c  |   7 +-
 drivers/media/platform/st/stm32/stm32-csi.c        |   5 +-
 .../media/platform/synopsys/hdmirx/snps_hdmirx.c   |  80 +-
 drivers/media/platform/ti/davinci/vpif_capture.c   |   5 +-
 drivers/media/platform/ti/davinci/vpif_display.c   |   3 +
 drivers/media/platform/verisilicon/hantro_drv.c    |  75 +-
 .../platform/verisilicon/hantro_g1_mpeg2_dec.c     |   5 +
 .../verisilicon/rockchip_vpu981_hw_av1_dec.c       |  68 +-
 drivers/media/rc/ene_ir.c                          |   4 +-
 drivers/media/rc/ir-hix5hd2.c                      |   5 +-
 drivers/media/rc/ir_toy.c                          |   2 +-
 drivers/media/rc/meson-ir-tx.c                     |  20 +-
 drivers/media/rc/rc-main.c                         | 125 +--
 drivers/media/rc/redrat3.c                         |  28 +-
 drivers/media/rc/serial_ir.c                       |   2 +-
 drivers/media/rc/streamzap.c                       |   1 +
 drivers/media/rc/sunxi-cir.c                       |   2 +-
 drivers/media/test-drivers/vicodec/codec-fwht.h    |   2 +-
 drivers/media/test-drivers/vicodec/vicodec-core.c  |  16 +-
 drivers/media/test-drivers/vidtv/vidtv_bridge.c    |   4 +
 drivers/media/test-drivers/vidtv/vidtv_demod.c     |   9 -
 drivers/media/test-drivers/vim2m.c                 |  29 +-
 drivers/media/test-drivers/vimc/vimc-sensor.c      |   8 +-
 drivers/media/test-drivers/vivid/vivid-core.c      |   1 +
 drivers/media/test-drivers/vivid/vivid-vid-cap.c   |  13 +
 drivers/media/usb/au0828/au0828-core.c             |   4 +
 drivers/media/usb/au0828/au0828-dvb.c              |  19 +-
 drivers/media/usb/cx231xx/cx231xx-audio.c          |  15 +-
 drivers/media/usb/cx231xx/cx231xx-cards.c          |   2 +-
 drivers/media/usb/cx231xx/cx231xx.h                |   2 +-
 drivers/media/usb/dvb-usb-v2/rtl28xxu.c            |  14 +-
 drivers/media/usb/dvb-usb/dvb-usb-firmware.c       |   2 +
 drivers/media/usb/em28xx/em28xx-core.c             |   3 -
 drivers/media/usb/em28xx/em28xx-video.c            |   2 +-
 drivers/media/usb/go7007/go7007-usb.c              |   8 +
 drivers/media/usb/pvrusb2/pvrusb2-sysfs.c          |   1 +
 drivers/media/usb/uvc/uvc_ctrl.c                   |   2 +-
 drivers/media/v4l2-core/v4l2-common.c              |   2 +-
 drivers/media/v4l2-core/v4l2-ctrls-core.c          |  19 +-
 drivers/media/v4l2-core/v4l2-isp.c                 |  15 +-
 drivers/memory/brcmstb_dpfe.c                      |  24 +-
 drivers/memory/renesas-rpc-if.c                    |   1 +
 drivers/memory/stm32_omm.c                         |   2 +
 drivers/mfd/Kconfig                                |   2 +
 drivers/mfd/ab8500-core.c                          |  44 +-
 drivers/mfd/bq257xx.c                              |  10 +
 drivers/mfd/da903x.c                               |  34 +-
 drivers/mfd/tps65217.c                             |  69 +-
 drivers/mfd/twl-core.c                             |  23 +-
 drivers/mfd/wcd934x.c                              |   8 +-
 drivers/misc/fastrpc.c                             | 192 +++--
 drivers/misc/issei/Kconfig                         |   1 +
 drivers/misc/mei/vsc-tp.c                          |   2 +-
 drivers/misc/tifm_core.c                           |   1 -
 drivers/mtd/chips/cfi_cmdset_0002.c                |  15 +
 drivers/mtd/maps/amd76xrom.c                       |   2 +
 drivers/mtd/maps/l440gx.c                          |   2 -
 drivers/mtd/maps/pci.c                             |   2 +-
 drivers/mtd/mtdcore.c                              |   2 +-
 drivers/mtd/mtdsuper.c                             |   4 +-
 drivers/mtd/nand/raw/atmel/nand-controller.c       |   6 +-
 drivers/mtd/nand/raw/ndfc.c                        |  21 +-
 .../mtd/nand/raw/nuvoton-ma35d1-nand-controller.c  |   1 -
 drivers/mtd/nand/raw/qcom_nandc.c                  |   8 +-
 drivers/mtd/nand/raw/sunxi_nand.c                  |   5 +-
 drivers/mtd/parsers/qcomsmempart.c                 |   4 +-
 drivers/mtd/spi-nor/core.c                         |   9 +
 drivers/mtd/spi-nor/sfdp.c                         |   8 +
 drivers/net/bonding/bond_main.c                    |   2 +-
 drivers/net/ethernet/broadcom/bgmac.c              |  10 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c      |  49 +-
 drivers/net/ethernet/broadcom/tg3.c                |  42 +-
 drivers/net/ethernet/google/gve/gve_flow_rule.c    |   1 +
 drivers/net/ethernet/hisilicon/hisi_femac.c        |   1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      |  40 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c         |   4 +-
 drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c   |   4 +-
 .../net/ethernet/mellanox/mlxsw/spectrum_span.c    |   2 +-
 drivers/net/macvlan.c                              |   3 +-
 drivers/net/netdevsim/bpf.c                        |  11 +
 drivers/net/ppp/ppp_generic.c                      |   1 +
 drivers/net/ppp/pppoe.c                            |  22 +-
 drivers/net/usb/pegasus.c                          |  12 +-
 drivers/net/usb/r8152.c                            |  10 +-
 drivers/net/veth.c                                 |   5 +-
 drivers/net/wireless/ath/ath11k/dp.c               |   2 +
 drivers/net/wireless/ath/ath12k/wmi.c              |  17 +
 .../broadcom/brcm80211/brcmsmac/phy/phy_n.c        |   2 +-
 drivers/net/wireless/mediatek/mt76/eeprom.c        |  17 +-
 drivers/net/wireless/mediatek/mt76/mac80211.c      |  14 +
 drivers/net/wireless/mediatek/mt76/mt76.h          |   2 +
 drivers/net/wireless/mediatek/mt76/mt7615/init.c   |  17 +-
 drivers/net/wireless/mediatek/mt76/mt7615/main.c   |   6 +-
 .../net/wireless/mediatek/mt76/mt7615/pci_init.c   |   1 +
 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c   |  19 +-
 .../net/wireless/mediatek/mt76/mt76x02_usb_mcu.c   |   2 +-
 drivers/net/wireless/mediatek/mt76/mt7921/mac.c    |   3 +
 drivers/net/wireless/mediatek/mt76/mt7921/main.c   |   1 +
 drivers/net/wireless/mediatek/mt76/mt7925/mac.c    |   3 +
 drivers/net/wireless/mediatek/mt76/mt7925/main.c   |   2 +
 drivers/net/wireless/mediatek/mt76/mt7925/usb.c    |  11 +-
 drivers/net/wireless/mediatek/mt76/mt792x_core.c   |  12 +-
 drivers/net/wireless/mediatek/mt76/mt7996/pci.c    |  12 +-
 drivers/net/wireless/mediatek/mt76/tx.c            |   2 +-
 drivers/net/wireless/mediatek/mt76/usb.c           |  31 +-
 drivers/net/wireless/realtek/rtw88/mac80211.c      |   2 +-
 drivers/net/wireless/realtek/rtw89/fw.c            |  32 +
 drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c  |   4 +-
 drivers/net/wireless/realtek/rtw89/usb.c           |  13 +-
 drivers/net/wireless/realtek/rtw89/wow.c           |   6 +-
 drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c      |   5 +
 drivers/nvme/host/auth.c                           |  15 +-
 drivers/nvme/host/core.c                           |  15 +-
 drivers/nvme/host/rdma.c                           |   1 +
 drivers/nvme/host/sysfs.c                          |  14 +-
 drivers/nvme/host/tcp.c                            |  58 +-
 drivers/nvme/target/auth.c                         |   1 +
 drivers/nvme/target/configfs.c                     |   2 +
 drivers/nvme/target/fabrics-cmd-auth.c             |   8 +-
 drivers/nvme/target/fabrics-cmd.c                  |   4 +
 drivers/nvme/target/fc.c                           |  10 +-
 drivers/nvme/target/io-cmd-bdev.c                  |   5 +-
 drivers/nvme/target/io-cmd-file.c                  |   4 +-
 drivers/nvme/target/pci-epf.c                      |  30 +-
 drivers/nvme/target/pr.c                           |   2 +-
 drivers/nvme/target/rdma.c                         |   5 +-
 drivers/nvme/target/tcp.c                          |  26 +-
 drivers/nvme/target/zns.c                          |  10 +
 drivers/nvmem/rockchip-otp.c                       |  15 +-
 drivers/parisc/eisa_enumerator.c                   |  15 +-
 drivers/pci/controller/dwc/pci-imx6.c              |   5 +-
 drivers/pci/controller/dwc/pcie-qcom-ep.c          |   2 +
 drivers/pci/controller/dwc/pcie-qcom.c             |   5 +-
 drivers/pci/controller/dwc/pcie-rcar-gen4.c        |  54 ++
 drivers/pci/controller/pcie-aspeed.c               |   9 +-
 drivers/pci/controller/pcie-rockchip-ep.c          |  13 -
 drivers/pci/controller/pcie-rockchip-host.c        |  20 -
 drivers/pci/controller/pcie-rockchip.c             |  14 +-
 drivers/pci/controller/pcie-rockchip.h             |   3 -
 drivers/pci/controller/pcie-rzg3s-host.c           |  51 +-
 drivers/pci/controller/pcie-xilinx-dma-pl.c        |  10 +-
 drivers/pci/controller/vmd.c                       |  55 +-
 drivers/pci/doe.c                                  |   5 +-
 drivers/pci/endpoint/functions/pci-epf-vntb.c      |  85 +-
 drivers/pci/hotplug/pciehp_core.c                  |   2 +-
 drivers/pci/pci-label.c                            |   2 +-
 drivers/pci/pci.c                                  |  33 +-
 drivers/pci/pcie/aer.c                             |   7 +-
 drivers/pci/probe.c                                |   5 +-
 drivers/pci/pwrctrl/core.c                         |   3 +
 drivers/pci/pwrctrl/generic.c                      |   1 +
 drivers/pci/quirks.c                               |  26 +-
 drivers/pci/xen-pcifront.c                         |  11 +-
 drivers/peci/controller/peci-aspeed.c              |   6 +-
 drivers/peci/controller/peci-npcm.c                |   6 +-
 drivers/perf/xgene_pmu.c                           |   4 +-
 drivers/phy/apple/atc.c                            |   8 +-
 drivers/pinctrl/renesas/pinctrl-rzt2h.c            | 126 ++-
 drivers/pinctrl/stm32/pinctrl-stm32.c              |   6 +-
 drivers/platform/x86/amd/hfi/hfi.c                 |  20 +-
 drivers/platform/x86/amd/pmc/pmc.c                 |  20 +-
 drivers/platform/x86/amd/pmf/core.c                |   1 +
 drivers/platform/x86/amd/pmf/spc.c                 |   8 +-
 drivers/platform/x86/amd/pmf/sps.c                 |  10 +-
 drivers/platform/x86/asus-wmi.c                    |  72 +-
 drivers/platform/x86/hp/hp-bioscfg/bioscfg.c       |  82 +-
 .../x86/hp/hp-bioscfg/passwdobj-attributes.c       |  16 +-
 .../platform/x86/hp/hp-bioscfg/spmobj-attributes.c |   5 +-
 drivers/platform/x86/hp/hp-wmi.c                   |   7 +-
 drivers/platform/x86/intel/int3472/discrete.c      |  37 +-
 drivers/platform/x86/intel/pmt/class.c             |   9 +-
 .../x86/intel/uncore-frequency/uncore-frequency.c  |   2 +-
 drivers/platform/x86/intel/vsec.c                  |   2 +-
 drivers/platform/x86/lenovo/wmi-capdata.c          |  18 +-
 drivers/platform/x86/oxpec.c                       |  68 +-
 drivers/platform/x86/siemens/simatic-ipc.c         |  21 +-
 drivers/platform/x86/tuxedo/nb04/wmi_ab.c          |   8 +-
 drivers/power/supply/ab8500_fg.c                   |  69 +-
 drivers/power/supply/bq27xxx_battery.c             |  12 +-
 drivers/power/supply/cros_charge-control.c         |  29 +-
 drivers/power/supply/generic-adc-battery.c         |   2 +-
 drivers/power/supply/ltc2941-battery-gauge.c       |   6 +-
 drivers/power/supply/power_supply_core.c           |  84 +-
 drivers/power/supply/qcom_battmgr.c                |  26 +-
 drivers/power/supply/qcom_smbx.c                   | 109 ++-
 drivers/pps/generators/pps_gen.c                   |  11 +-
 drivers/pwm/pwm-tiehrpwm.c                         |   3 +
 drivers/regulator/core.c                           |   4 +
 drivers/regulator/rt6190-regulator.c               |  18 +-
 drivers/remoteproc/remoteproc_elf_loader.c         |  23 +-
 drivers/rtc/rtc-cmos.c                             |  32 +-
 drivers/rtc/rtc-pcf8563.c                          |   2 +-
 drivers/scsi/libiscsi_tcp.c                        |   3 +-
 drivers/scsi/scsi_ioctl.c                          |  11 +-
 drivers/scsi/sd.c                                  |  10 +-
 drivers/sh/intc/core.c                             |  11 +-
 drivers/sh/maple/maple.c                           |   4 +-
 drivers/slimbus/messaging.c                        |   2 +-
 drivers/soc/fsl/dpio/dpio-driver.c                 |   9 +-
 drivers/soc/fsl/qe/tsa.c                           |  16 +-
 drivers/soc/loongson/loongson2_pm.c                |   2 +-
 drivers/soc/qcom/pmic_glink_altmode.c              |   4 +-
 drivers/soc/qcom/qcom-geni-se.c                    |  49 +-
 drivers/soc/samsung/exynos-pmu.c                   |  61 +-
 drivers/spi/atmel-quadspi.c                        |  24 +-
 drivers/spi/spi-amd.c                              |  17 +
 drivers/spi/spi-bcm-qspi.c                         |   3 +-
 drivers/spi/spi-bcm2835.c                          |   4 +-
 drivers/spi/spi-cadence-xspi.c                     |  52 +-
 drivers/spi/spi-ch341.c                            |   6 +
 drivers/spi/spi-jcore.c                            |   2 +
 drivers/spi/spi-ljca.c                             |   7 +-
 drivers/spi/spi-npcm-fiu.c                         |   8 +
 drivers/spi/spi-qpic-snand.c                       |   3 +
 drivers/spi/spi-stm32.c                            |   3 +-
 drivers/spi/spi-zynq-qspi.c                        |  13 +-
 drivers/staging/greybus/uart.c                     |  32 +-
 drivers/staging/media/av7110/sp8870.c              |   5 +-
 drivers/staging/media/imx/imx-media-csc-scaler.c   |   1 +
 drivers/staging/media/meson/vdec/vdec.c            |   2 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c           |   7 +
 .../int340x_thermal/processor_thermal_device.c     |  10 +-
 drivers/thermal/intel/intel_powerclamp.c           |   3 +-
 drivers/tty/serial/8250/8250_exar.c                |  36 +-
 drivers/tty/serial/8250/8250_lpss.c                |   7 +-
 drivers/tty/serial/8250/8250_omap.c                |   3 +
 drivers/tty/serial/8250/8250_port.c                |   4 +-
 drivers/tty/serial/amba-pl011.c                    |  37 +-
 drivers/tty/serial/pmac_zilog.c                    |   4 +-
 drivers/tty/serial/sc16is7xx.c                     |   4 +-
 drivers/ufs/core/ufs_bsg.c                         |  23 +-
 drivers/ufs/core/ufshcd.c                          |  91 +-
 drivers/usb/class/cdc-acm.c                        |   6 +-
 drivers/usb/core/driver.c                          |   3 +-
 drivers/usb/core/quirks.c                          |   3 +
 drivers/usb/fotg210/fotg210-udc.c                  |  17 +-
 drivers/usb/gadget/legacy/inode.c                  |   4 +-
 drivers/usb/host/octeon-hcd.c                      |  41 +-
 drivers/usb/host/xhci-pci-prom21.c                 |   3 +
 drivers/usb/host/xhci-pci.c                        |   3 +
 drivers/usb/host/xhci-pci.h                        |   3 +
 drivers/usb/host/xhci-ring.c                       |   9 +-
 drivers/usb/host/xhci.c                            |  11 +-
 drivers/usb/serial/option.c                        |   5 +
 drivers/usb/serial/sierra.c                        |   3 +-
 drivers/usb/serial/usb_wwan.c                      |   3 +
 drivers/usb/typec/ucsi/ucsi.c                      |   3 +-
 drivers/usb/typec/ucsi/ucsi_ccg.c                  |  37 +-
 drivers/vfio/pci/mlx5/cmd.c                        |   2 +-
 drivers/vfio/pci/vfio_pci_rdwr.c                   |   3 -
 drivers/video/fbdev/atmel_lcdfb.c                  |  13 +-
 drivers/video/fbdev/core/bitblit.c                 |   7 +-
 drivers/video/fbdev/core/fb_info.c                 |   1 +
 drivers/video/fbdev/core/fbcon.c                   |  46 +
 drivers/video/fbdev/core/fbcon.h                   |  19 +-
 drivers/video/fbdev/core/fbcon_rotate.c            |  10 +-
 drivers/video/fbdev/kyro/fbdev.c                   |   4 +-
 drivers/video/fbdev/nvidia/nvidia.c                |   1 +
 drivers/video/fbdev/sh_mobile_lcdcfb.c             |  43 +-
 drivers/video/fbdev/smscufx.c                      |   9 +-
 drivers/video/fbdev/ssd1307fb.c                    |   6 +-
 drivers/video/fbdev/udlfb.c                        |   9 +-
 drivers/video/fbdev/xen-fbfront.c                  |   7 +-
 drivers/watchdog/hpwdt.c                           |   2 +-
 drivers/xen/gntdev-dmabuf.c                        |   4 +-
 drivers/xen/gntdev.c                               |   7 +
 drivers/xen/privcmd.c                              |  47 +-
 drivers/xen/xen-pciback/pci_stub.c                 |   7 +-
 fs/affs/bitmap.c                                   |   2 +-
 fs/aio.c                                           |  18 +-
 fs/backing-file.c                                  |  44 +-
 fs/btrfs/inode.c                                   |   3 -
 fs/btrfs/super.c                                   |   3 +
 fs/btrfs/volumes.c                                 |   6 +-
 fs/ceph/addr.c                                     |  15 +-
 fs/ceph/caps.c                                     |   6 +
 fs/ceph/crypto.c                                   |  11 +
 fs/ceph/mds_client.c                               |  28 +-
 fs/ceph/mdsmap.c                                   |  12 +-
 fs/ceph/snap.c                                     |   7 +-
 fs/ceph/xattr.c                                    |  10 +
 fs/crypto/keysetup.c                               |   8 +-
 fs/dax.c                                           |  14 +-
 fs/dcache.c                                        |  16 +-
 fs/dlm/lowcomms.c                                  |   6 +-
 fs/erofs/decompressor.c                            |   2 +-
 fs/erofs/ishare.c                                  |  43 +-
 fs/exfat/exfat_fs.h                                |  88 +-
 fs/exfat/file.c                                    | 258 +++---
 fs/exfat/inode.c                                   |  16 +-
 fs/exfat/iomap.c                                   |  53 +-
 fs/exfat/namei.c                                   |   4 +-
 fs/exportfs/expfs.c                                |   6 +-
 fs/ext4/balloc.c                                   |   2 +-
 fs/ext4/crypto.c                                   |   9 +
 fs/ext4/ext4.h                                     |   3 +
 fs/ext4/extents.c                                  |  26 +-
 fs/ext4/indirect.c                                 |  17 +
 fs/ext4/inode.c                                    |  19 +-
 fs/ext4/ioctl.c                                    |   3 +-
 fs/ext4/namei.c                                    |  11 +-
 fs/ext4/super.c                                    |  29 +-
 fs/f2fs/compress.c                                 |  10 +-
 fs/f2fs/data.c                                     |  13 +-
 fs/f2fs/f2fs.h                                     |   3 +
 fs/f2fs/file.c                                     |  52 +-
 fs/f2fs/segment.c                                  |  59 +-
 fs/f2fs/super.c                                    |  54 +-
 fs/fat/fat.h                                       |   2 +-
 fs/fat/fatent.c                                    |  21 +-
 fs/fat/file.c                                      |   3 +-
 fs/fat/misc.c                                      |   6 +-
 fs/fs-writeback.c                                  |  15 +-
 fs/fs_pin.c                                        |   9 +-
 fs/fuse/file.c                                     |  53 +-
 fs/fuse/notify.c                                   |   2 +-
 fs/fuse/virtio_fs.c                                |  51 +-
 fs/gfs2/glops.c                                    |  10 +-
 fs/gfs2/lops.c                                     |   4 +-
 fs/inode.c                                         |  15 +-
 fs/iomap/bio.c                                     |   2 +-
 fs/iomap/buffered-io.c                             |   3 +-
 fs/iomap/direct-io.c                               |  16 +-
 fs/iomap/fiemap.c                                  |   8 +-
 fs/iomap/internal.h                                |   9 +
 fs/iomap/ioend.c                                   |   3 +-
 fs/isofs/inode.c                                   |   2 +
 fs/isofs/isofs.h                                   |   2 +
 fs/isofs/rock.c                                    |  11 +-
 fs/jbd2/journal.c                                  |   2 +-
 fs/namespace.c                                     |   7 +-
 fs/nilfs2/dir.c                                    |  34 +
 fs/nilfs2/inode.c                                  |   8 +-
 fs/nilfs2/ioctl.c                                  |   2 +-
 fs/nilfs2/mdt.c                                    |   6 +-
 fs/nilfs2/page.c                                   |  50 +-
 fs/nilfs2/page.h                                   |   4 +-
 fs/nilfs2/recovery.c                               |   2 +-
 fs/nilfs2/segment.c                                |  12 +-
 fs/nilfs2/sysfs.c                                  |   5 +-
 fs/nilfs2/the_nilfs.c                              |  34 +-
 fs/notify/fanotify/fanotify.c                      |   7 +-
 fs/notify/fanotify/fanotify.h                      |  21 +-
 fs/ntfs/attrib.c                                   | 142 ++-
 fs/ntfs/attrlist.c                                 |  10 +-
 fs/ntfs/dir.c                                      |   2 +
 fs/ntfs/ea.c                                       |  67 +-
 fs/ntfs/file.c                                     |  58 +-
 fs/ntfs/inode.c                                    |  46 +-
 fs/ntfs/iomap.c                                    |  16 +-
 fs/ntfs/logfile.c                                  |  11 +-
 fs/ntfs/mft.c                                      | 954 ++++++++++++++-------
 fs/ntfs/mft.h                                      |  19 +-
 fs/ntfs/namei.c                                    |  24 +-
 fs/ntfs/ntfs.h                                     |   3 +-
 fs/ntfs/runlist.c                                  |  98 ++-
 fs/ntfs/runlist.h                                  |   3 +
 fs/ntfs/super.c                                    | 401 +++++++--
 fs/ntfs/volume.h                                   |  15 +
 fs/ntfs3/attrib.c                                  |  15 +
 fs/ntfs3/fslog.c                                   |  29 +-
 fs/ntfs3/index.c                                   |  13 +-
 fs/ntfs3/inode.c                                   |   7 +-
 fs/ocfs2/alloc.c                                   |   9 +-
 fs/ocfs2/cluster/heartbeat.c                       |  26 +-
 fs/ocfs2/cluster/nodemanager.c                     |   7 +-
 fs/ocfs2/dir.c                                     |  76 +-
 fs/ocfs2/dlmglue.c                                 |   4 +
 fs/ocfs2/file.c                                    |  18 +-
 fs/ocfs2/inode.c                                   |  37 +-
 fs/ocfs2/journal.c                                 |   3 +-
 fs/ocfs2/journal.h                                 |   1 -
 fs/ocfs2/super.c                                   |  16 +-
 fs/ocfs2/xattr.c                                   | 149 +++-
 fs/pidfs.c                                         |  43 +-
 fs/proc/generic.c                                  |   5 +-
 fs/proc/task_mmu.c                                 |   6 +-
 fs/read_write.c                                    |   8 +-
 fs/signalfd.c                                      |  28 +-
 fs/splice.c                                        |  12 +-
 fs/stat.c                                          |   6 +-
 fs/udf/inode.c                                     |  43 +-
 fs/udf/super.c                                     |   5 +-
 fs/verity/enable.c                                 |   8 +
 fs/verity/fsverity_private.h                       |   8 +
 fs/verity/measure.c                                |  10 +
 fs/verity/open.c                                   |  47 +-
 fs/verity/read_metadata.c                          |  14 +-
 fs/verity/signature.c                              |  55 +-
 fs/xfs/scrub/agheader.c                            |  15 +-
 fs/xfs/scrub/xfarray.c                             |  69 +-
 include/kvm/arm_arch_timer.h                       |  15 +
 include/kvm/arm_vgic.h                             |   1 +
 include/linux/fault-inject.h                       |  10 +-
 include/linux/fs.h                                 |   4 +-
 include/linux/hugetlb.h                            |   3 +-
 include/linux/libata.h                             |   1 +
 include/linux/memcontrol.h                         |  26 +-
 include/linux/netdevice.h                          |   7 +
 include/linux/panic.h                              |   3 +-
 include/linux/pci.h                                |   2 +-
 include/linux/rtc.h                                |   2 +
 include/math-emu/op-common.h                       |  23 +-
 include/math-emu/soft-fp.h                         |   8 +
 include/media/rc-map.h                             |   2 -
 include/media/v4l2-ctrls.h                         |   6 +
 include/net/addrconf.h                             |   3 +
 include/net/inet_frag.h                            |   1 +
 include/net/ip.h                                   |  25 -
 include/net/ip6_route.h                            |  37 -
 include/net/xfrm.h                                 |  17 +
 include/uapi/linux/iommufd.h                       |   4 +-
 include/uapi/linux/media/arm/mali-c55-config.h     |   2 +
 init/main.c                                        |   6 +-
 init/version.c                                     |   3 +
 ipc/mqueue.c                                       |   7 +
 ipc/msgutil.c                                      |   3 +-
 ipc/namespace.c                                    |   7 +
 ipc/shm.c                                          |  25 +-
 kernel/bpf/queue_stack_maps.c                      |   3 +
 kernel/cgroup/cgroup.c                             |   2 +-
 kernel/cgroup/cpuset.c                             |   4 +-
 kernel/cpu_pm.c                                    |   9 +-
 kernel/debug/gdbstub.c                             |  55 +-
 kernel/fork.c                                      |   3 +-
 kernel/irq/internals.h                             |   1 +
 kernel/irq/kexec.c                                 |   2 +-
 kernel/irq/manage.c                                |  43 +-
 kernel/liveupdate/kexec_handover.c                 |   7 +
 kernel/nstree.c                                    |  80 +-
 kernel/panic.c                                     |  82 +-
 kernel/power/energy_model.c                        |   4 +-
 kernel/resource.c                                  |   2 +-
 kernel/sched/cpufreq_schedutil.c                   |  14 +-
 kernel/sched/ext/ext.c                             | 150 ++--
 kernel/sched/fair.c                                |  29 +-
 kernel/seccomp.c                                   |   7 +-
 kernel/sys.c                                       |   3 +
 kernel/time/clocksource.c                          |   2 +-
 kernel/time/itimer.c                               |   2 +-
 kernel/time/namespace.c                            |   2 +-
 kernel/time/posix-cpu-timers.c                     |   4 +-
 kernel/time/posix-stubs.c                          |   4 +-
 kernel/time/posix-timers.c                         |  25 +-
 kernel/time/tick-sched.c                           |  14 +-
 kernel/time/timekeeping.c                          |   8 +-
 kernel/trace/Kconfig                               |   1 +
 kernel/trace/ring_buffer.c                         |   2 +
 kernel/ucount.c                                    |  21 +-
 kernel/user_namespace.c                            |   5 +-
 lib/842/842_decompress.c                           |   7 +-
 lib/buildid.c                                      |   4 +
 lib/cmdline.c                                      |  13 +-
 lib/decompress_bunzip2.c                           |   6 +-
 lib/fault-inject.c                                 |   7 +-
 lib/iov_iter.c                                     |   4 +
 lib/kobject_uevent.c                               |   2 +-
 lib/plist.c                                        |   7 +
 lib/raid/raid6/x86/avx2.c                          |   6 +
 lib/raid/raid6/x86/avx512.c                        |   6 +
 lib/raid/raid6/x86/recov_avx2.c                    |   2 +
 lib/raid/raid6/x86/recov_avx512.c                  |   2 +
 lib/raid/xor/x86/xor-avx.c                         |   1 +
 lib/stackdepot.c                                   |   2 +-
 lib/tests/cmdline_kunit.c                          |  39 +
 mm/alloc_tag.c                                     |   2 +-
 mm/damon/core.c                                    | 118 ++-
 mm/damon/paddr.c                                   |   8 +-
 mm/damon/sysfs-schemes.c                           |   6 +-
 mm/damon/sysfs.c                                   |  11 +-
 mm/damon/tests/core-kunit.h                        | 381 +++++++-
 mm/damon/vaddr.c                                   |  10 +-
 mm/execmem.c                                       |   4 +-
 mm/huge_memory.c                                   |  23 +-
 mm/hugetlb.c                                       | 151 +++-
 mm/hugetlb_cgroup.c                                |  33 +
 mm/ksm.c                                           |   5 +-
 mm/list_lru.c                                      |   7 +-
 mm/madvise.c                                       |  22 +-
 mm/memcontrol-v1.h                                 |   5 +-
 mm/memcontrol.c                                    | 181 ++--
 mm/memfd.c                                         |  31 +-
 mm/memory.c                                        |  24 +-
 mm/mempolicy.c                                     |  25 +-
 mm/mlock.c                                         |   2 +-
 mm/mremap.c                                        |  33 +-
 mm/nommu.c                                         |   6 +-
 mm/page_alloc.c                                    |  83 +-
 mm/page_alloc.h                                    |   2 +
 mm/page_counter.c                                  |  21 +-
 mm/page_isolation.c                                |  40 +-
 mm/page_table_check.c                              |   4 +-
 mm/page_vma_mapped.c                               |  28 +-
 mm/percpu.c                                        |   5 +-
 mm/shmem.c                                         |  17 +-
 mm/swap.h                                          |   6 +-
 mm/swap_state.c                                    |  29 +-
 mm/truncate.c                                      |   3 +-
 mm/userfaultfd.c                                   |   6 +-
 mm/vma.c                                           |  16 +-
 mm/vmscan.c                                        |  21 +-
 mm/workingset.c                                    |   5 +-
 mm/zswap.c                                         |   5 +-
 net/bluetooth/6lowpan.c                            |   1 +
 net/bluetooth/hci_debugfs.c                        |   9 +
 net/bluetooth/l2cap_core.c                         |  41 +-
 net/bluetooth/l2cap_sock.c                         |   4 +
 net/bluetooth/selftest.c                           |   1 +
 net/bluetooth/smp.c                                |   1 +
 net/ceph/mon_client.c                              |   3 +
 net/ceph/osd_client.c                              |  13 +-
 net/ceph/osdmap.c                                  |  18 +-
 net/core/dev.c                                     |   8 +
 net/core/gro.c                                     |   4 +
 net/core/net_namespace.c                           |   4 +-
 net/core/skbuff.c                                  |  13 +-
 net/ipv4/inet_connection_sock.c                    |  10 +-
 net/ipv4/inet_fragment.c                           |   5 +
 net/ipv4/inet_hashtables.c                         |   5 +-
 net/ipv4/ip_fragment.c                             |   3 +-
 net/ipv4/ip_gre.c                                  |   1 +
 net/ipv4/ipmr.c                                    |  22 +-
 net/ipv4/netfilter/nf_reject_ipv4.c                |   5 +
 net/ipv4/route.c                                   |   4 +-
 net/ipv4/syncookies.c                              |   2 +
 net/ipv4/sysctl_net_ipv4.c                         |   2 +
 net/ipv4/tcp_cong.c                                |   4 +-
 net/ipv4/tcp_input.c                               |   4 +-
 net/ipv4/tcp_output.c                              |   2 +-
 net/ipv6/addrconf.c                                |  46 +-
 net/ipv6/inet6_hashtables.c                        |   4 +-
 net/ipv6/ip6_gre.c                                 |   1 +
 net/ipv6/ip6mr.c                                   |   5 +-
 net/ipv6/netfilter/nf_reject_ipv6.c                |   5 +
 net/ipv6/reassembly.c                              |   4 +-
 net/ipv6/route.c                                   |   2 +-
 net/l2tp/l2tp_core.c                               |  51 +-
 net/l2tp/l2tp_core.h                               |   6 +-
 net/l2tp/l2tp_debugfs.c                            |   4 +-
 net/l2tp/l2tp_netlink.c                            |  11 +-
 net/l2tp/l2tp_ppp.c                                |   8 +-
 net/mac80211/tx.c                                  |  52 +-
 net/mptcp/protocol.c                               |  40 +-
 net/mptcp/protocol.h                               |  10 +-
 net/mptcp/subflow.c                                |   6 +-
 net/mptcp/token.c                                  |  68 +-
 net/mptcp/token_test.c                             |   4 +-
 net/netfilter/nf_conntrack_netlink.c               |   8 +-
 net/packet/af_packet.c                             |  12 +-
 net/rds/ib_cm.c                                    |   6 +-
 net/rds/ib_recv.c                                  |  13 +-
 net/rds/recv.c                                     |   6 +-
 net/sctp/socket.c                                  |  26 +-
 net/smc/smc_tx.c                                   |   7 +
 net/sunrpc/xprtrdma/rpc_rdma.c                     |  27 +-
 net/sunrpc/xprtrdma/svc_rdma_transport.c           |   3 +-
 net/sunrpc/xprtrdma/verbs.c                        |   9 +-
 net/tipc/group.c                                   |  19 +-
 net/tipc/socket.c                                  |  12 +-
 net/unix/sysctl_net_unix.c                         |   4 +-
 net/xdp/xsk_buff_pool.c                            |   2 +
 rust/bindgen_parameters                            |   6 +
 rust/kernel/dma.rs                                 |  21 +-
 rust/kernel/irq/request.rs                         |  28 +-
 rust/kernel/time/hrtimer.rs                        |   6 +-
 scripts/Makefile.autofdo                           |   2 +-
 security/apparmor/af_unix.c                        |  20 +-
 security/apparmor/apparmorfs.c                     |  15 +-
 security/apparmor/file.c                           |  59 +-
 security/apparmor/include/label.h                  |   6 +-
 security/apparmor/include/policy.h                 |  20 +
 security/apparmor/label.c                          |   1 -
 security/apparmor/match.c                          |   3 +-
 security/apparmor/policy.c                         |  19 +
 security/apparmor/policy_unpack.c                  |  13 +-
 sound/core/compress_offload.c                      |  32 +-
 sound/core/init.c                                  |  12 +-
 sound/core/seq/oss/seq_oss_device.h                |   1 +
 sound/core/seq/oss/seq_oss_event.c                 |   3 +
 sound/core/seq/oss/seq_oss_init.c                  |   2 +
 sound/core/timer.c                                 |   1 +
 sound/core/timer_compat.c                          |   1 +
 sound/core/ump_convert.c                           |   2 +-
 sound/drivers/aloop.c                              |  31 +-
 sound/drivers/mpu401/mpu401_uart.c                 |   8 +-
 sound/drivers/mtpav.c                              |   2 +-
 sound/hda/codecs/hdmi/eld.c                        |   6 +-
 sound/hda/codecs/hdmi/hdmi.c                       |   3 +-
 sound/hda/codecs/realtek/alc269.c                  | 138 +--
 sound/hda/codecs/side-codecs/cs35l41_hda.c         |  12 +-
 sound/hda/codecs/side-codecs/tas2781_hda_i2c.c     |  19 +-
 sound/hda/codecs/via.c                             |   1 +
 sound/hda/common/codec.c                           |   6 +
 sound/hda/common/sysfs.c                           |   4 +
 sound/mips/sgio2audio.c                            |  13 +-
 sound/oss/dmasound/dmasound_q40.c                  |  65 +-
 sound/pci/cs46xx/dsp_spos.c                        |   2 +-
 sound/soc/amd/acp-config.c                         |   7 +
 sound/soc/codecs/arizona-jack.c                    |   1 +
 sound/soc/codecs/hdac_hda.c                        |  16 +
 sound/soc/codecs/lpass-wsa-macro.c                 |  42 +-
 sound/soc/codecs/pcm6240.c                         |   2 -
 sound/soc/codecs/rt5682s.c                         |   4 +-
 sound/soc/codecs/rt712-sdca-dmic.c                 |   4 +-
 sound/soc/codecs/tlv320aic32x4-clk.c               |   8 +-
 sound/soc/codecs/wcd9335.c                         |  25 +-
 sound/soc/codecs/wm8994.c                          |   3 +
 sound/soc/codecs/wsa883x.c                         |  13 +-
 sound/soc/codecs/wsa884x.c                         |  11 +-
 sound/soc/fsl/fsl_xcvr.c                           |  28 +-
 sound/soc/intel/atom/sst/sst_acpi.c                |  14 +-
 sound/soc/qcom/qdsp6/q6afe.c                       |  10 +-
 sound/soc/qcom/qdsp6/q6apm-dai.c                   |  12 +-
 sound/soc/qcom/qdsp6/q6apm.c                       |  50 +-
 sound/soc/qcom/qdsp6/q6asm-dai.c                   |   7 +-
 sound/soc/qcom/qdsp6/topology.c                    |  31 +-
 sound/soc/sdca/sdca_class.c                        |   9 +-
 sound/soc/sdw_utils/soc_sdw_rt711.c                |   1 +
 sound/soc/stm/stm32_i2s.c                          |  23 +-
 sound/soc/ti/davinci-mcasp.c                       |   1 +
 sound/synth/emux/emux.c                            |  10 +-
 sound/synth/emux/soundfont.c                       |   9 +
 sound/usb/line6/capture.c                          |  25 +-
 sound/usb/line6/capture.h                          |   2 +-
 sound/usb/line6/playback.c                         |  31 +-
 sound/usb/misc/ua101.c                             |  29 +-
 sound/usb/pcm.c                                    |  20 +-
 sound/usb/quirks-table.h                           |   4 +-
 sound/usb/quirks.c                                 |   4 +
 tools/dma/Makefile                                 |   6 +
 tools/perf/arch/loongarch/util/header.c            |   2 +-
 tools/perf/util/machine.c                          |   2 +-
 tools/perf/util/powerpc-vpadtl.c                   |   2 +-
 tools/perf/util/python.c                           |   2 +
 tools/testing/selftests/cgroup/test_cpuset_prs.sh  |   3 +
 tools/testing/selftests/core/unshare_test.c        |  19 +-
 .../selftests/filesystems/idmapped_tmpfile.c       |   7 +
 tools/testing/selftests/iommu/iommufd.c            |  10 +-
 tools/testing/selftests/landlock/audit_test.c      |   2 +-
 tools/testing/selftests/landlock/net_test.c        |   4 +-
 tools/testing/selftests/landlock/ptrace_test.c     |   2 +-
 tools/testing/selftests/seccomp/seccomp_bpf.c      | 179 ++++
 tools/testing/vma/include/stubs.h                  |   5 +
 1105 files changed, 14314 insertions(+), 6415 deletions(-)
author maintainer
#1 lore raw

PATCH 1/1257 drm/xe: Implement Wa_22016122933

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Tales A. Mendonça <[email protected]>

[ Upstream commit d5b0bf3f37f152583a884c696cf6caa152aa7ed5 ]

On platforms with a standalone media GT and media version 13.00 (MTL/ARL), memory shared between the CPU and the media GT's GuC must not be mapped cached on the CPU side: the CPU can otherwise read stale cache lines for data the GuC has already written.

i915 implements this as Wa_22016122933 (see intel_gt_needs_wa_22016122933(), used by intel_guc_allocate_vma() and intel_gt_coherent_map_type()); xe never inherited it.

The visible symptom on ARL is TLB invalidation acks stalling for a near-constant ~2.3s: the GuC writes the G2H ack in time, but the CPU keeps reading a stale (empty) view of the G2H CTB until the line is naturally evicted, so the fence timeout at 2.25s fires first. GuC log decode confirmed all invalidations were handled promptly by the firmware, and only the media GT was affected. See Link for the full investigation (three machines affected: 7d51, 7dd1, Arc Pro 130T).

Making the mapping coherent instead of uncached does not help: with a GGTT PAT entry repurposed to WB|COH_2WAY the driver comes up and the media GT GuC runs, but the stalls remain (request-to-ack 2290ms). Uncached really is required here. Note that 2-way coherency is not normally reachable from a GGTT PTE (only 2 PAT bits), so that experiment needed a modified PAT table and may not reflect a supported configuration.

Add the OOB workaround scoped like i915 (media version 13.00, media GT only - MEDIA_VERSION() OOB rules only match the media GT on standalone media platforms) and apply XE_BO_FLAG_NEEDS_UC to the GuC-shared allocations the CPU reads from: the CTBs, the GuC log, ADS, the SLPC shared data and the engine activity buffers. hwconfig and the G2G buffer are allocated on the primary GT only, where the workaround does not apply.

Note that XE_BO_FLAG_NEEDS_UC drives both the CPU mapping (uncached) and the GGTT cache mode (XE_CACHE_NONE instead of XE_CACHE_WB), which is stricter than i915: i915 documents the workaround as WC on the CPU side and UC on the GPU side. A CPU-WC variant with the GGTT side kept at XE_CACHE_NONE was measured to be equally effective, but expressing it would require either a new BO flag or decoupling the GGTT cache-mode selection from XE_BO_FLAG_NEEDS_UC - simply swapping in XE_BO_FLAG_FORCE_WC silently relaxes the GPU side back to WB and the stalls return. The stricter mapping is kept here since it is the tested configuration and no throughput difference between the two was measurable; the extra plumbing can be added later if parity with i915 is preferred.

Scope is limited to the GuC-shared allocations, which is where the failures were observed. i915 additionally covers media-GT LRC/ring state; extending xe to match can be done as a follow-up if wanted.

Validation on two ARL machines (7d51 and 7dd1): before, 20-60 TLB invalidation ack stalls per day, every day, for weeks, on every kernel and on two GuC firmware versions (70.53.0 and 70.72.1). After: zero stalls in six weeks of combined runtime, over 10M TLB invalidations processed under the same workloads, across kernels 7.1.6, 7.1.8 and 7.2. The 7dd1 machine, which could not survive a day of media workloads on xe without a platform freeze, has been running xe full time since 11 August, including days with heavy video transcoding, with zero stalls and zero freezes.

The coherency experiment, the CPU-WC measurements and the engine activity coverage gap were found by Navon John Lukose while A/B testing v2 on an ARL 7d51.

---
 drivers/gpu/drm/xe/xe_guc.c                 | 16 ++++++++++++++++
 drivers/gpu/drm/xe/xe_guc.h                 |  2 ++
 drivers/gpu/drm/xe/xe_guc_ads.c             |  3 ++-
 drivers/gpu/drm/xe/xe_guc_ct.c              |  6 ++++--
 drivers/gpu/drm/xe/xe_guc_engine_activity.c |  6 ++++--
 drivers/gpu/drm/xe/xe_guc_log.c             |  7 +++++--
 drivers/gpu/drm/xe/xe_guc_pc.c              |  3 ++-
 drivers/gpu/drm/xe/xe_wa_oob.rules          |  1 +
 8 files changed, 36 insertions(+), 8 deletions(-)
drivers/gpu/drm/xe/xe_guc.c +16 -0
index 4286bd05c6861..c988a2a3b7bdb 100644
@@ -1468,6 +1468,22 @@ int xe_guc_suspend(struct xe_guc *guc)
 	return 0;
 }
 
+/**
+ * xe_guc_bo_wa_flags - Extra BO flags for memory shared with the GuC
+ * @gt: the &xe_gt whose GuC the buffer will be shared with
+ *
+ * Wa_22016122933: on the standalone media GT, memory shared between the
+ * CPU and the GuC must not be mapped cached on the CPU side, otherwise
+ * the CPU can read stale data written by the GuC (e.g. G2H CTB writes)
+ * for multiple seconds.
+ *
+ * Return: additional XE_BO_FLAG_* to use when allocating GuC-shared memory
+ */
+u32 xe_guc_bo_wa_flags(struct xe_gt *gt)
+{
+	return XE_GT_WA(gt, 22016122933) ? XE_BO_FLAG_NEEDS_UC : 0;
+}
+
 void xe_guc_notify(struct xe_guc *guc)
 {
 	struct xe_gt *gt = guc_to_gt(guc);
drivers/gpu/drm/xe/xe_guc.h +2 -0
index 61e3ee19a59bf..c4eca40d69cfc 100644
@@ -30,6 +30,7 @@
 	xe_guc_fw_version_at_least((guc), MAKE_GUC_VER_ARGS(ver))
 
 struct drm_printer;
+struct xe_gt;
 
 void xe_guc_comm_init_early(struct xe_guc *guc);
 int xe_guc_init_noalloc(struct xe_guc *guc);
@@ -45,6 +46,7 @@ void xe_guc_runtime_suspend(struct xe_guc *guc);
 void xe_guc_runtime_resume(struct xe_guc *guc);
 int xe_guc_suspend(struct xe_guc *guc);
 int xe_guc_softreset(struct xe_guc *guc);
+u32 xe_guc_bo_wa_flags(struct xe_gt *gt);
 void xe_guc_notify(struct xe_guc *guc);
 int xe_guc_auth_huc(struct xe_guc *guc, u32 rsa_addr);
 int xe_guc_mmio_send(struct xe_guc *guc, const u32 *request, u32 len);
drivers/gpu/drm/xe/xe_guc_ads.c +2 -1
index 58a3f6293ce46..9ceb662ca40e4 100644
@@ -435,7 +435,8 @@ int xe_guc_ads_init(struct xe_guc_ads *ads)
 					  XE_BO_FLAG_SYSTEM |
 					  XE_BO_FLAG_GGTT |
 					  XE_BO_FLAG_GGTT_INVALIDATE |
-					  XE_BO_FLAG_PINNED_NORESTORE);
+					  XE_BO_FLAG_PINNED_NORESTORE |
+					  xe_guc_bo_wa_flags(gt));
 	if (IS_ERR(bo))
 		return PTR_ERR(bo);
 
drivers/gpu/drm/xe/xe_guc_ct.c +4 -2
index fe70c0fd85c52..1ad96e4b4f893 100644
@@ -376,7 +376,8 @@ int xe_guc_ct_init(struct xe_guc_ct *ct)
 					  XE_BO_FLAG_SYSTEM |
 					  XE_BO_FLAG_GGTT |
 					  XE_BO_FLAG_GGTT_INVALIDATE |
-					  XE_BO_FLAG_PINNED_NORESTORE);
+					  XE_BO_FLAG_PINNED_NORESTORE |
+					  xe_guc_bo_wa_flags(gt));
 	if (IS_ERR(bo))
 		return PTR_ERR(bo);
 
@@ -386,7 +387,8 @@ int xe_guc_ct_init(struct xe_guc_ct *ct)
 					  XE_BO_FLAG_SYSTEM |
 					  XE_BO_FLAG_GGTT |
 					  XE_BO_FLAG_GGTT_INVALIDATE |
-					  XE_BO_FLAG_PINNED_NORESTORE);
+					  XE_BO_FLAG_PINNED_NORESTORE |
+					  xe_guc_bo_wa_flags(gt));
 	if (IS_ERR(bo))
 		return PTR_ERR(bo);
 
drivers/gpu/drm/xe/xe_guc_engine_activity.c +4 -2
index a782be57caadb..729ce8ac140b6 100644
@@ -97,7 +97,8 @@ static int allocate_engine_activity_buffers(struct xe_guc *guc,
 
 	metadata_bo = xe_bo_create_pin_map_novm(gt_to_xe(gt), tile, PAGE_ALIGN(metadata_size),
 						ttm_bo_type_kernel, XE_BO_FLAG_SYSTEM |
-						XE_BO_FLAG_GGTT | XE_BO_FLAG_GGTT_INVALIDATE,
+						XE_BO_FLAG_GGTT | XE_BO_FLAG_GGTT_INVALIDATE |
+						xe_guc_bo_wa_flags(gt),
 						false);
 
 	if (IS_ERR(metadata_bo))
@@ -105,7 +106,8 @@ static int allocate_engine_activity_buffers(struct xe_guc *guc,
 
 	bo = xe_bo_create_pin_map_novm(gt_to_xe(gt), tile, PAGE_ALIGN(size),
 				       ttm_bo_type_kernel, XE_BO_FLAG_VRAM_IF_DGFX(tile) |
-				       XE_BO_FLAG_GGTT | XE_BO_FLAG_GGTT_INVALIDATE, false);
+				       XE_BO_FLAG_GGTT | XE_BO_FLAG_GGTT_INVALIDATE |
+				       xe_guc_bo_wa_flags(gt), false);
 
 	if (IS_ERR(bo)) {
 		xe_bo_unpin_map_no_vm(metadata_bo);
drivers/gpu/drm/xe/xe_guc_log.c +5 -2
index 538d4df0f7aa7..7d006268ce916 100644
@@ -17,6 +17,7 @@
 #include "xe_force_wake.h"
 #include "xe_gt_printk.h"
 #include "xe_gt_types.h"
+#include "xe_guc.h"
 #include "xe_map.h"
 #include "xe_mmio.h"
 #include "xe_module.h"
@@ -624,14 +625,16 @@ void xe_guc_log_print_lfd(struct xe_guc_log *log, struct drm_printer *p)
 int xe_guc_log_init(struct xe_guc_log *log)
 {
 	struct xe_device *xe = log_to_xe(log);
-	struct xe_tile *tile = gt_to_tile(log_to_gt(log));
+	struct xe_gt *gt = log_to_gt(log);
+	struct xe_tile *tile = gt_to_tile(gt);
 	struct xe_bo *bo;
 
 	bo = xe_managed_bo_create_pin_map(xe, tile, GUC_LOG_SIZE,
 					  XE_BO_FLAG_SYSTEM |
 					  XE_BO_FLAG_GGTT |
 					  XE_BO_FLAG_GGTT_INVALIDATE |
-					  XE_BO_FLAG_PINNED_NORESTORE);
+					  XE_BO_FLAG_PINNED_NORESTORE |
+					  xe_guc_bo_wa_flags(gt));
 	if (IS_ERR(bo))
 		return PTR_ERR(bo);
 
drivers/gpu/drm/xe/xe_guc_pc.c +2 -1
index 7cf8f48585988..58e41b2319bc5 100644
@@ -1378,7 +1378,8 @@ int xe_guc_pc_init(struct xe_guc_pc *pc)
 					  XE_BO_FLAG_VRAM_IF_DGFX(tile) |
 					  XE_BO_FLAG_GGTT |
 					  XE_BO_FLAG_GGTT_INVALIDATE |
-					  XE_BO_FLAG_PINNED_NORESTORE);
+					  XE_BO_FLAG_PINNED_NORESTORE |
+					  xe_guc_bo_wa_flags(gt));
 	if (IS_ERR(bo))
 		return PTR_ERR(bo);
 
drivers/gpu/drm/xe/xe_wa_oob.rules +1 -0
index 3001155f8d09e..6662987effd73 100644
@@ -14,6 +14,7 @@
 16017236439	PLATFORM(PVC)
 14019821291	MEDIA_VERSION_RANGE(1300, 2000)
 14015076503	MEDIA_VERSION(1300)
+22016122933	MEDIA_VERSION(1300)
 14018913170	GRAPHICS_VERSION_RANGE(1270, 1274)
 		MEDIA_VERSION(1300)
 		PLATFORM(DG2)
Signature · 1 line
2.53.0
#2 lore raw

Re: [PATCH 7.3 0001/1257] drm/xe: Implement Wa_22016122933

On ARL-H at least, this commit adds about 3 s to xe probe and 2.5 s to every s2idle resume, because the GuC buffers are now mapped UC on the CPU side. A follow-up maps them WC and keeps the TLB fix. It has Tales's Reviewed-by and Tested-by and a Fixes: tag for this commit, but is not merged yet:

https://lore.kernel.org/intel-xe/[email protected]/

Whether to take this now or wait for the follow-up is up to you and the xe maintainers (added to Cc).

Thanks,
Navon

#3 lore raw

Re: [PATCH 7.3 0001/1257] drm/xe: Implement Wa_22016122933

Hi Greg, Navon,

From my side I'd prefer this goes in now: it fixes real platform freezes on MTL/ARL (TLB invalidation stalls on the media GT), and the probe/resume cost Navon measured is the price of the stricter UC mapping, not a functional regression.

Navon's follow-up keeps the fix with a WC CPU mapping and removes that cost. I've reviewed and tested it, and it carries a Fixes: tag for this commit, so it should reach stable on its own once it lands.

Thomas, Rodrigo: could you take a look at the follow-up when you have a chance?

https://lore.kernel.org/intel-xe/[email protected]/

Thanks,
Tales

Em dom., 8 de nov. de 2026 às 01:07, Navon John Lukose <[email protected]> escreveu:

Quoted 14 lines

On ARL-H at least, this commit adds about 3 s to xe probe and 2.5 s to every s2idle resume, because the GuC buffers are now mapped UC on the CPU side. A follow-up maps them WC and keeps the TLB fix. It has Tales's Reviewed-by and Tested-by and a Fixes: tag for this commit, but is not merged yet:

https://lore.kernel.org/intel-xe/[email protected]/

Whether to take this now or wait for the follow-up is up to you and the xe maintainers (added to Cc).

Thanks,
Navon

Signature · 2 lines
Tales A. Mendonça
talesam.org | communitybig.org
author maintainer
#4 lore raw

PATCH 2/1257 media: cx88: Specify rc type at rc_allocate_type()

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit a127f5e9f9ea0470ee3bf83fab82441ae11af208 ]

Changing the type of the rc device after allocation is ugly and this will also break in a future commit. Ensure that the allocation happens with the correct type in the first place.

---
 drivers/media/pci/cx88/cx88-input.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)
drivers/media/pci/cx88/cx88-input.c +12 -10
index 5d9ce4f9af011..c96d289e5ab78 100644
@@ -259,7 +259,7 @@ static void cx88_ir_close(struct rc_dev *rc)
 int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
 {
 	struct cx88_IR *ir;
-	struct rc_dev *dev;
+	struct rc_dev *dev = NULL;
 	char *ir_codes = NULL;
 	u64 rc_proto = RC_PROTO_BIT_OTHER;
 	int err = -ENOMEM;
@@ -268,11 +268,8 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
 				 */
 
 	ir = kzalloc_obj(*ir);
-	dev = rc_allocate_device(RC_DRIVER_IR_RAW);
-	if (!ir || !dev)
-		goto err_out_free;
-
-	ir->dev = dev;
+	if (!ir)
+		return -ENOMEM;
 
 	/* detect & configure */
 	switch (core->boardnr) {
@@ -439,6 +436,13 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
 		goto err_out_free;
 	}
 
+	dev = rc_allocate_device(ir->sampling ?
+				 RC_DRIVER_IR_RAW : RC_DRIVER_SCANCODE);
+	if (!dev)
+		goto err_out_free;
+
+	ir->dev = dev;
+
 	/*
 	 * The usage of mask_keycode were very convenient, due to several
 	 * reasons. Among others, the scancode tables were using the scancode
@@ -477,12 +481,10 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
 	dev->close = cx88_ir_close;
 	dev->scancode_mask = hardware_mask;
 
-	if (ir->sampling) {
+	if (ir->sampling)
 		dev->timeout = MS_TO_US(10); /* 10 ms */
-	} else {
-		dev->driver_type = RC_DRIVER_SCANCODE;
+	else
 		dev->allowed_protocols = rc_proto;
-	}
 
 	ir->core = core;
 	core->ir = ir;
Signature · 1 line
2.53.0
author maintainer
#5 lore raw

PATCH 3/1257 media: saa7134: Specify rc type at rc_allocate_type()

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit 33154da9f78041edd93f0895a7d697c67994d75b ]

Changing the type of the rc device after allocation is ugly and this will also break in a future commit. Ensure that the allocation happens with the correct type in the first place.

---
 drivers/media/pci/saa7134/saa7134-input.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/media/pci/saa7134/saa7134-input.c +3 -4
index 7f6680de31564..b2a2372d149a3 100644
@@ -769,7 +769,8 @@ int saa7134_input_init1(struct saa7134_dev *dev)
 	}
 
 	ir = kzalloc_obj(*ir);
-	rc = rc_allocate_device(RC_DRIVER_SCANCODE);
+	rc = rc_allocate_device(raw_decode ?
+				RC_DRIVER_IR_RAW : RC_DRIVER_SCANCODE);
 	if (!ir || !rc) {
 		err = -ENOMEM;
 		goto err_out_free;
@@ -792,10 +793,8 @@ int saa7134_input_init1(struct saa7134_dev *dev)
 	rc->priv = dev;
 	rc->open = saa7134_ir_open;
 	rc->close = saa7134_ir_close;
-	if (raw_decode) {
-		rc->driver_type = RC_DRIVER_IR_RAW;
+	if (raw_decode)
 		rc->allowed_protocols = RC_PROTO_BIT_ALL_IR_DECODER;
-	}
 
 	rc->device_name = saa7134_boards[dev->board].name;
 	rc->input_phys = ir->phys;
Signature · 1 line
2.53.0
author maintainer
#6 lore raw

PATCH 4/1257 mptcp: fix MP_CAPABLE token migration when cloning reqsk

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ruide Cao <[email protected]>

[ Upstream commit 2093bc7fa50056fef8620d2b82bcb2e9a0a5575d ]

TCP request migration clones pending request sockets with inet_reqsk_clone(). For MPTCP MP_CAPABLE requests this byte-copies the token_node hlist state into the clone even though the token table still names the original request, and the following warning can be seen:

  WARNING: net/mptcp/token.c:364 at mptcp_token_destroy_request+0x2b0/0x330, CPU#2: swapper/2/0
  CPU: 2 UID: 0 PID: 0 Comm: swapper/2 Not tainted 7.2.0-rc5-00353-gc27e36054537 #10 PREEMPT(full)
  RIP: 0010:mptcp_token_destroy_request (net/mptcp/token.c:364 (discriminator 1))
  Call Trace:
   <IRQ>
   subflow_v4_req_destructor (net/mptcp/subflow.c:694)
   __reqsk_free (net/ipv4/inet_connection_sock.c:906)
   reqsk_timer_handler (include/net/request_sock.h:137 net/ipv4/inet_connection_sock.c:1147)
   call_timer_fn (kernel/time/timer.c:1748)

Move token request ownership from the original request to the clone under the token bucket lock. Make mptcp_token_accept() and mptcp_token_destroy_request() re-check token_node under the same lock and treat an already moved or removed request as a normal race instead of warning. This also keeps token bucket chain_len accounting balanced.

If a passive MP_CAPABLE socket cannot claim the token, destroy the provisional MPTCP socket and let the subflow fall back rather than installing a socket with mismatched token ownership. Mark that path as a passive handshake fallback so MPCapableFallbackACK records the downgrade.

If the speculative clone later loses the inet_ehash_insert() ownership arbitration, the original request may find that its token was already moved and fall back to plain TCP. The clone destructor then releases the token reservation and keeps chain_len balanced. This trades an exceptionally rare fallback for eliminating the warning and persistent accounting drift.

---
 net/mptcp/protocol.c   | 31 +++++++++++++++----
 net/mptcp/protocol.h   |  4 ++-
 net/mptcp/subflow.c    |  6 +++-
 net/mptcp/token.c      | 68 +++++++++++++++++++++++++++++++++++++-----
 net/mptcp/token_test.c |  4 +--
 5 files changed, 97 insertions(+), 16 deletions(-)
net/mptcp/protocol.c +26 -5
index e89a69ab927c9..b902e24acd68b 100644
@@ -3706,6 +3706,24 @@ static void mptcp_copy_ip_options(struct sock *newsk, const struct sock *sk)
 	rcu_read_unlock();
 }
 
+static void mptcp_sk_clone_destroy(struct sock *nsk)
+{
+	struct mptcp_sock *msk = mptcp_sk(nsk);
+
+	mptcp_release_sched(msk);
+	mptcp_set_state(nsk, TCP_CLOSE);
+	/* inet_csk_prepare_forced_close() clears TCP sock_ops state via
+	 * tcp_sk(), but nsk is an MPTCP master socket; keep the inet-level
+	 * destroy preparation here.
+	 */
+	bh_unlock_sock(nsk);
+	sock_put(nsk);
+	sock_set_flag(nsk, SOCK_DEAD);
+	tcp_orphan_count_inc();
+	inet_sk(nsk)->inet_num = 0;
+	inet_csk_destroy_sock(nsk);
+}
+
 struct sock *mptcp_sk_clone_init(const struct sock *sk,
 				 const struct mptcp_options_received *mp_opt,
 				 struct sock *ssk,
@@ -3765,11 +3783,6 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk,
 	list_add(&subflow->node, &msk->conn_list);
 	sock_hold(ssk);
 
-	/* new mpc subflow takes ownership of the newly
-	 * created mptcp socket
-	 */
-	mptcp_token_accept(subflow_req, msk);
-
 	/* set msk addresses early to ensure mptcp_pm_get_local_id()
 	 * uses the correct data
 	 */
@@ -3778,6 +3791,14 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk,
 	mptcp_rcv_space_init(msk, ssk);
 	msk->rcvq_space.time = mptcp_stamp();
 
+	if (!mptcp_token_accept(subflow_req, msk)) {
+		list_del_init(&subflow->node);
+		WRITE_ONCE(msk->first, NULL);
+		sock_put(ssk);
+		mptcp_sk_clone_destroy(nsk);
+		return NULL;
+	}
+
 	if (mp_opt->suboptions & OPTION_MPTCP_MPC_ACK)
 		__mptcp_subflow_fully_established(msk, subflow, mp_opt);
 	bh_unlock_sock(nsk);
net/mptcp/protocol.h +3 -1
index 0384d6a023f9d..3c9ad99ee7ef0 100644
@@ -1081,9 +1081,11 @@ static inline void mptcp_token_init_request(struct request_sock *req)
 }
 
 int mptcp_token_new_request(struct request_sock *req);
+void mptcp_token_move_request(struct request_sock *req,
+			      struct request_sock *new_req);
 void mptcp_token_destroy_request(struct request_sock *req);
 int mptcp_token_new_connect(struct sock *ssk);
-void mptcp_token_accept(struct mptcp_subflow_request_sock *r,
+bool mptcp_token_accept(struct mptcp_subflow_request_sock *r,
 			struct mptcp_sock *msk);
 bool mptcp_token_exists(u32 token);
 struct mptcp_sock *mptcp_token_get_sock(struct net *net, u32 token);
net/mptcp/subflow.c +5 -1
index 3139a9ab2853a..2c72cb50fbf36 100644
@@ -78,6 +78,8 @@ void mptcp_subflow_reqsk_clone(struct request_sock *req,
 	}
 
 	new_subflow_req->msk = msk;
+
+	mptcp_token_move_request(req, new_req);
 }
 
 static void subflow_generate_hmac(u64 key1, u64 key2, u32 nonce1, u32 nonce2,
@@ -922,8 +924,10 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,
 
 		if (ctx->mp_capable) {
 			ctx->conn = mptcp_sk_clone_init(listener->conn, &mp_opt, child, req);
-			if (!ctx->conn)
+			if (!ctx->conn) {
+				fallback = true;
 				goto fallback;
+			}
 
 			ctx->subflow_id = 1;
 			owner = mptcp_sk(ctx->conn);
net/mptcp/token.c +61 -7

107 lines not on this page · raw message

net/mptcp/token_test.c +2 -2
index 4fc39fa2e262d..be9acce8a5673 100644
@@ -99,7 +99,7 @@ static void mptcp_token_test_accept(struct kunit *test)
 	KUNIT_ASSERT_EQ(test, 0,
 			mptcp_token_new_request((struct request_sock *)req));
 	msk->token = req->token;
-	mptcp_token_accept(req, msk);
+	KUNIT_EXPECT_TRUE(test, mptcp_token_accept(req, msk));
 	KUNIT_EXPECT_PTR_EQ(test, msk, mptcp_token_get_sock(&init_net, msk->token));
 
 	/* this is now a no-op */
@@ -122,7 +122,7 @@ static void mptcp_token_test_destroyed(struct kunit *test)
 	KUNIT_ASSERT_EQ(test, 0,
 			mptcp_token_new_request((struct request_sock *)req));
 	msk->token = req->token;
-	mptcp_token_accept(req, msk);
+	KUNIT_EXPECT_TRUE(test, mptcp_token_accept(req, msk));
 
 	/* simulate race on removal */
 	refcount_set(&sk->sk_refcnt, 0);
Signature · 1 line
2.53.0
author maintainer
#7 lore raw

PATCH 5/1257 x86/mm/pat: Use pr_warn() for early W^X warnings

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Mike Rapoport (Microsoft) <[email protected]>

[ Upstream commit ea6fd393cb9e6811a748c7551de0dd3090f9dcde ]

Nathan Chancellor reports the following warning:

CPA detected W^X violation: 8000000000000123 -> 0000000000000123 range: 0xffffffffc0400000 - 0xffffffffc0400fff PFN 100e00

from its_alloc() doing set_memory_x() during early retpoline setup.

The warning is not factually wrong but it is unproductive. First, the RWX permission is temporary and fixed up by execmem_restore_rox(). Second, at the time of the warning, all kernel text is mapped RWX. So there is not even a transient actual security issue.

The right way to fix this up is to relax RWX detection during boot but make a final verification pass over all kernel page tables before running userspace. There is code to do that today (debug_checkwx()) but it must be enabled explicitly in Kconfig.

For now, retain the warning even if it's unproductive, but make it scream less loudly: use pr_warn_once() rather than WARN_ONCE().

Remove the warning once debug_checkwx() behavior becomes unconditional.

---
 arch/x86/mm/pat/set_memory.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/x86/mm/pat/set_memory.c +15 -0
index 226660973d515..c71f6774a2f32 100644
@@ -719,6 +719,21 @@ static inline pgprot_t verify_rwx(pgprot_t old, pgprot_t new, unsigned long star
 		return new;
 
 	end = start + npg * PAGE_SIZE - 1;
+
+	/*
+	 * If the kernel text is still RWX, gently complain, this could be a
+	 * false positive.
+	 * Once debug_checkwx() becomes mandatory for CONFIG_STRICT_KERNEL_RWX,
+	 * the warning can be removed completely.
+	 */
+	if (!kernel_set_to_readonly) {
+		pr_warn_once("CPA detected W^X violation: %016llx -> %016llx range: 0x%016lx - 0x%016lx PFN %lx\n",
+		  (unsigned long long)pgprot_val(old),
+		  (unsigned long long)pgprot_val(new),
+		  start, end, pfn);
+		return new;
+	}
+
 	WARN_ONCE(1, "CPA detected W^X violation: %016llx -> %016llx range: 0x%016lx - 0x%016lx PFN %lx\n",
 		  (unsigned long long)pgprot_val(old),
 		  (unsigned long long)pgprot_val(new),
Signature · 1 line
2.53.0
author maintainer
#9 lore raw

PATCH 6/1257 inet: reject unhashed sockets during established lookups

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Hyunwoo Kim <[email protected]>

[ Upstream commit 4e2b3ef19e0e04adca38442f07dd6bc93c712bf1 ]

TCP established ehash lookups are lockless. The socket caches involved use SLAB_TYPESAFE_BY_RCU, so memory can be reused before an RCU reader that retained its old address has finished.

After a tuple match, __inet_lookup_established() and __inet6_lookup_established() acquire a reference and repeat the tuple check. They do not check whether the new object is hashed. If the address is reused for a socket with the same tuple, the lookup can acquire a reference to the new object and return it while its nulls node is unhashed.

A PoC that drives reuse with a SYN cookie request socket reproduced the crash. The new request socket is unhashed and has a NULL rsk_listener. A lookup that had loaded the address of the old request socket acquired the reference published by tcp_get_cookie_sock() and returned the new object. tcp_v4_rcv() then read sk_state through the NULL listener.

The resulting crash was:

  BUG: kernel NULL pointer dereference, address: 0000000000000012
  #PF: supervisor read access in kernel mode
  #PF: error_code(0x0000) - not-present page
  ...
  Oops: Oops: 0000 [#1] SMP NOPTI
  CPU: 4 UID: 0 PID: 0 Comm: swapper/4 Not tainted 7.3.0-00591-g0e135910deec #1 PREEMPT(lazy)
  ...
  RIP: 0010:tcp_v4_rcv+0x44e/0x1280
  ...
  R10: 0000000000000001 R11: 00000000024ca8c0 R12: 0000000000000000
  ...
  CR2: 0000000000000012 CR3: 0000000103d50004 CR4: 0000000000770ef0
  ...
  Call Trace:
   <IRQ>
   ? raw_local_deliver+0xae/0x240
   ip_protocol_deliver_rcu+0x2d/0x180
   ip_local_deliver_finish+0x84/0x100
   ip_sublist_rcv_finish+0x5f/0x70
   ip_sublist_rcv+0x12a/0x1d0
   ip_list_rcv+0xfd/0x130
   __netif_receive_skb_list_core+0x223/0x250
   netif_receive_skb_list_internal+0x1d2/0x2c0
   ? try_fill_recv+0x39/0x7b0
   napi_complete_done+0x74/0x170
   virtnet_poll+0x445/0x600
   __napi_poll+0x27/0x1e0
   net_rx_action+0x2fe/0x3b0
   handle_softirqs+0xc2/0x2c0
   __irq_exit_rcu+0x74/0xd0
   common_interrupt+0x7f/0x90
   </IRQ>
  ...
  Kernel panic - not syncing: Fatal exception in interrupt

After taking a reference, check whether the nulls node is unhashed in both IPv4 and IPv6 established lookups. If it is unhashed or the tuple no longer matches, drop the reference and restart the lookup.

Lookups racing with the TIME_WAIT hashdance, or with a request being replaced by its child, now restart and find the new socket instead of returning the old one.

Request sockets that were never inserted into ehash can have a nonzero refcount, and a stale lookup can hold a transient reference. Therefore, when SYN cookie, Fast Open, and request migration paths fail after setting a nonzero refcount, release the references held by those paths with reqsk_put() instead of freeing the request directly.

---
 net/ipv4/inet_connection_sock.c | 10 +++++++---
 net/ipv4/inet_hashtables.c      |  5 +++--
 net/ipv4/syncookies.c           |  2 ++
 net/ipv4/tcp_input.c            |  4 +++-
 net/ipv6/inet6_hashtables.c     |  4 +++-
 5 files changed, 18 insertions(+), 7 deletions(-)
net/ipv4/inet_connection_sock.c +7 -3
index c6f8011200a0b..8e891c8141f85 100644
@@ -1140,10 +1140,14 @@ static void reqsk_timer_handler(struct timer_list *t)
 	 */
 	if (nreq) {
 		__NET_INC_STATS(net, LINUX_MIB_TCPMIGRATEREQFAILURE);
+		/* The timer was not armed, drop its reference here. */
+		reqsk_put(nreq);
 no_ownership:
 		reqsk_migrate_reset(nreq);
 		reqsk_queue_removed(queue, nreq);
-		__reqsk_free(nreq);
+		/* Drop the temporary reference and the one reserved for ehash. */
+		reqsk_put(nreq);
+		reqsk_put(nreq);
 	}
 
 drop:
@@ -1451,7 +1455,7 @@ struct sock *inet_csk_complete_hashdance(struct sock *sk, struct sock *child,
 
 			__NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPMIGRATEREQFAILURE);
 			reqsk_migrate_reset(nreq);
-			__reqsk_free(nreq);
+			reqsk_put(nreq);
 		} else if (inet_csk_reqsk_queue_add(sk, req, child)) {
 			return child;
 		}
@@ -1506,7 +1510,7 @@ void inet_csk_listen_stop(struct sock *sk)
 					__NET_INC_STATS(sock_net(nsk),
 							LINUX_MIB_TCPMIGRATEREQFAILURE);
 					reqsk_migrate_reset(nreq);
-					__reqsk_free(nreq);
+					reqsk_put(nreq);
 				}
 				rcu_read_unlock();
 
net/ipv4/inet_hashtables.c +3 -2
index ba0faa9ae2bb3..58d54965036a2 100644
@@ -552,8 +552,9 @@ struct sock *__inet_lookup_established(const struct net *net,
 		if (likely(inet_match(net, sk, acookie, ports, dif, sdif))) {
 			if (unlikely(!refcount_inc_not_zero(&sk->sk_refcnt)))
 				goto out;
-			if (unlikely(!inet_match(net, sk, acookie,
-						 ports, dif, sdif))) {
+			if (unlikely(hlist_nulls_unhashed_lockless(&sk->sk_nulls_node) ||
+				     !inet_match(net, sk, acookie, ports, dif,
+						 sdif))) {
 				sock_gen_put(sk);
 				goto begin;
 			}
net/ipv4/syncookies.c +2 -0
index 73e1297681847..6440305615378 100644
@@ -218,6 +218,8 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, struct sk_buff *skb,
 
 		bh_unlock_sock(child);
 		sock_put(child);
+		reqsk_put(req);
+		return NULL;
 	}
 	__reqsk_free(req);
 
net/ipv4/tcp_input.c +3 -1
index 99baf14afdfd8..3583867487d7f 100644
@@ -7777,7 +7777,9 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
 		if (!inet_csk_reqsk_queue_add(sk, req, fastopen_sk)) {
 			bh_unlock_sock(fastopen_sk);
 			sock_put(fastopen_sk);
-			goto drop_and_free;
+			/* tcp_disconnect() already dropped one reqsk ref. */
+			reqsk_put(req);
+			goto drop;
 		}
 		READ_ONCE(sk->sk_data_ready)(sk);
 		bh_unlock_sock(fastopen_sk);
net/ipv6/inet6_hashtables.c +3 -1
index b111b51d69fc9..aa5fa1dd062f7 100644
@@ -108,7 +108,9 @@ struct sock *__inet6_lookup_established(const struct net *net,
 		if (unlikely(!refcount_inc_not_zero(&sk->sk_refcnt)))
 			goto out;
 
-		if (unlikely(!inet6_match(net, sk, saddr, daddr, ports, dif, sdif))) {
+		if (unlikely(hlist_nulls_unhashed_lockless(&sk->sk_nulls_node) ||
+			     !inet6_match(net, sk, saddr, daddr, ports, dif,
+					  sdif))) {
 			sock_gen_put(sk);
 			goto begin;
 		}
Signature · 1 line
2.53.0
author maintainer
#10 lore raw

PATCH 7/1257 rust: irq: declare cfi_encoding for irqreturn

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sami Tolvanen <[email protected]>

[ Upstream commit 01f3e6b4b1c8c1748e59ba53631ab1f5d9ad0ea4 ]

The IRQ callbacks return c_uint. C calls them through irq_handler_t, which returns enum irqreturn. kCFI encodes enum types by name even with integer normalization, so the type ids never match and every call fails the CFI check.

Generate irqreturn as a newtype with a cfi_encoding, as is done for lru_status, and return bindings::irqreturn_t from the callbacks.

Fixes 0851d34a8cc3 ("rust: irq: add support for non-threaded IRQs and handlers")
Fixes 135d40523244 ("rust: irq: add support for threaded IRQs and handlers")
[ sashal: Adjusted insertion context to preserve existing fwctl_rpc_scope CFI declarations. ]
---
 rust/bindgen_parameters    |  2 ++
 rust/kernel/irq/request.rs | 28 +++++++++++++++++-----------
 2 files changed, 19 insertions(+), 11 deletions(-)
rust/bindgen_parameters +2 -0
index 39aae62dca669..cbc0a302647e5 100644
@@ -29,6 +29,8 @@
 # enums that appear in indirect function calls should specify a cfi type
 --newtype-enum fwctl_rpc_scope
 --with-attribute-custom-enum=fwctl_rpc_scope='#[cfi_encoding="15fwctl_rpc_scope"]'
+--newtype-enum irqreturn
+--with-attribute-custom-enum=irqreturn='#[cfi_encoding="9irqreturn"]'
 --newtype-enum lru_status
 --with-attribute-custom-enum=lru_status='#[cfi_encoding="10lru_status"]'
 
rust/kernel/irq/request.rs +17 -11
index c1c6525a676a7..1afa9fcaad1f6 100644
@@ -25,10 +25,10 @@
 #[repr(u32)]
 pub enum IrqReturn {
     /// The interrupt was not from this device or was not handled.
-    None = bindings::irqreturn_IRQ_NONE,
+    None = bindings::irqreturn::IRQ_NONE.0,
 
     /// The interrupt was handled by this device.
-    Handled = bindings::irqreturn_IRQ_HANDLED,
+    Handled = bindings::irqreturn::IRQ_HANDLED.0,
 }
 
 /// Callbacks for an IRQ handler.
@@ -240,25 +240,28 @@ fn drop(self: Pin<&mut Self>) {
 /// # Safety
 ///
 /// This function should be only used as the callback in `request_irq`.
-unsafe extern "C" fn handle_irq_callback<T: Handler>(_irq: i32, ptr: *mut c_void) -> c_uint {
+unsafe extern "C" fn handle_irq_callback<T: Handler>(
+    _irq: i32,
+    ptr: *mut c_void,
+) -> bindings::irqreturn_t {
     let ptr = ptr.cast_const().cast::<Registration<'_, T>>();
     // SAFETY: `ptr` is a pointer to `Registration<'_, T>` set in `Registration::new()`.
     let registration = unsafe { &*ptr };
 
-    T::handle(&registration.handler) as c_uint
+    bindings::irqreturn_t(T::handle(&registration.handler) as c_uint)
 }
 
 /// The value that can be returned from [`ThreadedHandler::handle`].
 #[repr(u32)]
 pub enum ThreadedIrqReturn {
     /// The interrupt was not from this device or was not handled.
-    None = bindings::irqreturn_IRQ_NONE,
+    None = bindings::irqreturn::IRQ_NONE.0,
 
     /// The interrupt was handled by this device.
-    Handled = bindings::irqreturn_IRQ_HANDLED,
+    Handled = bindings::irqreturn::IRQ_HANDLED.0,
 
     /// The handler wants the handler thread to wake up.
-    WakeThread = bindings::irqreturn_IRQ_WAKE_THREAD,
+    WakeThread = bindings::irqreturn::IRQ_WAKE_THREAD.0,
 }
 
 /// Callbacks for a threaded IRQ handler.
@@ -461,23 +464,26 @@ fn drop(self: Pin<&mut Self>) {
 unsafe extern "C" fn handle_threaded_irq_callback<T: ThreadedHandler>(
     _irq: i32,
     ptr: *mut c_void,
-) -> c_uint {
+) -> bindings::irqreturn_t {
     let ptr = ptr.cast_const().cast::<ThreadedRegistration<'_, T>>();
     // SAFETY: `ptr` is a pointer to `ThreadedRegistration<'_, T>` set in
     // `ThreadedRegistration::new()`.
     let registration = unsafe { &*ptr };
 
-    T::handle(&registration.handler) as c_uint
+    bindings::irqreturn_t(T::handle(&registration.handler) as c_uint)
 }
 
 /// # Safety
 ///
 /// This function should be only used as the callback in `request_threaded_irq`.
-unsafe extern "C" fn thread_fn_callback<T: ThreadedHandler>(_irq: i32, ptr: *mut c_void) -> c_uint {
+unsafe extern "C" fn thread_fn_callback<T: ThreadedHandler>(
+    _irq: i32,
+    ptr: *mut c_void,
+) -> bindings::irqreturn_t {
     let ptr = ptr.cast_const().cast::<ThreadedRegistration<'_, T>>();
     // SAFETY: `ptr` is a pointer to `ThreadedRegistration<'_, T>` set in
     // `ThreadedRegistration::new()`.
     let registration = unsafe { &*ptr };
 
-    T::handle_threaded(&registration.handler) as c_uint
+    bindings::irqreturn_t(T::handle_threaded(&registration.handler) as c_uint)
 }
Signature · 1 line
2.53.0
author maintainer
#11 lore raw

PATCH 8/1257 rust: hrtimer: declare cfi_encoding for hrtimer_restart

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sami Tolvanen <[email protected]>

commit 39fe6892fd52faed6325ff7f13a92da01ab35727 upstream.

The hrtimer callbacks return bindings::hrtimer_restart, which bindgen generates as c_uint. C calls them through hrtimer->function, which returns enum hrtimer_restart. kCFI encodes enum types by name even with integer normalization, so the type ids never match and every call fails the CFI check.

Generate hrtimer_restart as a newtype with a cfi_encoding, as is done for lru_status, and adapt HrTimerRestart to the newtype.

---
 rust/bindgen_parameters     | 2 ++
 rust/kernel/time/hrtimer.rs | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)
rust/bindgen_parameters +2 -0
index cbc0a302647e5..45f6eb56a1f73 100644
@@ -29,6 +29,8 @@
 # enums that appear in indirect function calls should specify a cfi type
 --newtype-enum fwctl_rpc_scope
 --with-attribute-custom-enum=fwctl_rpc_scope='#[cfi_encoding="15fwctl_rpc_scope"]'
+--newtype-enum hrtimer_restart
+--with-attribute-custom-enum=hrtimer_restart='#[cfi_encoding="15hrtimer_restart"]'
 --newtype-enum irqreturn
 --with-attribute-custom-enum=irqreturn='#[cfi_encoding="9irqreturn"]'
 --newtype-enum lru_status
rust/kernel/time/hrtimer.rs +3 -3
index 2d7f1131a8131..07344ed5fbd58 100644
@@ -834,14 +834,14 @@ unsafe fn start(this: *const Self, expires: <Self::TimerMode as HrTimerMode>::Ex
 #[repr(u32)]
 pub enum HrTimerRestart {
     /// Timer should not be restarted.
-    NoRestart = bindings::hrtimer_restart_HRTIMER_NORESTART,
+    NoRestart = bindings::hrtimer_restart::HRTIMER_NORESTART.0,
     /// Timer should be restarted.
-    Restart = bindings::hrtimer_restart_HRTIMER_RESTART,
+    Restart = bindings::hrtimer_restart::HRTIMER_RESTART.0,
 }
 
 impl HrTimerRestart {
     fn into_c(self) -> bindings::hrtimer_restart {
-        self as bindings::hrtimer_restart
+        bindings::hrtimer_restart(self as c_uint)
     }
 }
 
Signature · 1 line
2.53.0
author maintainer
#12 lore raw

PATCH 9/1257 rust: dma: declare cfi_encoding for dma_data_direction

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sami Tolvanen <[email protected]>

commit 7d109178cd644268326cd31702ed46c7ac8bb300 upstream.

bindgen generates bindings::dma_data_direction as an integer by default, while C callback tables such as dma_buf_ops declare the parameter as enum dma_data_direction. kCFI encodes enum types by name even with integer normalization, so the type ids would not match when C calls into a Rust callback taking bindings::dma_data_direction.

Generate dma_data_direction as a newtype with a cfi_encoding, as is done for lru_status, and convert DataDirection through the newtype's constants.

---
 rust/bindgen_parameters |  2 ++
 rust/kernel/dma.rs      | 21 +++++++++++----------
 2 files changed, 13 insertions(+), 10 deletions(-)
rust/bindgen_parameters +2 -0
index 45f6eb56a1f73..5bab3cf063360 100644
@@ -29,6 +29,8 @@
 # enums that appear in indirect function calls should specify a cfi type
 --newtype-enum fwctl_rpc_scope
 --with-attribute-custom-enum=fwctl_rpc_scope='#[cfi_encoding="15fwctl_rpc_scope"]'
+--newtype-enum dma_data_direction
+--with-attribute-custom-enum=dma_data_direction='#[cfi_encoding="18dma_data_direction"]'
 --newtype-enum hrtimer_restart
 --with-attribute-custom-enum=hrtimer_restart='#[cfi_encoding="15hrtimer_restart"]'
 --newtype-enum irqreturn
rust/kernel/dma.rs +11 -10
index 2ce09f8e90c69..2ec5fe7d56bc4 100644
@@ -310,25 +310,25 @@ pub enum DataDirection {
     ///
     /// This is used when the buffer can be both read from and written to by the device.
     /// The cache for the corresponding memory region is both flushed and invalidated.
-    Bidirectional = Self::const_cast(bindings::dma_data_direction_DMA_BIDIRECTIONAL),
+    Bidirectional = Self::const_cast(bindings::dma_data_direction::DMA_BIDIRECTIONAL),
 
     /// The DMA mapping is for data transfer from memory to the device (write).
     ///
     /// The CPU has prepared data in the buffer, and the device will read it.
     /// The cache for the corresponding memory region is flushed before device access.
-    ToDevice = Self::const_cast(bindings::dma_data_direction_DMA_TO_DEVICE),
+    ToDevice = Self::const_cast(bindings::dma_data_direction::DMA_TO_DEVICE),
 
     /// The DMA mapping is for data transfer from the device to memory (read).
     ///
     /// The device will write data into the buffer for the CPU to read.
     /// The cache for the corresponding memory region is invalidated before CPU access.
-    FromDevice = Self::const_cast(bindings::dma_data_direction_DMA_FROM_DEVICE),
+    FromDevice = Self::const_cast(bindings::dma_data_direction::DMA_FROM_DEVICE),
 
     /// The DMA mapping is not for data transfer.
     ///
     /// This is primarily for debugging purposes. With this direction, the DMA mapping API
     /// will not perform any cache coherency operations.
-    None = Self::const_cast(bindings::dma_data_direction_DMA_NONE),
+    None = Self::const_cast(bindings::dma_data_direction::DMA_NONE),
 }
 
 impl DataDirection {
@@ -340,7 +340,7 @@ const fn const_cast(val: bindings::dma_data_direction) -> u32 {
         // CAST: The C standard allows compilers to choose different integer types for enums.
         // To safely check the value, we cast it to a wide signed integer type (`i128`)
         // which can hold any standard C integer enum type without truncation.
-        let wide_val = val as i128;
+        let wide_val = val.0 as i128;
 
         // Check if the value is outside the valid range for the target type `u32`.
         // CAST: `u32::MAX` is cast to `i128` to match the type of `wide_val` for the comparison.
@@ -358,11 +358,12 @@ const fn const_cast(val: bindings::dma_data_direction) -> u32 {
 impl From<DataDirection> for bindings::dma_data_direction {
     /// Returns the raw representation of [`enum dma_data_direction`].
     fn from(direction: DataDirection) -> Self {
-        // CAST: `direction as u32` gets the underlying representation of our `#[repr(u32)]` enum.
-        // The subsequent cast to `Self` (the bindgen type) assumes the C enum is compatible
-        // with the enum variants of `DataDirection`, which is a valid assumption given our
-        // compile-time checks.
-        direction as u32 as Self
+        match direction {
+            DataDirection::Bidirectional => Self::DMA_BIDIRECTIONAL,
+            DataDirection::ToDevice => Self::DMA_TO_DEVICE,
+            DataDirection::FromDevice => Self::DMA_FROM_DEVICE,
+            DataDirection::None => Self::DMA_NONE,
+        }
     }
 }
 
Signature · 1 line
2.53.0
author maintainer
#13 lore raw

PATCH 10/1257 media: rc: Replace open coded krealloc() for keymap

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit e4b4aa413cc2e48a261c8c513ced964a3390c0cf ]

Replace open coded krealloc() and remove superfluous member of struct rc_map - we don't need to track both the size in bytes and entries.

Stable-dep-of: ab9567336171 ("media: rc: Add missing locking for keymap")

---
 drivers/media/rc/rc-main.c | 45 +++++++++++++++++++-------------------
 include/media/rc-map.h     |  2 --
 2 files changed, 22 insertions(+), 25 deletions(-)
drivers/media/rc/rc-main.c +22 -23
index 85c9be43b9127..81f3aafcae8f4 100644
@@ -17,9 +17,8 @@
 #include <linux/module.h>
 #include "rc-core-priv.h"
 
-/* Sizes are in bytes, 256 bytes allows for 32 entries on x64 */
-#define IR_TAB_MIN_SIZE	256
-#define IR_TAB_MAX_SIZE	8192
+#define IR_TAB_MIN_ENTRIES	32
+#define IR_TAB_MAX_ENTRIES	1024
 
 static const struct {
 	const char *name;
@@ -214,21 +213,23 @@ static int scancode_to_u64(const struct input_keymap_entry *ke, u64 *scancode)
 static int ir_create_table(struct rc_dev *dev, struct rc_map *rc_map,
 			   const char *name, u64 rc_proto, size_t size)
 {
+	unsigned int alloc;
 	rc_map->name = kstrdup(name, GFP_KERNEL);
 	if (!rc_map->name)
 		return -ENOMEM;
+	alloc = roundup_pow_of_two(size);
 	rc_map->rc_proto = rc_proto;
-	rc_map->alloc = roundup_pow_of_two(size * sizeof(struct rc_map_table));
-	rc_map->size = rc_map->alloc / sizeof(struct rc_map_table);
-	rc_map->scan = kmalloc(rc_map->alloc, GFP_KERNEL);
+	rc_map->len = 0;
+	rc_map->size = alloc;
+	rc_map->scan = kmalloc_objs(struct rc_map_table, alloc, GFP_KERNEL);
 	if (!rc_map->scan) {
 		kfree(rc_map->name);
 		rc_map->name = NULL;
 		return -ENOMEM;
 	}
 
-	dev_dbg(&dev->dev, "Allocated space for %u keycode entries (%u bytes)\n",
-		rc_map->size, rc_map->alloc);
+	dev_dbg(&dev->dev, "Allocated space for %u keycode entries (%zu bytes)\n",
+		alloc, alloc * sizeof(struct rc_map_table));
 	return 0;
 }
 
@@ -262,38 +263,36 @@ static void ir_free_table(struct rc_map *rc_map)
 static int ir_resize_table(struct rc_dev *dev, struct rc_map *rc_map,
 			   gfp_t gfp_flags)
 {
-	unsigned int oldalloc = rc_map->alloc;
-	unsigned int newalloc = oldalloc;
-	struct rc_map_table *oldscan = rc_map->scan;
+	unsigned int newsize = rc_map->size;
 	struct rc_map_table *newscan;
 
 	if (rc_map->size == rc_map->len) {
 		/* All entries in use -> grow keytable */
-		if (rc_map->alloc >= IR_TAB_MAX_SIZE)
+		if (newsize >= IR_TAB_MAX_ENTRIES)
 			return -ENOMEM;
 
-		newalloc *= 2;
-		dev_dbg(&dev->dev, "Growing table to %u bytes\n", newalloc);
+		newsize *= 2;
+
+		dev_dbg(&dev->dev, "Growing table to %u entries\n", newsize);
 	}
 
-	if ((rc_map->len * 3 < rc_map->size) && (oldalloc > IR_TAB_MIN_SIZE)) {
+	if (rc_map->len * 3 < rc_map->size && rc_map->size > IR_TAB_MIN_ENTRIES) {
 		/* Less than 1/3 of entries in use -> shrink keytable */
-		newalloc /= 2;
-		dev_dbg(&dev->dev, "Shrinking table to %u bytes\n", newalloc);
+		newsize /= 2;
+		dev_dbg(&dev->dev, "Shrinking table to %u entries\n", newsize);
 	}
 
-	if (newalloc == oldalloc)
+	if (newsize == rc_map->size)
 		return 0;
 
-	newscan = kmalloc(newalloc, gfp_flags);
+	newscan = krealloc_array(rc_map->scan, newsize,
+				 sizeof(struct rc_map_table), gfp_flags);
 	if (!newscan)
 		return -ENOMEM;
 
-	memcpy(newscan, rc_map->scan, rc_map->len * sizeof(struct rc_map_table));
 	rc_map->scan = newscan;
-	rc_map->alloc = newalloc;
-	rc_map->size = rc_map->alloc / sizeof(struct rc_map_table);
-	kfree(oldscan);
+	rc_map->size = newsize;
+
 	return 0;
 }
 
include/media/rc-map.h +0 -2
index d95ed3e96de28..f167c37179c8f 100644
@@ -148,7 +148,6 @@ struct rc_map_table {
  * @scan: pointer to struct &rc_map_table
  * @size: Max number of entries
  * @len: Number of entries that are in use
- * @alloc: size of \*scan, in bytes
  * @rc_proto: type of the remote controller protocol, as defined at
  *	     enum &rc_proto
  * @name: name of the key map table
@@ -158,7 +157,6 @@ struct rc_map {
 	struct rc_map_table	*scan;
 	unsigned int		size;
 	unsigned int		len;
-	unsigned int		alloc;
 	enum rc_proto		rc_proto;
 	const char		*name;
 	spinlock_t		lock;
Signature · 1 line
2.53.0
author maintainer
#14 lore raw

PATCH 11/1257 media: rc: Add missing locking for keymap

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit ab9567336171e46ce9e03ee126902b3fd7901baa ]

When the rc_map for an rc_dev gets updated, locking is required but is missing in places. A concurrent scancode lookup and a call to rc_{register,unregistered}_device() could result in a use-after-free; this could happen if IR is decoded during those function calls.

Add lockdep assertions where locks are required.

ir_free_table() should only be called for non-TX devices else we will use a spinlock without iniitializing it.

Fixes dccc0c3ddf8f ("media: rc: fix race between unregister and urb/irq callbacks")
---
 drivers/media/rc/rc-main.c | 86 +++++++++++++++++++++++++-------------
 1 file changed, 57 insertions(+), 29 deletions(-)
drivers/media/rc/rc-main.c +57 -29
index 81f3aafcae8f4..946521ace142e 100644
@@ -104,7 +104,6 @@ static struct rc_map_list *seek_rc_map(const char *name)
 
 struct rc_map *rc_map_get(const char *name)
 {
-
 	struct rc_map_list *map;
 
 	map = seek_rc_map(name);
@@ -201,7 +200,7 @@ static int scancode_to_u64(const struct input_keymap_entry *ke, u64 *scancode)
  * ir_create_table() - initializes a scancode table
  * @dev:	the rc_dev device
  * @rc_map:	the rc_map to initialize
- * @name:	name to assign to the table
+ * @map_name:	name to assign to the table
  * @rc_proto:	ir type to assign to the new table
  * @size:	initial size of the table
  *
@@ -211,23 +210,31 @@ static int scancode_to_u64(const struct input_keymap_entry *ke, u64 *scancode)
  * return:	zero on success or a negative error code
  */
 static int ir_create_table(struct rc_dev *dev, struct rc_map *rc_map,
-			   const char *name, u64 rc_proto, size_t size)
+			   const char *map_name, u64 rc_proto, size_t size)
 {
+	struct rc_map_table *scan;
 	unsigned int alloc;
-	rc_map->name = kstrdup(name, GFP_KERNEL);
-	if (!rc_map->name)
+	char *name;
+
+	name = kstrdup(map_name, GFP_KERNEL);
+	if (!name)
 		return -ENOMEM;
+
 	alloc = roundup_pow_of_two(size);
-	rc_map->rc_proto = rc_proto;
-	rc_map->len = 0;
-	rc_map->size = alloc;
-	rc_map->scan = kmalloc_objs(struct rc_map_table, alloc, GFP_KERNEL);
-	if (!rc_map->scan) {
-		kfree(rc_map->name);
-		rc_map->name = NULL;
+	scan = kmalloc_objs(struct rc_map_table, alloc, GFP_KERNEL);
+	if (!scan) {
+		kfree(name);
 		return -ENOMEM;
 	}
 
+	scoped_guard(spinlock_irqsave, &rc_map->lock) {
+		rc_map->name = name;
+		rc_map->scan = scan;
+		rc_map->rc_proto = rc_proto;
+		rc_map->len = 0;
+		rc_map->size = alloc;
+	}
+
 	dev_dbg(&dev->dev, "Allocated space for %u keycode entries (%zu bytes)\n",
 		alloc, alloc * sizeof(struct rc_map_table));
 	return 0;
@@ -237,16 +244,26 @@ static int ir_create_table(struct rc_dev *dev, struct rc_map *rc_map,
  * ir_free_table() - frees memory allocated by a scancode table
  * @rc_map:	the table whose mappings need to be freed
  *
- * This routine will free memory alloctaed for key mappings used by given
+ * This routine will free memory allocated for key mappings used by given
  * scancode table.
  */
 static void ir_free_table(struct rc_map *rc_map)
 {
-	rc_map->size = 0;
-	kfree(rc_map->name);
-	rc_map->name = NULL;
-	kfree(rc_map->scan);
-	rc_map->scan = NULL;
+	struct rc_map_table *scan;
+	const char *name;
+
+	scoped_guard(spinlock_irqsave, &rc_map->lock) {
+		name = rc_map->name;
+		scan = rc_map->scan;
+
+		rc_map->size = 0;
+		rc_map->len = 0;
+		rc_map->name = NULL;
+		rc_map->scan = NULL;
+	}
+
+	kfree(name);
+	kfree(scan);
 }
 
 /**
@@ -266,6 +283,8 @@ static int ir_resize_table(struct rc_dev *dev, struct rc_map *rc_map,
 	unsigned int newsize = rc_map->size;
 	struct rc_map_table *newscan;
 
+	lockdep_assert_held(&rc_map->lock);
+
 	if (rc_map->size == rc_map->len) {
 		/* All entries in use -> grow keytable */
 		if (newsize >= IR_TAB_MAX_ENTRIES)
@@ -317,6 +336,8 @@ static unsigned int ir_update_mapping(struct rc_dev *dev,
 	int old_keycode = rc_map->scan[index].keycode;
 	int i;
 
+	lockdep_assert_held(&rc_map->lock);
+
 	/* Did the user wish to remove the mapping? */
 	if (new_keycode == KEY_RESERVED || new_keycode == KEY_UNKNOWN) {
 		dev_dbg(&dev->dev, "#%d: Deleting scan 0x%04llx\n",
@@ -372,6 +393,8 @@ static unsigned int ir_establish_scancode(struct rc_dev *dev,
 {
 	unsigned int i;
 
+	lockdep_assert_held(&rc_map->lock);
+
 	/*
 	 * Unfortunately, some hardware-based IR decoders don't provide
 	 * all bits for the complete IR code. In general, they provide only
@@ -396,7 +419,7 @@ static unsigned int ir_establish_scancode(struct rc_dev *dev,
 	/* No previous mapping found, we might need to grow the table */
 	if (rc_map->size == rc_map->len) {
 		if (!resize || ir_resize_table(dev, rc_map, GFP_ATOMIC))
-			return -1U;
+			return UINT_MAX;
 	}
 
 	/* i is the proper index to insert our new keycode */
@@ -478,16 +501,18 @@ static int ir_setkeytable(struct rc_dev *dev, const struct rc_map *from)
 	if (rc)
 		return rc;
 
-	for (i = 0; i < from->size; i++) {
-		index = ir_establish_scancode(dev, rc_map,
-					      from->scan[i].scancode, false);
-		if (index >= rc_map->len) {
-			rc = -ENOMEM;
-			break;
-		}
+	scoped_guard(spinlock_irqsave, &rc_map->lock) {
+		for (i = 0; i < from->size; i++) {
+			index = ir_establish_scancode(dev, rc_map,
+						      from->scan[i].scancode, false);
+			if (index >= rc_map->len) {
+				rc = -ENOMEM;
+				break;
+			}
 
-		ir_update_mapping(dev, rc_map, index,
-				  from->scan[i].keycode);
+			ir_update_mapping(dev, rc_map, index,
+					  from->scan[i].keycode);
+		}
 	}
 
 	if (rc)
@@ -523,6 +548,8 @@ static unsigned int ir_lookup_by_scancode(const struct rc_map *rc_map,
 {
 	struct rc_map_table *res;
 
+	lockdep_assert_held(&rc_map->lock);
+
 	res = bsearch(&scancode, rc_map->scan, rc_map->len,
 		      sizeof(struct rc_map_table), rc_map_cmp);
 	if (!res)
@@ -1993,7 +2020,8 @@ int rc_register_device(struct rc_dev *dev)
 	scoped_guard(mutex, &dev->lock)
 		dev->registered = false;
 out_free_table:
-	ir_free_table(&dev->rc_map);
+	if (dev->driver_type != RC_DRIVER_IR_RAW_TX)
+		ir_free_table(&dev->rc_map);
 out_raw:
 	ida_free(&rc_ida, minor);
 	return rc;
Signature · 1 line
2.53.0
author maintainer
#15 lore raw

PATCH 12/1257 alpha: honor force_successful_syscall_return() again

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Matt Turner <[email protected]>

This fix is for 7.1.y, 7.2.y and 7.3.y only. Mainline is not affected since commit 83bd31c2840b ("alpha: enable GENERIC_ENTRY") in v7.4-rc1, which replaced the saved-r0 check with a flag in thread_info. That conversion is far too large for stable, so this patch fixes the old entry code instead.

Syscalls that return data rather than a status, such as PTRACE_PEEKUSR, PTRACE_PEEKTEXT/PEEKDATA, osf_sigprocmask and shmat, call force_successful_syscall_return() so that a result with the top bit set is not mistaken for an error. On alpha that clears the saved r0, and $syscall_error and $strace_error used to check for this and take the success path.

Commit 55b22075f784 ("alpha: add support for SECCOMP and SECCOMP_FILTER") moved the restart syscall number to r2 and dropped both checks, so any negative result now comes back to userspace as an error with a3 set. PTRACE_PEEKUSR of a register holding -1 fails with EPERM, which makes sandbox abort when it traces static binaries during Gentoo package builds, and PTRACE_PEEKUSR of a register holding 0xffffffffffffe000 fails with errno 8192, which breaks unwinding of a ptrace-stopped thread in elfutils (run-backtrace-native.sh).

Restore the checks on both exit paths. On the traced path the success path also has to stop falling through into SYSCALL_SKIP_RETURN_RESTART_GATE, which is meant for skipped syscalls and would turn a forced-success result of -1 into ENOSYS.

Fixes 55b22075f784 ("alpha: add support for SECCOMP and SECCOMP_FILTER")
Assisted-by Claude:claude-opus-5-5
---
 arch/alpha/kernel/entry.S | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/alpha/kernel/entry.S +14 -0
index 9f2608de25446..fe88cd598492a 100644
@@ -603,6 +603,14 @@ ret_to_kernel:
 
 	.align 3
 $syscall_error:
+	/*
+	 * force_successful_syscall_return() zeroes the saved r0 (the
+	 * syscall number): the negative return value is data, not an
+	 * error number.
+	 */
+	ldq	$18, 0($sp)
+	beq	$18, $ret_success
+
         /* Restart syscall nr comes from saved r2 (preserved even if r0 overwritten). */
 	ldq	$18, 16($sp)	/* old syscall nr for restart */
 
@@ -700,9 +708,11 @@ ret_from_straced:
 $strace_success:
 	stq	$31, 72($sp)		/* a3=0 => no error */
 	stq	$0, 0($sp)		/* save return value */
+	br	$strace_leave
 
 $strace_skip_call:
 	SYSCALL_SKIP_RETURN_RESTART_GATE
+$strace_leave:
 	DO_SWITCH_STACK
 	jsr	$26, syscall_trace_leave
 	UNDO_SWITCH_STACK
@@ -710,6 +720,10 @@ $strace_skip_call:
 
 	.align	3
 $strace_error:
+	/* See $syscall_error. */
+	ldq	$18, 0($sp)
+	beq	$18, $strace_success
+
 	ldq	$18, 16($sp)	/* restart syscall nr */
 	ldq	$19, 72($sp)	/* .. and this a3 */
 
Signature · 1 line
2.53.0
author maintainer
#16 lore raw

PATCH 13/1257 drm/nouveau/gsp/r570: Set GcOff = 0 in fbsr

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lyude Paul <[email protected]>

[ Upstream commit c7abe771e013848970421e5ca29c6b2f05c31965 ]

Previously, it looked as if we were able to fix suspend/resume on some desktops by setting Gcoff based on whether or not we were entering runtime PM. This was a mistake though - the only time suspend/resume would end up actually working was if Gcoff = 0.

It seems like it's likely the main reason for this is the FBSR GcOff argument actually controls GSP's behavior with regards to which buffers it decides to save across suspend/resume. When GcOff = 1, RM reserved regions are saved unless they are marked as LOST_ON_SUSPEND, and RM channel-context and kernel-client buffers are also saved -including- when they are LOST_ON_SUSPEND. This means with GcOff = 1, we end up having GSP save and restore buffers that actually need to be reinitialized on resume - causing the failures we're setting.

Thanks to John Hubbard from Nvidia for providing some background on what these options do in the GSP firmware do!

Fixes 53dac0623853 ("drm/nouveau/gsp: add support for 570.144")
Cc <[email protected]> # v6.16+
---
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c +1 -1
index 469e7eed1d6f8..a93a39ef7c690 100644
@@ -135,7 +135,7 @@ r570_fbsr_init(struct nvkm_gsp *gsp, struct sg_table *sgt, u64 size)
 	ctrl->hClient = gsp->internal.client.object.handle;
 	ctrl->hSysMem = memlist.handle;
 	ctrl->sysmemAddrOfSuspendResumeData = gsp->sr.meta.addr;
-	ctrl->bEnteringGcoffState = 1;
+	ctrl->bEnteringGcoffState = 0;
 
 	ret = nvkm_gsp_rm_ctrl_wr(&gsp->internal.device.subdevice, ctrl);
 	if (ret)
Signature · 1 line
2.53.0
author maintainer
#17 lore raw

PATCH 14/1257 drm/nouveau: reject zero-size notifier object allocation

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zhenhao Wan <[email protected]>

[ Upstream commit 38125d38d850bd2fdd5d7840c3bd52d9d208995b ]

nouveau_abi16_ioctl_notifierobj_alloc() passes the userspace-controlled info->size to nvkm_mm_head() as both size_max and size_min without a lower bound. A zero size satisfies the allocator's "e - s < size_min" gate (size_min == 0 makes the unsigned comparison inert) and yields a zero-length node, after which

	args.limit = ntfy->node->offset + ntfy->node->length - 1;

underflows (offset 0, length 0 -> 0xffffffff) into an oversized ~4 GiB DMA window. The dma object constructor only rejects start > limit, so the validly ordered [base, base + 0xffffffff] range passes and is programmed into the GPU DMA context. The ioctl is DRM_RENDER_ALLOW, so any render node client can trigger this on pre-Fermi hardware.

Reject a zero-size request before allocating anything.

---
 drivers/gpu/drm/nouveau/nouveau_abi16.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/nouveau/nouveau_abi16.c +4 -0
index b776030460f77..e876f154963d0 100644
@@ -666,6 +666,10 @@ nouveau_abi16_ioctl_notifierobj_alloc(ABI16_IOCTL_ARGS)
 	if (unlikely(device->info.family >= NV_DEVICE_INFO_V0_FERMI))
 		return nouveau_abi16_put(abi16, -EINVAL);
 
+	/* zero size yields a zero-length node, underflowing args.limit */
+	if (unlikely(!info->size))
+		return nouveau_abi16_put(abi16, -EINVAL);
+
 	chan = nouveau_abi16_chan(abi16, info->channel);
 	if (!chan)
 		return nouveau_abi16_put(abi16, -ENOENT);
Signature · 1 line
2.53.0
author maintainer
#18 lore raw

PATCH 15/1257 drm/nouveau/svm: drain fault handler before freeing svmm

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Zhenhao Wan <[email protected]>

[ Upstream commit b46ddaf0823405f81e681eb26ec98508f3eb9a07 ]

The SVM fault handler nouveau_svm_fault() looks up each fault's nouveau_svmm under svm->mutex, caches it in the fault array, then drops svm->mutex and dereferences the svmm across blocking faults (mmu_interval_notifier_insert(), hmm_range_fault()).

nouveau_svmm is not refcounted. On DRM file close nouveau_svmm_fini() -> mmu_notifier_put() frees it asynchronously via call_srcu() without waiting for the handler, and mmget_not_zero() pins the mm, not the svmm. flush_work() on the fault buffer otherwise runs only at device removal and suspend, never on close, so a fault handled concurrently with a close can dereference a freed svmm.

The instance is already unlinked by nouveau_svmm_part() earlier in the same close, so no new fault can resolve to it. Drain the handler in nouveau_svmm_fini() before the free, guarding the flush with a NULL check on drm->svm: on device teardown nouveau_svm_fini() runs first and frees drm->svm (NULL) after blocking the notify and flushing the buffer, so the handler is already drained; on per-client close drm->svm is alive and the flush runs.

Fixes eeaf06ac1a55 ("drm/nouveau/svm: initial support for shared virtual memory")
Assisted-by Claude:claude-opus-5
---
 drivers/gpu/drm/nouveau/nouveau_svm.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/gpu/drm/nouveau/nouveau_svm.c +13 -0
index 58735446d7832..c519c28164fa0 100644
@@ -304,6 +304,19 @@ nouveau_svmm_fini(struct nouveau_svmm **psvmm)
 {
 	struct nouveau_svmm *svmm = *psvmm;
 	if (svmm) {
+		struct nouveau_svm *svm = svmm->vmm->cli->drm->svm;
+
+		/* The fault handler caches svmm pointers under svm->mutex and
+		 * dereferences them after dropping it, across blocking faults.
+		 * The instance is already unlinked (nouveau_svmm_part), so drain
+		 * the handler before the free to release any in-flight reference.
+		 *
+		 * On device teardown nouveau_svm_fini() ran first and freed
+		 * drm->svm (NULL) after draining the buffer; nothing to flush.
+		 */
+		if (svm)
+			flush_work(&svm->buffer[0].work);
+
 		mutex_lock(&svmm->mutex);
 		svmm->vmm = NULL;
 		mutex_unlock(&svmm->mutex);
Signature · 1 line
2.53.0
author maintainer
#19 lore raw

PATCH 16/1257 drm/nouveau/pci: use config-space MSI rearm on MCP79/MCP7A (NVAC)

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Marek Czernohous <[email protected]>

[ Upstream commit 354d47fb3f35461b7f942831c1b2a7105e92b57f ]

NVAC (MCP79/MCP7A) uses g94_pci_func, whose .msi_rearm is nv40_pci_msi_rearm(): a re-arm write through the MMIO mirror of PCI config space. On this IGP that path is unreliable; when a re-arm is missed the interrupt line stays dead, command submission times out and the GPU appears hung until reboot. On an Apple Mac mini (early 2009, MCP79, boot0 0x0ac080b1) this showed as sporadic fifo timeouts and GPU hangs under load unless MSI was disabled via config=NvMSI=0.

Give NVAC its own pci func that re-arms through real PCI config space (nv46_pci_msi_rearm) instead. This follows existing precedent: nv46.c documents the MMIO-mirror re-arm as broken on several related parts, and commit 5112abc6a433 ("drm/nouveau/pci/g92: Fix rearm") fixed g92 the same way while moving the remaining chipsets, NVAC included, into the newly added shared g94 table, where NVAC stayed on the MMIO path. This change completes that fix for NVAC. The sibling IGP NVAA (MCP77/MCP78) has MSI disabled entirely as "reported broken" in nvkm_pci_new_(); NVAC works correctly once the re-arm goes through config space, so disabling MSI is not necessary.

Only NVAC is switched: that is the hardware this has been validated on. The other users of g94_pci_func (G94/G96/G98/GT2xx and the MCP77/MCP89 IGPs) keep their current behavior; MCP77 and MCP89 plausibly want the same treatment but were not tested.

Tested on the Mac mini as a daily driver for two months with MSI enabled and zero fifo timeouts. Independently confirmed stable on an iMac9,1 (MCP79) running 6.12.90 with the v1 form of this change (the same one-line functional switch, applied to that kernel's g94 implementation).

Fixes 5112abc6a433 ("drm/nouveau/pci/g92: Fix rearm")
Cc <[email protected]> # v6.16+
Assisted-by Claude:claude-opus-4-7
Assisted-by Claude:claude-opus-4-8
---
 .../gpu/drm/nouveau/include/nvkm/subdev/pci.h |  1 +
 .../gpu/drm/nouveau/nvkm/engine/device/base.c |  2 +-
 .../gpu/drm/nouveau/nvkm/subdev/pci/Kbuild    |  1 +
 .../gpu/drm/nouveau/nvkm/subdev/pci/mcp79.c   | 35 +++++++++++++++++++
 4 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/nouveau/nvkm/subdev/pci/mcp79.c
drivers/gpu/drm/nouveau/include/nvkm/subdev/pci.h +1 -0
index 112b674ed9c8a..0172e0d200f81 100644
@@ -46,6 +46,7 @@ int nv4c_pci_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct n
 int g84_pci_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_pci **);
 int g92_pci_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_pci **);
 int g94_pci_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_pci **);
+int mcp79_pci_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_pci **);
 int gf100_pci_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_pci **);
 int gf106_pci_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_pci **);
 int gk104_pci_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_pci **);
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +1 -1
index 96c8a5b299999..a2ed8c4fe52a0 100644
@@ -1237,7 +1237,7 @@ nvac_chipset = {
 	.mc       = { 0x00000001, g98_mc_new },
 	.mmu      = { 0x00000001, mcp77_mmu_new },
 	.mxm      = { 0x00000001, nv50_mxm_new },
-	.pci      = { 0x00000001, g94_pci_new },
+	.pci      = { 0x00000001, mcp79_pci_new },
 	.therm    = { 0x00000001, g84_therm_new },
 	.timer    = { 0x00000001, nv41_timer_new },
 	.volt     = { 0x00000001, nv40_volt_new },
drivers/gpu/drm/nouveau/nvkm/subdev/pci/Kbuild +1 -0
index a14ea0f7b1c87..90f03baeb22ac 100644
@@ -9,6 +9,7 @@ nvkm-y += nvkm/subdev/pci/nv4c.o
 nvkm-y += nvkm/subdev/pci/g84.o
 nvkm-y += nvkm/subdev/pci/g92.o
 nvkm-y += nvkm/subdev/pci/g94.o
+nvkm-y += nvkm/subdev/pci/mcp79.o
 nvkm-y += nvkm/subdev/pci/gf100.o
 nvkm-y += nvkm/subdev/pci/gf106.o
 nvkm-y += nvkm/subdev/pci/gk104.o
drivers/gpu/drm/nouveau/nvkm/subdev/pci/mcp79.c new file +35 -0
new file mode 100644
index 0000000000000..e2ae242f1aa77
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright 2026 Marek Czernohous
+ *
+ * MCP79/MCP7A (NVAC): like g94, but MSI re-arm goes through real PCI
+ * config space.  The MMIO-mirror re-arm is unreliable on this IGP and a
+ * missed re-arm kills the interrupt line (see the nv46 comment; g92
+ * already re-arms through config space for the same reason).
+ */
+#include "priv.h"
+
+static const struct nvkm_pci_func
+mcp79_pci_func = {
+	.cfg = { .addr = 0x088000, .size = 0x1000 },
+
+	.init = g84_pci_init,
+	.msi_rearm = nv46_pci_msi_rearm,
+
+	.pcie.init = g84_pcie_init,
+	.pcie.set_link = g84_pcie_set_link,
+
+	.pcie.max_speed = g84_pcie_max_speed,
+	.pcie.cur_speed = g84_pcie_cur_speed,
+
+	.pcie.set_version = g84_pcie_set_version,
+	.pcie.version = g84_pcie_version,
+	.pcie.version_supported = g92_pcie_version_supported,
+};
+
+int
+mcp79_pci_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+	      struct nvkm_pci **ppci)
+{
+	return nvkm_pci_new_(&mcp79_pci_func, device, type, inst, ppci);
+}
Signature · 1 line
2.53.0
author maintainer
#20 lore raw

PATCH 17/1257 drm/nouveau: disable the fence uevent work instead of just cancelling it

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Marek Czernohous <[email protected]>

[ Upstream commit 827eb9328eaed831d7cc426ac2705038a40835b6 ]

nouveau_fence_context_del() drains the uevent work while the event that feeds it is still armed:

	cancel_work_sync(&fctx->uevent_work);
	nouveau_fence_context_kill(fctx, 0);
	nvif_event_dtor(&fctx->event);

nouveau_fence_wait_uevent_handler() queues the work unconditionally:

	schedule_work(&fctx->uevent_work);
	return NVIF_EVENT_KEEP;

so a non-stall interrupt arriving after cancel_work_sync() has returned re-arms the work that was just drained. The window closes in two steps, neither of which is the drain. The kill blocks the event when the last fence holding a notify_ref is signalled, which reaches atomic_xchg(&ntfy->allowed, 0) (nvkm/core/event.c:104), and nvkm_event_ntfy() skips a ntfy that is not allowed (:183). That stops further handlers from starting, but not one that is already inside nvkm_event_ntfy(): the event is created with wait = false (nouveau_fence.c:201), so nvkm_event_ntfy_block_() leaves it on the list and never takes event->list_lock. Only nvif_event_dtor() waits that one
out: nvkm_event_ntfy_del() (:141) goes through nvkm_event_ntfy_remove(), which takes write_lock_irq() on that same list_lock (:84).

Either way the re-arm happens after the drain, and the caller drops its reference immediately afterwards, for example nv84_fence_context_del():

	nouveau_fence_context_del(&fctx->base);
	chan->fence = NULL;
	nouveau_fence_context_free(&fctx->base);

That is a kref_put() on fctx->fence_ref, so the context outlives the teardown only while emitted fences still hold a reference of their own. That is no safety net: whenever none do, the count reaches zero right there and nouveau_fence_context_put() kfree()s fctx while the work is still queued. &fctx->uevent_work is embedded in that allocation, so the workqueue already dereferences freed memory when it picks the item up, and nouveau_fence_uevent_work() can then take fctx->lock on it. With CONFIG_DEBUG_OBJECTS_WORK and CONFIG_DEBUG_OBJECTS_FREE, kfree() of a still-queued work item is reported as the free of an active object.

On live memory the re-armed work has nothing left to do:
nouveau_fence_context_kill() empties fctx->pending and sets fctx->killed under fctx->lock, nouveau_fence_emit() then returns -ENODEV rather than queueing anything new, and nouveau_fence_update() only reaches nvif_event_block() if it signalled something off that list. The defect is the access to freed memory, not what the work would have found.

Only chips from G84 on can reach this at all: nouveau_fence_context_new() returns before nvif_event_ctor() when priv->uevent is clear, and nv84_fence_create() is the only place that sets it. nv84_fence_context_del() is the context_del for all of those, because nvc0_fence_create() and gv100_fence_create() build on nv84_fence_create() and override only context_new.

Use disable_work_sync() instead. It drains the work exactly like cancel_work_sync() does, and additionally increments the work item's disable count, after which "any attempt to queue @work will fail and return %false" (kernel/workqueue.c, disable_work()). The handler's schedule_work() then has nothing to re-arm, and the teardown order stays as it is.

Draining a second time after nvif_event_dtor() would close the window as well, and without the newer API: once nvkm_event_ntfy_remove() has returned, no handler can start or still be running, so nothing re-arms the work past that point. disable_work_sync() is preferred here because it needs one synchronisation point instead of two, it keeps the work from being queued at all rather than cleaning up after it, and it is what drm has settled on for this (drm/xe, drm/panthor, drm_pagemap). Blocking the event rather than the work is not an option: fctx->event is created with wait = false, so a handler already inside nvkm_event_ntfy() can still queue the work.

Note for backports: disable_work_sync() arrived in v6.10 with commit 86898fa6b8cd ("workqueue: Implement disable/enable for (delayed) work items"), while the fix being corrected here reached 6.6.18 and 6.7.6. linux-6.6.y therefore carries this bug without the API, and this patch would apply there and then fail to build. A 6.6.y backport wants the second drain described above instead, as its own patch.

Fixes 39126abc5e20 ("nouveau: offload fence uevents work to workqueue")
Cc <[email protected]> # 6.10.x
Assisted-by Claude:claude-opus-5
---
 drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_fence.c +1 -1
index edbe9e08ba0fd..11e95c37ce506 100644
@@ -96,7 +96,7 @@ nouveau_fence_context_kill(struct nouveau_fence_chan *fctx, int error)
 void
 nouveau_fence_context_del(struct nouveau_fence_chan *fctx)
 {
-	cancel_work_sync(&fctx->uevent_work);
+	disable_work_sync(&fctx->uevent_work);
 	nouveau_fence_context_kill(fctx, 0);
 	nvif_event_dtor(&fctx->event);
 	fctx->dead = 1;
Signature · 1 line
2.53.0
author maintainer
#21 lore raw

PATCH 18/1257 drm/nouveau: cancel the DP IRQ work before freeing the connector

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Marek Czernohous <[email protected]>

[ Upstream commit f60849975a886d70883bcb6b3658c0fa83c6971f ]

nouveau_connector_destroy() tears the two nvif events down and then frees the connector, but never cancels the work the IRQ event queues:

	nvif_event_dtor(&nv_connector->irq);
	nvif_event_dtor(&nv_connector->hpd);
	kfree(nv_connector->edid);
	...
	kfree(connector);

nouveau_connector_irq() queues that work unconditionally:

	schedule_work(&nv_connector->irq_work);
	return NVIF_EVENT_KEEP;

A DP IRQ arriving just before nvif_event_dtor() therefore leaves nv_connector->irq_work on the system queue past the kfree(). When it runs, nouveau_dp_irq() derives both nv_connector and connector from the work_struct and dereferences them, and goes on to take outp->dp.hpd_irq_lock.

There is no cancel_work_sync() for irq_work anywhere in the driver, so nothing else covers this. Add it after the event teardown, where no further work can be queued, and before anything is freed.

Reported by the Sashiko review bot as a pre-existing issue, in its review of an earlier nv04 FIFO series of mine, and confirmed against the source.

---
 drivers/gpu/drm/nouveau/nouveau_connector.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/nouveau_connector.c +1 -0
index 4cfc9c7c2ae0c..7c4f0a29b05bf 100644
@@ -397,6 +397,7 @@ nouveau_connector_destroy(struct drm_connector *connector)
 	struct nouveau_connector *nv_connector = nouveau_connector(connector);
 	nvif_event_dtor(&nv_connector->irq);
 	nvif_event_dtor(&nv_connector->hpd);
+	cancel_work_sync(&nv_connector->irq_work);
 	kfree(nv_connector->edid);
 	drm_connector_unregister(connector);
 	drm_connector_cleanup(connector);
Signature · 1 line
2.53.0
author maintainer
#22 lore raw

PATCH 19/1257 drm/nouveau: dont dereference outp before checking it in nouveau_dp_irq

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Marek Czernohous <[email protected]>

[ Upstream commit 843bc34db94bff0612c8294861b156489958897b ]

nouveau_dp_irq() looks the encoder up and dereferences it in the same breath, five lines before testing it:

	struct nouveau_encoder *outp = find_encoder(connector, DCB_OUTPUT_DP);
	struct nouveau_drm *drm = nouveau_drm(outp->base.base.dev);
	...
	if (!outp)
		return;

find_encoder() walks the connector's possible encoders and returns NULL when none of them matches the requested type, so the NULL test is not
decoration: it is the author saying this can happen. The initialiser above it dereferences the same pointer regardless.

The NULL test predates the dereference. commit 773eb04d14a1 ("drm/nouveau/disp: expose conn event class") turned nouveau_dp_irq() into a work callback, and since the drm pointer was no longer passed in as an argument it was recovered from the encoder in the declaration block, which put the dereference above the existing test.

Move the drm lookup below the test. No functional change when outp is non-NULL.

Fixes 773eb04d14a1 ("drm/nouveau/disp: expose conn event class")
Assisted-by Claude:claude-opus-5
---
 drivers/gpu/drm/nouveau/nouveau_dp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_dp.c +3 -1
index 55691ec44abaa..738802358d85c 100644
@@ -486,7 +486,7 @@ nouveau_dp_irq(struct work_struct *work)
 		container_of(work, typeof(*nv_connector), irq_work);
 	struct drm_connector *connector = &nv_connector->base;
 	struct nouveau_encoder *outp = find_encoder(connector, DCB_OUTPUT_DP);
-	struct nouveau_drm *drm = nouveau_drm(outp->base.base.dev);
+	struct nouveau_drm *drm;
 	struct nv50_mstm *mstm;
 	u64 hpd = 0;
 	int ret;
@@ -494,6 +494,8 @@ nouveau_dp_irq(struct work_struct *work)
 	if (!outp)
 		return;
 
+	drm = nouveau_drm(outp->base.base.dev);
+
 	mstm = outp->dp.mstm;
 	NV_DEBUG(drm, "service %s\n", connector->name);
 
Signature · 1 line
2.53.0
author maintainer
#23 lore raw

PATCH 20/1257 drm/amdgpu: recompute the dw estimate after allocating a new VM update job

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: YuBiao Wang <[email protected]>

[ Upstream commit a74c7832b11827907de560169c7d4ac94505fd87 ]

amdgpu_vm_sdma_update() keeps the number of free dwords of the current job in a local variable. When the job runs out of room it is committed and a new one is allocated, but that local variable is not refreshed and still describes the job which was just submitted.

The stale value is then used to decide how many PTEs fit into the new job. If it happens to be copy_pte_num_dw + 7, or one more than that, the result is zero. copy_pte() encodes the transfer size as count * 8 - 1, so a count of zero asks the engine for a 1GB copy starting inside the IB pool. That runs off the end of the pool, faults on the first unmapped GART page above it and hangs the ring.

Re-initialize the estimate from the newly allocated job, which is empty and therefore has its full budget available.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c +5 -0
index 50cc0779c340e..eb8cf0d9d9c59 100644
@@ -254,6 +254,11 @@ static int amdgpu_vm_sdma_update(struct amdgpu_vm_update_params *p,
 						     AMDGPU_KERNEL_JOB_ID_VM_UPDATE);
 			if (r)
 				return r;
+
+			/* The estimate above describes the job which was just
+			 * submitted, take the budget of the newly allocated one.
+			 */
+			ndw = p->num_dw_left;
 		}
 
 		if (!p->pages_addr) {
Signature · 1 line
2.53.0
author maintainer
#24 lore raw

PATCH 21/1257 drm/amd/display: Force GAMCOR for subsampled surfaces with PQ/Gamma22/HLG

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Harry Wentland <[email protected]>

[ Upstream commit 2ffaa7c4050605cb27756f5336f778d1b21268b9 ]

The ROM early-return checks for PQ, Gamma 2.2, and HLG in mod_color_calculate_degamma_params() do not consider the map_user_ramp parameter. When map_user_ramp is true (indicating a subsampled surface that requires post-scaler degamma via GAMCOR), the function still takes the ROM path, programming PRE_DEGAM instead.

For subsampled formats the chroma channels must be upsampled by the scaler before degamma is applied. PRE_DEGAM sits before the scaler in the pipeline (CNVC domain), while GAMCOR sits after it (CM domain). Using the ROM for subsampled surfaces means degamma is applied to subsampled chroma before upsampling, producing incorrect results.

Fix by gating the dcn_arch ROM capability checks on !map_user_ramp, forcing PQ/Gamma22/HLG through the GAMCOR LUT path when the surface is subsampled.

Fixes a8bf71649088 ("drm/amd/display: Internal refactoring to abstract color caps")
Assisted-by Copilot:claude-opus-4.6
---
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +2 -1
index 03d88e78165d5..5786ef5787ac6 100644
@@ -1696,7 +1696,8 @@ bool mod_color_calculate_degamma_params(struct dc_color_caps *dc_caps,
 			return true;
 
 		if (dc_caps != NULL &&
-			dc_caps->dpp.dcn_arch == 1) {
+			dc_caps->dpp.dcn_arch == 1 &&
+			!map_user_ramp) {
 
 			if (input_tf->tf == TRANSFER_FUNCTION_PQ &&
 					dc_caps->dpp.dgam_rom_caps.pq == 1)
Signature · 1 line
2.53.0
author maintainer
#25 lore raw

PATCH 22/1257 iio: adc: ti-ads1100: Fix incorrect reading when datarate changed in single mode

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jakub Szczudlo <[email protected]>

[ Upstream commit 38dbf24dfbd0a73b89fa2871a7148429aef05531 ]

When device is suspended and it is in single mode then changing datarate doesn't make it actually wait for new measurement, so to be sure that read after change is correct, functions that changes datarate and gain will wait for a new data.

Fixes 541880542f2b ("iio: adc: Add TI ADS1100 and ADS1000")
---
 drivers/iio/adc/ti-ads1100.c | 107 +++++++++++++++++++++++++++++++++--
 1 file changed, 103 insertions(+), 4 deletions(-)
drivers/iio/adc/ti-ads1100.c +103 -4
index 9fe8d54cce83c..03096d7e10914 100644
@@ -15,10 +15,12 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/i2c.h>
+#include <linux/iopoll.h>
 #include <linux/mutex.h>
 #include <linux/property.h>
 #include <linux/pm_runtime.h>
 #include <linux/regulator/consumer.h>
+#include <linux/time.h>
 #include <linux/units.h>
 
 #include <linux/iio/iio.h>
@@ -43,6 +45,9 @@
 static const int ads1100_data_rate[] = { 128, 32, 16, 8 };
 static const int ads1100_data_rate_bits[] = { 12, 14, 15, 16 };
 
+/* Timeout based on the minimum sample rate of 8 SPS (7500ms) */
+#define ADS1100_MAX_DRDY_TIMEOUT_US	(7500 * USEC_PER_MSEC)
+
 struct ads1100_data {
 	struct i2c_client *client;
 	struct regulator *reg_vdd;
@@ -123,10 +128,86 @@ static int ads1100_get_adc_result(struct ads1100_data *data, int chan, int *val)
 	return 0;
 }
 
+static int ads1100_conversion_busy(struct ads1100_data *data)
+{
+	u8 buffer[3];
+	int ret;
+
+	ret = i2c_master_recv(data->client, (char *)&buffer, sizeof(buffer));
+	if (ret < 0) {
+		dev_err(&data->client->dev, "I2C read fail: %d\n", ret);
+		return ret;
+	}
+
+	return FIELD_GET(ADS1100_CFG_ST_BSY, buffer[2]);
+}
+
+static int ads1100_wait_single_conversion(struct ads1100_data *data)
+{
+	int data_rate_index = FIELD_GET(ADS1100_DR_MASK, data->config);
+	int data_rate_Hz = ads1100_data_rate[data_rate_index];
+	unsigned long poll_us = DIV_ROUND_CLOSEST(USEC_PER_SEC, data_rate_Hz) / 4;
+	int busy;
+	int ret;
+
+	ret = readx_poll_timeout(ads1100_conversion_busy, data,
+				 busy, busy <= 0,
+				 poll_us, ADS1100_MAX_DRDY_TIMEOUT_US);
+	if (busy < 0)
+		return busy;
+
+	return ret;
+}
+
+static int ads1100_start_single_conversion(struct ads1100_data *data)
+{
+	u8 config = data->config | ADS1100_CFG_SC;
+	int ret;
+
+	ret = i2c_master_send(data->client, &config, sizeof(config));
+	if (ret < 0) {
+		dev_err(&data->client->dev, "I2C write fail: %d\n", ret);
+		return ret;
+	}
+	/* Need to wait because of change from continuous to single mode */
+	ret = ads1100_wait_single_conversion(data);
+	if (ret)
+		return ret;
+
+	config |= ADS1100_CFG_ST_BSY;
+
+	ret = i2c_master_send(data->client, &config, sizeof(config));
+	if (ret < 0) {
+		dev_err(&data->client->dev, "I2C write fail: %d\n", ret);
+		return ret;
+	}
+
+	/* No need to cache it, it's status bit */
+	data->config = config & ~ADS1100_CFG_ST_BSY;
+
+	return 0;
+}
+
+static int ads1100_poll_data_ready(struct ads1100_data *data)
+{
+	int ret;
+
+	ret = ads1100_start_single_conversion(data);
+	if (ret)
+		return ret;
+
+	ret = ads1100_wait_single_conversion(data);
+	if (ret)
+		return ret;
+
+	return ads1100_set_config_bits(data, ADS1100_CFG_SC, ADS1100_CONTINUOUS);
+}
+
 static int ads1100_set_scale(struct ads1100_data *data, int val, int val2)
 {
 	int microvolts;
 	int gain;
+	int ret;
 
 	/* With Vdd between 2.7 and 5V, the scale is always below 1 */
 	if (val)
@@ -135,6 +216,11 @@ static int ads1100_set_scale(struct ads1100_data *data, int val, int val2)
 	if (!val2)
 		return -EINVAL;
 
+	PM_RUNTIME_ACQUIRE_IF_ENABLED_AUTOSUSPEND(&data->client->dev, pm);
+	ret = PM_RUNTIME_ACQUIRE_ERR(&pm);
+	if (ret)
+		return ret;
+
 	microvolts = regulator_get_voltage(data->reg_vdd);
 	/*
 	 * val2 is in 'micro' units, n = val2 / 1000000
@@ -149,22 +235,35 @@ static int ads1100_set_scale(struct ads1100_data *data, int val, int val2)
 
 	ads1100_set_config_bits(data, ADS1100_PGA_MASK, ffs(gain) - 1);
 
-	return 0;
+	return ads1100_poll_data_ready(data);
 }
 
 static int ads1100_set_data_rate(struct ads1100_data *data, int chan, int rate)
 {
 	unsigned int i;
 	unsigned int size;
+	int ret;
 
 	size = data->supports_data_rate ? ARRAY_SIZE(ads1100_data_rate) : 1;
 	for (i = 0; i < size; i++) {
 		if (ads1100_data_rate[i] == rate)
-			return ads1100_set_config_bits(data, ADS1100_DR_MASK,
-						       FIELD_PREP(ADS1100_DR_MASK, i));
+			break;
 	}
 
-	return -EINVAL;
+	if (i == size)
+		return -EINVAL;
+
+	PM_RUNTIME_ACQUIRE_IF_ENABLED_AUTOSUSPEND(&data->client->dev, pm);
+	ret = PM_RUNTIME_ACQUIRE_ERR(&pm);
+	if (ret)
+		return ret;
+
+	ret = ads1100_set_config_bits(data, ADS1100_DR_MASK,
+				      FIELD_PREP(ADS1100_DR_MASK, i));
+	if (ret)
+		return ret;
+
+	return ads1100_poll_data_ready(data);
 }
 
 static int ads1100_get_vdd_millivolts(struct ads1100_data *data)
Signature · 1 line
2.53.0
author maintainer
#26 lore raw

PATCH 23/1257 iio: light: ltr501: Power down chip if request irq fails

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Esben Haabendal <[email protected]>

[ Upstream commit 8a9bcd587d7d768e6c8e9fff88bb89645e412731 ]

In case devm_request_threaded_irq() failed, we were leaving the chip powered instead of powering it down again. Power down the chip switching ALS and PS modes to standby.

---
 drivers/iio/light/ltr501.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/light/ltr501.c +1 -1
index fa0d16890c8bf..b36bd10a02624 100644
@@ -1538,7 +1538,7 @@ static int ltr501_probe(struct i2c_client *client)
 						"ltr501_thresh_event",
 						indio_dev);
 		if (ret)
-			return ret;
+			goto powerdown_on_error;
 	} else {
 		indio_dev->info = data->chip_info->info_no_irq;
 	}
Signature · 1 line
2.53.0
author maintainer
#27 lore raw

PATCH 24/1257 cpufreq: airoha: fix probe failure with correct error check

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Daniel Schwierzeck <[email protected]>

[ Upstream commit 801ade22c4fc078ea9b11e1f3fe3aae8b8bef886 ]

dev_pm_domain_attach_list() returns the number of attached PM domains on success (a positive count), or a negative error code on failure. The driver checks "if (ret)" which treats a successful attachment of one or more PM domains as an error, causing the probe to fail with return code 1.

Fix by checking "if (ret < 0)" like all other users of this API.

Fixes 84cf9e541ccc ("cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver")
---
 drivers/cpufreq/airoha-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/airoha-cpufreq.c +1 -1
index 3e7770860d13c..8283c528d0c14 100644
@@ -64,7 +64,7 @@ static int airoha_cpufreq_probe(struct platform_device *pdev)
 	/* Attach PM for OPP */
 	ret = dev_pm_domain_attach_list(cpu_dev, &attach_data,
 					&priv->pd_list);
-	if (ret)
+	if (ret < 0)
 		goto clear_opp_config;
 
 	cpufreq_dt = platform_device_register_simple("cpufreq-dt", -1, NULL, 0);
Signature · 1 line
2.53.0
author maintainer
#28 lore raw

PATCH 25/1257 media: streamzap: Add missing rc_unregister_device()

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit 3982d2eeb1bdf7a9c14e4ff69015cb456f11da51 ]

If usb_submit_urb() fails during probe, then the error path is missing a call to rc_unregister_device(), which will leak various things like the input device.

Fixes 42844992664f ("media: rc: streamzap: Error handling in probe")
---
 drivers/media/rc/streamzap.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/rc/streamzap.c +1 -0
index 307985d74fe8a..41195ad82734f 100644
@@ -365,6 +365,7 @@ static int streamzap_probe(struct usb_interface *intf,
 
 	return 0;
 rc_submit_fail:
+	rc_unregister_device(sz->rdev);
 	rc_free_device(sz->rdev);
 	usb_set_intfdata(intf, NULL);
 rc_dev_fail:
Signature · 1 line
2.53.0
author maintainer
#29 lore raw

PATCH 26/1257 media: redrat3: Ensure we dont read beyond the end of the packet

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit cd49f62f4161c7340d9c9f53b67757575900c0bc ]

The length and offset is provided by the usb device, so it should be validated.

Fixes 2154be651b90 ("[media] redrat3: new rc-core IR transceiver device driver")
---
 drivers/media/rc/redrat3.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/media/rc/redrat3.c +16 -0
index 565c490b7051a..1200fb49d8879 100644
@@ -358,8 +358,24 @@ static void redrat3_process_ir_data(struct redrat3_dev *rr3)
 
 	/* process each rr3 encoded byte into an int */
 	sig_size = be16_to_cpu(rr3->irdata.sig_size);
+
+	/*
+	 * Note we are not checking if we are reading beyond the end of the
+	 * packet which was sent, and reading stale data. If the device
+	 * sends a packet which is short then we get garbage IR, but no
+	 * out of bounds read.
+	 */
+	if (sig_size > RR3_MAX_SIG_SIZE) {
+		dev_err(dev, "length %u is incorrect\n", sig_size);
+		return;
+	}
+
 	for (i = 0; i < sig_size; i++) {
 		offset = rr3->irdata.sigdata[i];
+		if (offset >= RR3_DRIVER_MAXLENS) {
+			dev_err(dev, "offset %u is incorrect\n", offset);
+			return;
+		}
 		val = get_unaligned_be16(&rr3->irdata.lens[offset]);
 
 		/* we should always get pulse/space/pulse/space samples */
Signature · 1 line
2.53.0
author maintainer
#30 lore raw

PATCH 27/1257 media: redrat3: Ensure all urbs are suspended

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit 1582f545273f2aa4eb4ee6f3a89b433f5c85c68f ]

Ensure that the learn urb is stopped before suspend.

Fixes c49fcdde38cb ("[media] redrat3: enable carrier reports using wideband receiver")
---
 drivers/media/rc/redrat3.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/rc/redrat3.c +1 -0
index 1200fb49d8879..fc514d9f868b1 100644
@@ -1168,6 +1168,7 @@ static int redrat3_dev_suspend(struct usb_interface *intf, pm_message_t message)
 	usb_kill_urb(rr3->narrow_urb);
 	usb_kill_urb(rr3->wide_urb);
 	usb_kill_urb(rr3->flash_urb);
+	usb_kill_urb(rr3->learn_urb);
 	return 0;
 }
 
Signature · 1 line
2.53.0
author maintainer
#31 lore raw

PATCH 28/1257 media: redrat3: Error path leaves device in transmitting state

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit 8024d5e84531d828535365718278f1cf0ce67db0 ]

In the allocation failure error path, the transmitting boolean is not cleared. If this error path is followed the transmitter cannot be used again until the device is replugged or the module reloaded.

Fix the error path by moving the assignment statement.

Remove the check for the transmitting state in transmit, since rc-core ensures there is never a reentrant call to the driver transmit function; the transmit function is always called with dev->lock held.

The transmitting boolean is only used for interpretting firmware errors.

Fixes fac59136bc22 ("[media] RedRat3: Return directly after a failed kcalloc() in redrat3_transmit_ir()")"
---
 drivers/media/rc/redrat3.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/media/rc/redrat3.c +3 -8
index fc514d9f868b1..3e82b5e66477e 100644
@@ -773,17 +773,9 @@ static int redrat3_transmit_ir(struct rc_dev *rcdev, unsigned *txbuf,
 	u8 curlencheck = 0;
 	unsigned i, sendbuf_len;
 
-	if (rr3->transmitting) {
-		dev_warn(dev, "%s: transmitter already in use\n", __func__);
-		return -EAGAIN;
-	}
-
 	if (count > RR3_MAX_SIG_SIZE - RR3_TX_TRAILER_LEN)
 		return -EINVAL;
 
-	/* rr3 will disable rc detector on transmit */
-	rr3->transmitting = true;
-
 	sample_lens = kzalloc_objs(*sample_lens, RR3_DRIVER_MAXLENS);
 	if (!sample_lens)
 		return -ENOMEM;
@@ -794,6 +786,9 @@ static int redrat3_transmit_ir(struct rc_dev *rcdev, unsigned *txbuf,
 		goto out;
 	}
 
+	/* rr3 will disable rc detector on transmit */
+	rr3->transmitting = true;
+
 	for (i = 0; i < count; i++) {
 		cur_sample_len = redrat3_us_to_len(txbuf[i]);
 		if (cur_sample_len > 0xffff) {
Signature · 1 line
2.53.0
author maintainer
#32 lore raw

PATCH 29/1257 media: sunxi-cir: Ensure no more interrupts can occur before free

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit f9b33ec404200c03dd490ec133b8f9bf599c5444 ]

Only call rc_free_device() once the hardware has been stopped.

Fixes dccc0c3ddf8f ("media: rc: fix race between unregister and urb/irq callbacks")
---
 drivers/media/rc/sunxi-cir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/sunxi-cir.c +1 -1
index 28e840a7e5b8c..af1ee08ffdbec 100644
@@ -374,8 +374,8 @@ static void sunxi_ir_remove(struct platform_device *pdev)
 	struct sunxi_ir *ir = platform_get_drvdata(pdev);
 
 	rc_unregister_device(ir->rc);
-	rc_free_device(ir->rc);
 	sunxi_ir_hw_exit(&pdev->dev);
+	rc_free_device(ir->rc);
 }
 
 static void sunxi_ir_shutdown(struct platform_device *pdev)
Signature · 1 line
2.53.0
author maintainer
#33 lore raw

PATCH 30/1257 media: meson-ir-tx: Ensure clock is disabled on unbind

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit 1517326fcc9dfdb9acb24f42472366ac1b4b8237 ]

clk_prepare_enable() needs a call to clk_disable_unprepare() on driver unbind. Make it devm managed.

Fixes 49be1c78d575 ("media: rc: introduce Meson IR TX driver")
---
 drivers/media/rc/meson-ir-tx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/media/rc/meson-ir-tx.c +4 -3
index fded2c256f2a6..6beb9e97453dd 100644
@@ -288,11 +288,12 @@ static int meson_irtx_mod_clock_probe(struct meson_irtx *ir,
 	if (!np)
 		return -ENODEV;
 
-	clock = devm_clk_get(ir->dev, "xtal");
-	if (IS_ERR(clock) || clk_prepare_enable(clock))
+	*clk_nr = IRB_MOD_XTAL3_CLK;
+
+	clock = devm_clk_get_enabled(ir->dev, "xtal");
+	if (IS_ERR(clock))
 		return -ENODEV;
 
-	*clk_nr = IRB_MOD_XTAL3_CLK;
 	ir->clk_rate = clk_get_rate(clock) / 3;
 
 	if (ir->clk_rate < IRB_MOD_1US_CLK_RATE) {
Signature · 1 line
2.53.0
author maintainer
#34 lore raw

PATCH 31/1257 media: meson-ir-tx: Ensure rc_free_device() is called on unbind

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit 32999b8a9d5c4f497c9739e70ac4ee390cd650a7 ]

Make rc_dev devm managed.

Fixes dccc0c3ddf8f ("media: rc: fix race between unregister and urb/irq callbacks")
---
 drivers/media/rc/meson-ir-tx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/media/rc/meson-ir-tx.c +2 -4
index 6beb9e97453dd..e8e3c1a303279 100644
@@ -346,7 +346,7 @@ static int meson_irtx_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "irq request failed\n");
 
-	rc = rc_allocate_device(RC_DRIVER_IR_RAW_TX);
+	rc = devm_rc_allocate_device(dev, RC_DRIVER_IR_RAW_TX);
 	if (!rc)
 		return -ENOMEM;
 
@@ -359,10 +359,8 @@ static int meson_irtx_probe(struct platform_device *pdev)
 	rc->s_tx_duty_cycle = meson_irtx_set_duty_cycle;
 
 	ret = devm_rc_register_device(dev, rc);
-	if (ret < 0) {
-		rc_free_device(rc);
+	if (ret < 0)
 		return dev_err_probe(dev, ret, "rc_dev registration failed\n");
-	}
 
 	return 0;
 }
Signature · 1 line
2.53.0
author maintainer
#35 lore raw

PATCH 32/1257 media: meson-ir-tx: Ensure probe error is propagated

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit 2eb8a4cba70f521a8217021e227cfa28ba17724b ]

devm_clk_get_enabled() may return -EPROBE_DEFER which needs to be propagated else the probe will not be deferred, it will fail instead.

Fixes 49be1c78d575 ("media: rc: introduce Meson IR TX driver")
---
 drivers/media/rc/meson-ir-tx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/rc/meson-ir-tx.c +2 -2
index e8e3c1a303279..1ab898069e67f 100644
@@ -292,7 +292,7 @@ static int meson_irtx_mod_clock_probe(struct meson_irtx *ir,
 
 	clock = devm_clk_get_enabled(ir->dev, "xtal");
 	if (IS_ERR(clock))
-		return -ENODEV;
+		return PTR_ERR(clock);
 
 	ir->clk_rate = clk_get_rate(clock) / 3;
 
@@ -325,7 +325,7 @@ static int meson_irtx_probe(struct platform_device *pdev)
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
-		return -ENODEV;
+		return irq;
 
 	ir->dev = dev;
 	ir->carrier = MIRTX_DEFAULT_CARRIER;
Signature · 1 line
2.53.0
author maintainer
#36 lore raw

PATCH 33/1257 media: ir-hix5hd2: Ensure rdev is setup before interrupts are enabled

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sean Young <[email protected]>

[ Upstream commit f7509d2567cf92eeccc31c363a2e2ae43188930c ]

Once the interrupt handler is enabled, priv->rdev can be used. Ensure it is setup correctly so there is no race condition.

Fixes a84fcdaa9058 ("[media] rc: Introduce hix5hd2 IR transmitter driver")
---
 drivers/media/rc/ir-hix5hd2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/media/rc/ir-hix5hd2.c +3 -2
index 1b061e4a3dcfa..aa3de4d57a585 100644
@@ -316,6 +316,9 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto clkerr;
 
+	priv->rdev = rdev;
+	priv->dev = dev;
+
 	if (devm_request_irq(dev, priv->irq, hix5hd2_ir_rx_interrupt,
 			     0, pdev->name, priv) < 0) {
 		dev_err(dev, "IRQ %d register failed\n", priv->irq);
@@ -323,8 +326,6 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
 		goto regerr;
 	}
 
-	priv->rdev = rdev;
-	priv->dev = dev;
 	platform_set_drvdata(pdev, priv);
 
 	return ret;
Signature · 1 line
2.53.0
author maintainer
#37 lore raw

PATCH 34/1257 media: imx-jpeg: finish the job on device_run() error paths

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Fan Wu <[email protected]>

[ Upstream commit 30b35fd2b999e1b8c26f8191d974d20c8848d2d6 ]

mxc_jpeg_device_run() returns early through a shared "end" label on several error paths (no free slot, mxc_jpeg_alloc_slot_data() failure, or missing buffers or queue data), and none of them calls v4l2_m2m_job_finish(). Since the delayed work is queued only after the hardware is started, those paths neither finish the job directly nor queue timeout work that could finish it later. The job is left with TRANS_RUNNING set, so the wait_event() in v4l2_m2m_cancel_job() (reached from v4l2_m2m_ctx_release() at close) waits indefinitely and the close hangs.

mxc_jpeg_alloc_slot_data() uses dma_alloc_coherent(), so the failure path is reachable under memory pressure.

Return the src/dst buffers with VB2_BUF_STATE_ERROR and call v4l2_m2m_job_finish() on those paths: paths that have buffers use a "buf_finish" label; the no-buffer path uses "job_finish" directly. This mirrors the existing jpeg_parse_error path.

This bug was found by static analysis.

Fixes 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder")
---
 .../media/platform/nxp/imx-jpeg/mxc-jpeg.c    | 21 +++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c +15 -6
index ea2fad5dd646d..e170859354352 100644
@@ -1590,15 +1590,15 @@ static void mxc_jpeg_device_run(void *priv)
 	dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
 	if (!src_buf || !dst_buf) {
 		dev_err(dev, "Null src or dst buf\n");
-		goto end;
+		goto job_finish;
 	}
 
 	q_data_cap = mxc_jpeg_get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE);
 	if (!q_data_cap)
-		goto end;
+		goto buf_finish;
 	q_data_out = mxc_jpeg_get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT);
 	if (!q_data_out)
-		goto end;
+		goto buf_finish;
 	src_buf->sequence = q_data_out->sequence++;
 	dst_buf->sequence = q_data_cap->sequence++;
 
@@ -1636,11 +1636,11 @@ static void mxc_jpeg_device_run(void *priv)
 	ctx->slot = mxc_get_free_slot(&jpeg->slot_data);
 	if (ctx->slot < 0) {
 		dev_err(dev, "No more free slots\n");
-		goto end;
+		goto buf_finish;
 	}
 	if (!mxc_jpeg_alloc_slot_data(jpeg)) {
 		dev_err(dev, "Cannot allocate slot data\n");
-		goto end;
+		goto buf_finish;
 	}
 
 	mxc_jpeg_enable_slot(reg, ctx->slot);
@@ -1660,8 +1660,17 @@ static void mxc_jpeg_device_run(void *priv)
 		mxc_jpeg_dec_mode_go(dev, reg);
 	}
 	schedule_delayed_work(&ctx->task_timer, msecs_to_jiffies(hw_timeout));
-end:
+
 	spin_unlock_irqrestore(&ctx->mxc_jpeg->hw_lock, flags);
+	return;
+buf_finish:
+	v4l2_m2m_src_buf_remove(ctx->fh.m2m_ctx);
+	v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
+	v4l2_m2m_buf_done(src_buf, VB2_BUF_STATE_ERROR);
+	v4l2_m2m_buf_done(dst_buf, VB2_BUF_STATE_ERROR);
+job_finish:
+	spin_unlock_irqrestore(&ctx->mxc_jpeg->hw_lock, flags);
+	v4l2_m2m_job_finish(jpeg->m2m_dev, ctx->fh.m2m_ctx);
 }
 
 static int mxc_jpeg_decoder_cmd(struct file *file, void *priv,
Signature · 1 line
2.53.0
author maintainer
#38 lore raw

PATCH 35/1257 microblaze: Fix MB_MANAGER build with older binutils

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Karl Mehltretter <[email protected]>

[ Upstream commit 79c8aa4da3d5453dd956d2170d1c9c716311ea06 ]

Commit 88707ebe77e2 ("microblaze: Add custom break vector handler for mb manager") added the suspend mnemonic to the MB Manager break handler.

GNU as only learned this mnemonic in binutils 2.42. Linux supports binutils 2.30, where enabling CONFIG_MB_MANAGER fails:

arch/microblaze/kernel/entry.S:946: Error: unknown opcode "suspend"

The suspend mnemonic is an alias for mbar 24, and both encode as 0xbb020004. Use the underlying instruction, which GNU as 2.30 already supports.

---
 arch/microblaze/kernel/entry.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/microblaze/kernel/entry.S +1 -1
index 582d7256d8154..ad44341a5dbc7 100644
@@ -943,7 +943,7 @@ ret_from_break:
 	mbar	1
 	mbar	2
 	bri	4
-	suspend
+	mbar	24 /* suspend */
 	nop
 #endif
 
Signature · 1 line
2.53.0
author maintainer
#39 lore raw

PATCH 36/1257 devtmpfs: restore mount option reconfiguration on get_tree

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Eric Sandeen <[email protected]>

[ Upstream commit 1c7df6fa838a46f0d5090ef134f67511f0592f33 ]

commit cb0e0a8bf4e1 ("devtmpfs: replace ->mount with ->get_tree in public instance") converted the public devtmpfs instance to the new mount API but broke the ability to reconfigure the shared superblock options via subsequent mount() calls, as had been fixed once in a6097180d884 ("devtmpfs regression fix: reconfigure on each mount")

This makes boot-time defaults permanent.

Fix this using an approach suggested by Al Viro: at init_fs_context time, create a reconfigure-mode context via fs_context_for_reconfigure() and save it in fc->fs_private. The devtmpfs parse ops can then use this context to parse options appropriately for the underlying filesystem.

This also removes the devtmpfs_configure_context() one-time ops-copying approach and the global mutable ops table it required.

---
 drivers/base/devtmpfs.c | 108 ++++++++++++++++++++++++----------------
 1 file changed, 64 insertions(+), 44 deletions(-)
drivers/base/devtmpfs.c +64 -44
index aef0fcc6aba1e..11c70888f38be 100644
@@ -72,39 +72,90 @@ static struct file_system_type internal_fs_type = {
 	.kill_sb = kill_anon_super,
 };
 
-/* Simply take a ref on the existing mount */
+struct devtmpfs_context {
+	struct fs_context *fc;
+};
+
+static void devtmpfs_free(struct fs_context *fc)
+{
+	struct devtmpfs_context *ctx = fc->fs_private;
+
+	if (ctx) {
+		put_fs_context(ctx->fc);
+		kfree(ctx);
+	}
+}
+
+static int devtmpfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
+{
+	struct devtmpfs_context *ctx = fc->fs_private;
+
+	return ctx->fc->ops->parse_param(ctx->fc, param);
+}
+
+static int devtmpfs_parse_monolithic(struct fs_context *fc, void *data)
+{
+	struct devtmpfs_context *ctx = fc->fs_private;
+
+	if (ctx->fc->ops->parse_monolithic)
+		return ctx->fc->ops->parse_monolithic(ctx->fc, data);
+	return generic_parse_monolithic(ctx->fc, data);
+}
+
 static int devtmpfs_get_tree(struct fs_context *fc)
 {
+	struct devtmpfs_context *ctx = fc->fs_private;
 	struct super_block *sb = mnt->mnt_sb;
+	int err;
 
 	atomic_inc(&sb->s_active);
 	down_write(&sb->s_umount);
+
+	if (ctx->fc->ops->reconfigure) {
+		err = ctx->fc->ops->reconfigure(ctx->fc);
+		if (err) {
+			deactivate_locked_super(sb);
+			return err;
+		}
+	}
+
 	fc->root = dget(sb->s_root);
 	return 0;
 }
 
-/* Ops are filled in during init depending on underlying shmem or ramfs type */
-static struct fs_context_operations devtmpfs_context_ops = {};
+static const struct fs_context_operations devtmpfs_context_ops = {
+	.free		  = devtmpfs_free,
+	.parse_param	  = devtmpfs_parse_param,
+	.parse_monolithic = devtmpfs_parse_monolithic,
+	.get_tree	  = devtmpfs_get_tree,
+};
 
-/* Call the underlying initialization and set to our ops */
 static int devtmpfs_init_fs_context(struct fs_context *fc)
 {
-	int ret;
-#ifdef CONFIG_TMPFS
-	ret = shmem_init_fs_context(fc);
-#else
-	ret = ramfs_init_fs_context(fc);
-#endif
-	if (ret < 0)
-		return ret;
+	struct devtmpfs_context *ctx;
+	int err;
+
+	ctx = kzalloc_obj(struct devtmpfs_context);
+	if (!ctx)
+		return -ENOMEM;
+
+	/* Each mount will reconfigure the shared superblock w/ new options */
+	ctx->fc = fs_context_for_reconfigure(mnt->mnt_root,
+					     mnt->mnt_sb->s_flags, MS_RMT_MASK);
+	if (IS_ERR(ctx->fc)) {
+		err = PTR_ERR(ctx->fc);
+		kfree(ctx);
+		return err;
+	}
 
+	fc->fs_private = ctx;
 	fc->ops = &devtmpfs_context_ops;
 
 	return 0;
 }
 
 static struct file_system_type dev_fs_type = {
-	.name = "devtmpfs",
+	.name		 = "devtmpfs",
 	.init_fs_context = devtmpfs_init_fs_context,
 };
 
@@ -442,31 +493,6 @@ static int __ref devtmpfsd(void *p)
 	return 0;
 }
 
-/*
- * Get the underlying (shmem/ramfs) context ops to build ours
- */
-static int devtmpfs_configure_context(void)
-{
-	struct fs_context *fc;
-
-	fc = fs_context_for_reconfigure(mnt->mnt_root, mnt->mnt_sb->s_flags,
-					MS_RMT_MASK);
-	if (IS_ERR(fc))
-		return PTR_ERR(fc);
-
-	/* Set up devtmpfs_context_ops based on underlying type */
-	devtmpfs_context_ops.free	      = fc->ops->free;
-	devtmpfs_context_ops.dup	      = fc->ops->dup;
-	devtmpfs_context_ops.parse_param      = fc->ops->parse_param;
-	devtmpfs_context_ops.parse_monolithic = fc->ops->parse_monolithic;
-	devtmpfs_context_ops.get_tree	      = &devtmpfs_get_tree;
-	devtmpfs_context_ops.reconfigure      = fc->ops->reconfigure;
-
-	put_fs_context(fc);
-
-	return 0;
-}
-
 /*
  * Create devtmpfs instance, driver-core devices will add their device
  * nodes here.
@@ -482,12 +508,6 @@ int __init devtmpfs_init(void)
 		return PTR_ERR(mnt);
 	}
 
-	err = devtmpfs_configure_context();
-	if (err) {
-		pr_err("unable to configure devtmpfs type %d\n", err);
-		return err;
-	}
-
 	err = register_filesystem(&dev_fs_type);
 	if (err) {
 		pr_err("unable to register devtmpfs type %d\n", err);
Signature · 1 line
2.53.0
author maintainer
#40 lore raw

PATCH 37/1257 udf: Make sure theres enough space for LVID implementation use field

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jan Kara <[email protected]>

[ Upstream commit a61fb39759d719a4f4966742b4d28387e33d81c4 ]

udf_lvid_valid() verifies that the LVID has enough space for all the tables and the reported length of ImplementationUse field. However it doesn't make sure the reported length is large enough to contain logicalVolIntegrityDescImpUse structure which OSTA specification requires. This can thus lead to accesses beyond the end of LVID buffer for suitably corrupted UDF filesystem. Add the length check.

---
 fs/udf/super.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
fs/udf/super.c +4 -1
index 2ba5973ef4dd4..5351755aca3ec 100644
@@ -1617,7 +1617,10 @@ static bool udf_lvid_valid(struct super_block *sb,
 
 	parts = le32_to_cpu(lvid->numOfPartitions);
 	impuselen = le32_to_cpu(lvid->lengthOfImpUse);
-	if (parts >= sb->s_blocksize || impuselen >= sb->s_blocksize ||
+	if (sizeof(struct logicalVolIntegrityDescImpUse) > impuselen ||
+	    impuselen >= sb->s_blocksize)
+		return false;
+	if (parts >= sb->s_blocksize ||
 	    sizeof(struct logicalVolIntegrityDesc) + impuselen +
 	    2 * parts * sizeof(u32) > sb->s_blocksize)
 		return false;
Signature · 1 line
2.53.0
author maintainer
#41 lore raw

PATCH 38/1257 aio: prevent eventfd/epoll recursion on poll

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Daehyeon Ko <[email protected]>

[ Upstream commit 398e3fa789aa5ffddc8689d8cbc7b31e1824130c ]

aio_poll_wake() can complete a keyed poll request inline while the provider waitqueue lock is held. If the polled file is an epoll instance and the AIO result eventfd is watched by that same instance, signaling the result can feed back into epoll and try to take the provider waitqueue lock again.

For example, a timerfd wake can follow this path:

timerfd -> ep_poll_callback -> aio_poll_wake -> aio_complete

          -> eventfd_signal -> ep_poll_callback -> ep_poll_safewake

The second ep_poll_safewake() recursively acquires ep->poll_wait.lock. eventfd_signal_allowed() does not prevent this because the wake chain did not begin in eventfd, so the task's eventfd recursion bit is still clear when aio_poll_wake() decides to complete inline.

An unprivileged process can construct this graph and make a CPU spin on the recursive lock. DEBUG_SPINLOCK reports "BUG: spinlock recursion", and lockdep reports the same epoll waitqueue lock as both held and requested.

Always defer eventfd-backed poll completions through the existing aio_poll_put_work() path. At this point the request has already been detached from the waitqueue and active request list, so the work item can publish the completion after the provider callback releases its lock. Poll completions without a result eventfd remain inline.

Fixes e8693bcfa0b4 ("aio: allow direct aio poll comletions for keyed wakeups")
---
 fs/aio.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
fs/aio.c +6 -1
index d78acc69f4870..92241a24d9e28 100644
@@ -1869,7 +1869,12 @@ static int aio_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync,
 		list_del_init(&req->wait.entry);
 		list_del(&iocb->ki_list);
 		iocb->ki_res.res = mangle_poll(mask);
-		if (iocb->ki_eventfd && !eventfd_signal_allowed()) {
+		/*
+		 * We hold an arbitrary provider waitqueue lock here.  Signaling a
+		 * result eventfd can feed back through epoll and try to take the same
+		 * lock again.  Defer all eventfd-backed poll completions.
+		 */
+		if (iocb->ki_eventfd) {
 			iocb = NULL;
 			INIT_WORK(&req->work, aio_poll_put_work);
 			schedule_work(&req->work);
Signature · 1 line
2.53.0
author maintainer
#42 lore raw

PATCH 39/1257 ipc/mqueue: release notification resources during inode eviction

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Daehyeon Ko <[email protected]>

[ Upstream commit eb85469f0dd69ca145d63117450e14c31f67f698 ]

mqueue_flush_file() removes an mq_notify() registration only when the closing task belongs to the thread group stored in notify_owner.

A task in a separate thread group created with CLONE_FILES can register SIGEV_THREAD notification and exit without closing the shared file table. If another thread group then unlinks and last-closes the queue, ->flush() skips the registration and inode eviction loses the only pointers to its resources.

The orphaned registration permanently retains the notification skb, its netlink socket, a pid reference and a user namespace reference. An unprivileged process can repeat the sequence with new queues and sockets.

No inode users remain during eviction. Remove any stale registration there after dropping info->lock, since netlink_sendskb() may release the final socket reference.

---
 ipc/mqueue.c | 7 +++++++
 1 file changed, 7 insertions(+)
ipc/mqueue.c +7 -0
index d1dd36a651b0d..d1a1965c98118 100644
@@ -528,6 +528,13 @@ static void mqueue_evict_inode(struct inode *inode)
 		list_add_tail(&msg->m_list, &tmp_msg);
 	kfree(info->node_cache);
 	spin_unlock(&info->lock);
+	/*
+	 * A shared file table can let the notification owner exit without
+	 * running ->flush(). No users of the inode remain during eviction, so
+	 * tear down any stale notification after dropping info->lock because
+	 * netlink_sendskb() may release the final socket reference.
+	 */
+	remove_notification(info);
 
 	list_for_each_entry_safe(msg, nmsg, &tmp_msg, m_list) {
 		list_del(&msg->m_list);
Signature · 1 line
2.53.0
author maintainer
#43 lore raw

PATCH 40/1257 kho: do not reserve scratch memory in the kdump kernel

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Maxi Saparov <[email protected]>

[ Upstream commit 48be325089e15077411785d0c41ddb9071a61081 ]

If a kernel with CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT=y (or kho=on) does not receive a handover FDT, it reserves KHO scratch memory in kho_reserve_scratch().

The kdump kernel always takes this path. Since commit a6715d7ec472 ("kho: skip KHO for crash kernel"), the kernel does not add KHO metadata to the crash kimage. As a result, the kdump kernel never receives a handover FDT and always reserves scratch memory.

The kdump kernel boots in the small crashkernel= memory reservation. On our x86 hosts, the kernel and initramfs make approximately 176 MB of early reservations. The scratch areas then use approximately 650 MB more of the crashkernel memory. When a large early allocation fails, the kdump kernel panics:

bio: can't create integrity buf pool

A kdump kernel has nothing to hand over: its only task is to dump the memory of the old kernel and reboot. Fix is to disable KHO at the top of kho_memory_init() so that the kdump kernel does not reserve scratch memory.

Fixes 3dc92c311498 ("kexec: add Kexec HandOver (KHO) generation helpers")
---
 kernel/liveupdate/kexec_handover.c | 7 +++++++
 1 file changed, 7 insertions(+)
kernel/liveupdate/kexec_handover.c +7 -0
index 7c4d86daf86d5..3c87c2a3d6f09 100644
@@ -12,6 +12,7 @@
 
 #include <linux/cleanup.h>
 #include <linux/cma.h>
+#include <linux/crash_dump.h>
 #include <linux/kmemleak.h>
 #include <linux/count_zeros.h>
 #include <linux/kasan.h>
@@ -1939,6 +1940,12 @@ void __init kho_memory_init_early(void)
 
 void __init kho_memory_init(void)
 {
+	if (is_kdump_kernel()) {
+		kho_enable = false;
+		pr_info("disabled in the kdump kernel\n");
+		return;
+	}
+
 	if (kho_in.scratch_phys)
 		kho_mem_retrieve();
 	else
Signature · 1 line
2.53.0
author maintainer
#44 lore raw

PATCH 41/1257 remoteproc: elf_loader: Bound the section header table

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: HyeongJun An <[email protected]>

[ Upstream commit b32177ead5f8925aa66ceed2bd533a85196f4f0c ]

The rproc_elf_sanity_check() only checks the image is big enough to hold one section header. But find_table() walks e_shnum of them, and first dereferences the header at e_shstrndx to locate the section name table. Both fields are u16 and both come from the image, so an e_shstrndx of 65535 reads about 4 MB past the buffer.

The commit 9f9967fed9d0 ("soc: qcom: mdt_loader: Ensure we don't read past the ELF header") added the same check to the MDT loader, and says the header "is sanitized beforehand" under remoteproc. That is what this patch makes true.

Check e_shoff against the image size first, so the two bounds can use size_add() without an e_shoff above SIZE_MAX wrapping on 32-bit. The bounds are separate because e_shnum may be zero while find_table() still reads the e_shstrndx header.

Fixes 400e64df6b23 ("remoteproc: add framework for controlling remote processors")
Assisted-by Claude:claude-opus-4-8
---
 drivers/remoteproc/remoteproc_elf_loader.c | 23 ++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
drivers/remoteproc/remoteproc_elf_loader.c +21 -2
index 94177e4160473..da3cddbe7d4cb 100644
@@ -46,8 +46,9 @@ int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw)
 	struct elf32_hdr *ehdr;
 	u32 elf_shdr_get_size;
 	u64 phoff, shoff;
+	size_t shend;
 	char class;
-	u16 phnum;
+	u16 phnum, shnum, shstrndx;
 
 	if (!fw) {
 		dev_err(dev, "failed to load %s\n", name);
@@ -90,9 +91,27 @@ int rproc_elf_sanity_check(struct rproc *rproc, const struct firmware *fw)
 	phoff = elf_hdr_get_e_phoff(class, fw->data);
 	shoff = elf_hdr_get_e_shoff(class, fw->data);
 	phnum =  elf_hdr_get_e_phnum(class, fw->data);
+	shnum = elf_hdr_get_e_shnum(class, fw->data);
+	shstrndx = elf_hdr_get_e_shstrndx(class, fw->data);
 	elf_shdr_get_size = elf_size_of_shdr(class);
 
-	if (fw->size < shoff + elf_shdr_get_size) {
+	/* keeps shoff in size_t range for the two bounds below */
+	if (shoff > fw->size) {
+		dev_err(dev, "Section header table is out of bounds\n");
+		return -EINVAL;
+	}
+
+	if (shnum) {
+		shend = size_add(size_mul(elf_shdr_get_size, shnum), shoff);
+		if (shend > fw->size) {
+			dev_err(dev, "Section headers are out of bounds\n");
+			return -EINVAL;
+		}
+	}
+
+	/* find_table() reads the header at shstrndx even with no sections */
+	shend = size_add(size_mul(elf_shdr_get_size, (size_t)shstrndx + 1), shoff);
+	if (shend > fw->size) {
 		dev_err(dev, "Image is too small\n");
 		return -EINVAL;
 	}
Signature · 1 line
2.53.0
author maintainer
#45 lore raw

PATCH 42/1257 soc: qcom: geni-se: Fix endian conversion for serial_protocol comparison

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Viken Dadhaniya <[email protected]>

[ Upstream commit 0231382f070df26a8b267f9e68c5440928b87c89 ]

serial_protocol is declared as __le16 in struct se_fw_hdr, but was decoded with le32_to_cpu(). On big-endian systems the extra byte swap causes the field to always compare unequal to the protocol argument, so no firmware segment is ever selected.

Use le16_to_cpu() to match the field width.

---
 drivers/soc/qcom/qcom-geni-se.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/qcom-geni-se.c +1 -1
index 873bfbd6b2b7b..1d6e6611441d6 100644
@@ -1298,7 +1298,7 @@ static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct
 		if (le32_to_cpu(sefw->magic) != SE_MAGIC_NUM || le32_to_cpu(sefw->version) != 1)
 			continue;
 
-		if (le32_to_cpu(sefw->serial_protocol) != protocol)
+		if (le16_to_cpu(sefw->serial_protocol) != protocol)
 			continue;
 
 		if (fw_size % 2 != 0) {
Signature · 1 line
2.53.0
author maintainer
#46 lore raw

PATCH 43/1257 soc: qcom: geni-se: Widen fw_size to u32 to prevent wrap-around

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Viken Dadhaniya <[email protected]>

[ Upstream commit e976c865bf31b562ab3908f0f1e2160da77fa156 ]

fw_size is read from the 16-bit fw_size_in_items field and incremented when the count is odd. If fw_size_in_items == 0xffff the increment wraps to 0 as a u16, making the bounds check below pass for a firmware segment whose actual size was not validated. Widen fw_size to u32 so the increment never wraps.

---
 drivers/soc/qcom/qcom-geni-se.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/qcom/qcom-geni-se.c +1 -1
index 1d6e6611441d6..54c0a66d6dd6f 100644
@@ -1248,7 +1248,7 @@ static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct
 	struct se_fw_hdr *sefw;
 	u32 fw_end, cfg_idx_end, cfg_val_end;
 	u32 prog_ram_depth;
-	u16 fw_size;
+	u32 fw_size;
 	int i;
 
 	if (!fw || fw->size < sizeof(struct elf32_hdr))
Signature · 1 line
2.53.0
author maintainer
#47 lore raw

PATCH 44/1257 soc: qcom: geni-se: Fix fw_end computed before round-up; propagate size to caller

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Viken Dadhaniya <[email protected]>

[ Upstream commit d1750c530e9b9b75c8d1b29d3c76e052a049f51f ]

fw_end was computed from the raw fw_size_in_items, before the odd-word round-up. A segment with an odd word count could pass the bounds check at the unrounded value but then be copied one word past the validated limit. Move fw_end (and the cfg_{idx,val}_end) calculations to after the round-up so they always reflect the true copy extent.

The caller geni_load_se_fw() re-read hdr->fw_size_in_items for the memcpy_toio() length, bypassing the validated and rounded value established by geni_find_protocol_fw(). Add a fw_size_out output parameter and use it in the caller.

---
 drivers/soc/qcom/qcom-geni-se.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)
drivers/soc/qcom/qcom-geni-se.c +14 -9
index 54c0a66d6dd6f..11ca8223fbcd6 100644
@@ -1230,6 +1230,8 @@ EXPORT_SYMBOL_GPL(geni_se_resources_init);
  * @se: Pointer to the serial engine structure.
  * @fw: Pointer to the firmware image.
  * @protocol: Expected serial engine protocol type.
+ * @fw_size_out: Non-NULL output parameter; receives the rounded, validated
+ *               firmware word count on success.
  *
  * Identifies the appropriate firmware image or configuration required for a
  * specific communication protocol instance running on a Qualcomm GENI
@@ -1239,7 +1241,8 @@ EXPORT_SYMBOL_GPL(geni_se_resources_init);
  * Return: pointer to a valid 'struct se_fw_hdr' if found, or NULL otherwise.
  */
 static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct firmware *fw,
-					       enum geni_se_protocol_type protocol)
+					       enum geni_se_protocol_type protocol,
+					       u32 *fw_size_out)
 {
 	struct device *dev = se->dev;
 	const struct elf32_hdr *ehdr;
@@ -1289,11 +1292,6 @@ static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct
 
 		sefw = (struct se_fw_hdr *)(fw->data + phdr->p_offset);
 		fw_size = le16_to_cpu(sefw->fw_size_in_items);
-		fw_end = le16_to_cpu(sefw->fw_offset) + fw_size * sizeof(u32);
-		cfg_idx_end = le16_to_cpu(sefw->cfg_idx_offset) +
-			      le16_to_cpu(sefw->cfg_size_in_items) * sizeof(u8);
-		cfg_val_end = le16_to_cpu(sefw->cfg_val_offset) +
-			      le16_to_cpu(sefw->cfg_size_in_items) * sizeof(u32);
 
 		if (le32_to_cpu(sefw->magic) != SE_MAGIC_NUM || le32_to_cpu(sefw->version) != 1)
 			continue;
@@ -1306,6 +1304,12 @@ static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct
 			sefw->fw_size_in_items = cpu_to_le16(fw_size);
 		}
 
+		fw_end = le16_to_cpu(sefw->fw_offset) + fw_size * sizeof(u32);
+		cfg_idx_end = le16_to_cpu(sefw->cfg_idx_offset) +
+			      le16_to_cpu(sefw->cfg_size_in_items) * sizeof(u8);
+		cfg_val_end = le16_to_cpu(sefw->cfg_val_offset) +
+			      le16_to_cpu(sefw->cfg_size_in_items) * sizeof(u32);
+
 		prog_ram_depth = FIELD_GET(PROG_RAM_DEPTH_MSK,
 					   readl_relaxed(se->base + SE_HW_PARAM_2));
 		if (fw_size >= prog_ram_depth) {
@@ -1320,6 +1324,7 @@ static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct
 			continue;
 		}
 
+		*fw_size_out = fw_size;
 		return sefw;
 	}
 
@@ -1430,11 +1435,11 @@ static int geni_load_se_fw(struct geni_se *se, const struct firmware *fw,
 {
 	const u32 *fw_data, *cfg_val_arr;
 	const u8 *cfg_idx_arr;
-	u32 i, reg_value;
+	u32 i, reg_value, fw_size_in_items;
 	int ret;
 	struct se_fw_hdr *hdr;
 
-	hdr = geni_find_protocol_fw(se, fw, protocol);
+	hdr = geni_find_protocol_fw(se, fw, protocol, &fw_size_in_items);
 	if (!hdr)
 		return -EINVAL;
 
@@ -1511,7 +1516,7 @@ static int geni_load_se_fw(struct geni_se *se, const struct firmware *fw,
 
 	/* Program RAM address space. */
 	memcpy_toio(se->base + SE_GENI_CFG_RAMN, fw_data,
-		    le16_to_cpu(hdr->fw_size_in_items) * sizeof(u32));
+		    fw_size_in_items * sizeof(u32));
 
 	/* Put default values on GENI's output pads. */
 	writel_relaxed(0x1, se->base + GENI_FORCE_DEFAULT_REG);
Signature · 1 line
2.53.0
author maintainer
#48 lore raw

PATCH 45/1257 soc: qcom: geni-se: Fix write to read-only firmware buffer

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Viken Dadhaniya <[email protected]>

[ Upstream commit 28b9c15f1829fff7b26db0dbbbde1c6b466cb156 ]

geni_find_protocol_fw() casts fw->data to a non-const struct se_fw_hdr pointer and writes back the rounded-up fw_size value:

        sefw->fw_size_in_items = cpu_to_le16(fw_size);

The firmware subsystem maps the firmware blob read-only. Writing through the cast pointer causes a level-3 permission fault on AArch64 and crashes the kernel during driver probe.

The write-back is no longer necessary: geni_find_protocol_fw() now propagates the rounded size to the caller via fw_size_out. Remove the write-back and make sefw (and the hdr pointer in the caller) const-correct.

---
 drivers/soc/qcom/qcom-geni-se.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)
drivers/soc/qcom/qcom-geni-se.c +10 -12
index 11ca8223fbcd6..6ac2bdc16984c 100644
@@ -1238,17 +1238,17 @@ EXPORT_SYMBOL_GPL(geni_se_resources_init);
  * controller. Validates the firmware size against the hardware PROG_RAM_DEPTH
  * read from SE_HW_PARAM_2.
  *
- * Return: pointer to a valid 'struct se_fw_hdr' if found, or NULL otherwise.
+ * Return: pointer to a valid 'const struct se_fw_hdr' if found, or NULL otherwise.
  */
-static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct firmware *fw,
-					       enum geni_se_protocol_type protocol,
-					       u32 *fw_size_out)
+static const struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct firmware *fw,
+						     enum geni_se_protocol_type protocol,
+						     u32 *fw_size_out)
 {
 	struct device *dev = se->dev;
 	const struct elf32_hdr *ehdr;
 	const struct elf32_phdr *phdrs;
 	const struct elf32_phdr	*phdr;
-	struct se_fw_hdr *sefw;
+	const struct se_fw_hdr *sefw;
 	u32 fw_end, cfg_idx_end, cfg_val_end;
 	u32 prog_ram_depth;
 	u32 fw_size;
@@ -1290,7 +1290,7 @@ static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct
 		if (phdr->p_filesz < sizeof(struct se_fw_hdr))
 			continue;
 
-		sefw = (struct se_fw_hdr *)(fw->data + phdr->p_offset);
+		sefw = (const struct se_fw_hdr *)(fw->data + phdr->p_offset);
 		fw_size = le16_to_cpu(sefw->fw_size_in_items);
 
 		if (le32_to_cpu(sefw->magic) != SE_MAGIC_NUM || le32_to_cpu(sefw->version) != 1)
@@ -1299,10 +1299,8 @@ static struct se_fw_hdr *geni_find_protocol_fw(struct geni_se *se, const struct
 		if (le16_to_cpu(sefw->serial_protocol) != protocol)
 			continue;
 
-		if (fw_size % 2 != 0) {
+		if (fw_size % 2 != 0)
 			fw_size++;
-			sefw->fw_size_in_items = cpu_to_le16(fw_size);
-		}
 
 		fw_end = le16_to_cpu(sefw->fw_offset) + fw_size * sizeof(u32);
 		cfg_idx_end = le16_to_cpu(sefw->cfg_idx_offset) +
@@ -1437,15 +1435,15 @@ static int geni_load_se_fw(struct geni_se *se, const struct firmware *fw,
 	const u8 *cfg_idx_arr;
 	u32 i, reg_value, fw_size_in_items;
 	int ret;
-	struct se_fw_hdr *hdr;
+	const struct se_fw_hdr *hdr;
 
 	hdr = geni_find_protocol_fw(se, fw, protocol, &fw_size_in_items);
 	if (!hdr)
 		return -EINVAL;
 
-	fw_data = (const u32 *)((u8 *)hdr + le16_to_cpu(hdr->fw_offset));
+	fw_data = (const u32 *)((const u8 *)hdr + le16_to_cpu(hdr->fw_offset));
 	cfg_idx_arr = (const u8 *)hdr + le16_to_cpu(hdr->cfg_idx_offset);
-	cfg_val_arr = (const u32 *)((u8 *)hdr + le16_to_cpu(hdr->cfg_val_offset));
+	cfg_val_arr = (const u32 *)((const u8 *)hdr + le16_to_cpu(hdr->cfg_val_offset));
 
 	ret = geni_icc_set_bw(se);
 	if (ret)
Signature · 1 line
2.53.0
author maintainer
#49 lore raw

PATCH 46/1257 soc: qcom: pmic_glink: Fix device access from worker during suspend

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Abel Vesa <[email protected]>

[ Upstream commit 7d0767c5cd878707fd6711023731549c83563840 ]

For historical reasons, the GLINK smem interrupt is registered with IRRQF_NO_SUSPEND flag set, which is the underlying problem here, since the incoming messages can be delivered during late suspend and early resume.

In this specific case, the pmic_glink_altmode_worker() currently gets scheduled on the system_wq which can be scheduled to run while devices are still suspended. This proves to be a problem when a Type-C retimer, switch or mux that is controlled over a bus like I2C, because the I2C controller is suspended.

This has been proven to be the case on the X Elite boards where such retimers (ParadeTech PS8830) are used in order to handle Type-C orientation and altmode configuration. The following warning is thrown:

[   35.134876] i2c i2c-4: Transfer while suspended
[   35.143865] WARNING: CPU: 0 PID: 99 at drivers/i2c/i2c-core.h:56 __i2c_transfer+0xb4/0x57c [i2c_core]
[   35.352879] Workqueue: events pmic_glink_altmode_worker [pmic_glink_altmode]
[   35.360179] pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[   35.455242] Call trace:
[   35.457826]  __i2c_transfer+0xb4/0x57c [i2c_core] (P)
[   35.463086]  i2c_transfer+0x98/0xf0 [i2c_core]
[   35.467713]  i2c_transfer_buffer_flags+0x54/0x88 [i2c_core]
[   35.473502]  regmap_i2c_write+0x20/0x48 [regmap_i2c]
[   35.478659]  _regmap_raw_write_impl+0x780/0x944
[   35.483401]  _regmap_bus_raw_write+0x60/0x7c
[   35.487848]  _regmap_write+0x134/0x184
[   35.491773]  regmap_write+0x54/0x78
[   35.495418]  ps883x_set+0x58/0xec [ps883x]
[   35.499688]  ps883x_sw_set+0x60/0x84 [ps883x]
[   35.504223]  typec_switch_set+0x48/0x74 [typec]
[   35.508952]  pmic_glink_altmode_worker+0x44/0x1fc [pmic_glink_altmode]
[   35.515712]  process_scheduled_works+0x1a0/0x2d0
[   35.520525]  worker_thread+0x2a8/0x3c8
[   35.524449]  kthread+0xfc/0x184
[   35.527749]  ret_from_fork+0x10/0x20

The proper solution here should be to not deliver these kind of messages during system suspend at all, or at least make it configurable per glink client. But simply dropping the IRQF_NO_SUSPEND flag entirely will break other clients. The final shape of the rework of the pmic glink driver in order to fulfill both the filtering of the messages that need to be able to wake-up the system and the queueing of these messages until the system has properly resumed is still being discussed and it is planned as a future effort.

Meanwhile, the stop-gap fix here is to schedule the pmic glink altmode worker on the system_freezable_wq instead of the system_wq. This will result in the altmode worker not being scheduled to run until the devices are resumed first, which will give the controllers like I2C a chance to resume before the transfer is requested.

---
 drivers/soc/qcom/pmic_glink_altmode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/soc/qcom/pmic_glink_altmode.c +2 -2
index 13c434f8d03a6..465e5d2316a04 100644
@@ -451,7 +451,7 @@ static void pmic_glink_altmode_sc8180xp_notify(struct pmic_glink_altmode *altmod
 	alt_port->mode = mode;
 	alt_port->hpd_state = hpd_state;
 	alt_port->hpd_irq = hpd_irq;
-	schedule_work(&alt_port->work);
+	queue_work(system_freezable_wq, &alt_port->work);
 }
 
 #define SC8280XP_DPAM_MASK	0x3f
@@ -502,7 +502,7 @@ static void pmic_glink_altmode_sc8280xp_notify(struct pmic_glink_altmode *altmod
 		alt_port->tbt_data = *tbt;
 	}
 
-	schedule_work(&alt_port->work);
+	queue_work(system_freezable_wq, &alt_port->work);
 }
 
 static void pmic_glink_altmode_callback(const void *data, size_t len, void *priv)
Signature · 1 line
2.53.0
author maintainer
#50 lore raw

PATCH 47/1257 PCI: qcom: Only check bridge nodes for PERST# GPIOs

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christopher Obbard <[email protected]>

[ Upstream commit 1b3b0bc2b3672e928e06997444528f8797579eb2 ]

qcom_pcie_parse_perst() walks the PCIe hierarchy described in the device tree below its Root Port and collects the PERST# GPIOs from each bridge node so all PERST# lines can be driven in unison during controller bring-up, reset and power sequencing.

However, the recursive device tree walk currently visits every available child node without checking that it is a PCI bridge. This allows the walk to leave the PCI hierarchy and collect reset lines from children of PCI Endpoint nodes, where those reset lines belong to other drivers.

This is reproducible on the Qualcomm RB3Gen2, where a Renesas uPD720201 USB host controller sits behind a PCIe switch downstream port. A Genesys GL3590 USB hub connected to that controller is described as a child of the PCI endpoint:

	pcie@2,0 {
		device_type = "pci";

		usb-controller@0,0 {
			compatible = "pci1912,0014";

			hub@1 {
				compatible = "usb5e3,610";
				reset-gpios = <&tlmm 162 GPIO_ACTIVE_HIGH>;
			};
		};
	};

The USB controller is a PCI Endpoint, and not a bridge, but the PERST# walk descends through it and incorrectly claims the hub's reset GPIO:

	$ gpioinfo
	line 162: unnamed output consumer=PERST#

As a result, the onboard-usb-dev driver cannot acquire its reset GPIO during probe:

	onboard-usb-dev 1c08000.pcie:...:usb-controller@0,0:hub@1: \
	  error -EBUSY: failed to get reset GPIO
	onboard-usb-dev 1c08000.pcie:...:usb-controller@0,0:hub@1: \
	  probe with driver onboard-usb-dev failed with error -16

The GPIO is also added to the root port's PERST# list and is asserted and deasserted as part of PCIe reset sequencing. On the RB3Gen2 this causes the USB hub to repeatedly re-enumerate:

	[  116.479598] hub 2-1:1.0: USB hub found
	[  116.488601] hub 2-1:1.0: USB hub found
	[  116.496971] hub 2-1:1.0: USB hub found
	...

This disrupts the hub and devices connected to it.

Restrict the recursive walk to children with device_type "pci", so PERST# GPIOs are collected only from PCI bridge nodes and the walk does not descend through endpoints.

qocm_pcie_parse_ports() has made the same distinction since commit 45df22935bdc ("PCI: qcom: Restrict port parsing only to PCIe bridge child nodes"), but the PERST# walk added later did not carry over that check.

This bug is distinct from commit 3edb3a038d42 ("PCI: qcom: Skip PERST# GPIOs provided by downstream PCIe devices"), which filters PERST# GPIOs based on their provider. Here the GPIO is provided by the SoC TLMM; the bug is that reset-gpios is consumed from a non-bridge node at all.

---
 drivers/pci/controller/dwc/pcie-qcom.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pci/controller/dwc/pcie-qcom.c +4 -1
index b58a607b713f5..89a476c370988 100644
@@ -1953,7 +1953,7 @@ static bool qcom_pcie_is_child_node(struct device *dev,
 	return false;
 }
 
-/* Parse PERST# from all nodes in depth first manner starting from @np */
+/* Collect PERST# GPIOs from PCI bridge nodes depth-first, starting at @np */
 static int qcom_pcie_parse_perst(struct qcom_pcie *pcie,
 				 struct qcom_pcie_port *port,
 				 struct device_node *np)
@@ -2019,6 +2019,9 @@ static int qcom_pcie_parse_perst(struct qcom_pcie *pcie,
 
 parse_child_node:
 	for_each_available_child_of_node_scoped(np, child) {
+		if (!of_node_is_type(child, "pci"))
+			continue;
+
 		ret = qcom_pcie_parse_perst(pcie, port, child);
 		if (ret)
 			return ret;
Signature · 1 line
2.53.0
author maintainer
#51 lore raw

PATCH 48/1257 udf: validate the device specification EA before using it

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yunpeng Tian <[email protected]>

[ Upstream commit 9a2390959685ac35a58c80c8016120849a2babf6 ]

udf_get_extendedattr() bounds an extended attribute only against struct genericFormat, which is 12 bytes. A type-12 device specification is struct deviceSpec, which is 24 bytes plus a flexible impUse array. Thus a corrupted filesystem can contain extended attribute that is accepted by udf_get_extendedattr() but udf_write_inode() or udf_read_inode() may access beyond the end of provided buffer.

Provide a udf_device_spec_valid() check to validate correctness of extended attribute that is a deviceSpec. While here, check the result of udf_add_extendedattr() before dereferencing it as it can return NULL in case of error.

[JK: Removed duplicated validity checks]

---
 fs/udf/inode.c | 43 ++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 38 insertions(+), 5 deletions(-)
fs/udf/inode.c +38 -5
index 2f04c4f0e1b85..49673b555c624 100644
@@ -1336,6 +1336,26 @@ int udf_setsize(struct inode *inode, loff_t newsize)
 	return err;
 }
 
+/*
+ * Verify validity of struct deviceSpec on disk. udf_get_extendedattr() has
+ * already verified the generic header and made sure attribute fits in the
+ * inode so we just have to make sure attribute space is large enough for
+ * deviceSpec struct and required impUse information.
+ */
+static bool udf_device_spec_valid(struct deviceSpec *dsea)
+{
+	u32 attr_length, imp_use_length;
+
+	attr_length = le32_to_cpu(dsea->attrLength);
+	imp_use_length = le32_to_cpu(dsea->impUseLength);
+	if (attr_length < sizeof(struct deviceSpec) ||
+	    imp_use_length < sizeof(struct regid) ||
+	    imp_use_length > attr_length - sizeof(struct deviceSpec))
+		return false;
+
+	return true;
+}
+
 /*
  * Maximum length of linked list formed by ICB hierarchy. The chosen number is
  * arbitrary - just that we hopefully don't limit any real use of rewritten
@@ -1654,13 +1674,12 @@ static int udf_read_inode(struct inode *inode, bool hidden_inode)
 	if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) {
 		struct deviceSpec *dsea =
 			(struct deviceSpec *)udf_get_extendedattr(inode, 12, 1);
-		if (dsea) {
-			init_special_inode(inode, inode->i_mode,
+
+		if (!dsea || !udf_device_spec_valid(dsea))
+			goto out;
+		init_special_inode(inode, inode->i_mode,
 				MKDEV(le32_to_cpu(dsea->majorDeviceIdent),
 				      le32_to_cpu(dsea->minorDeviceIdent)));
-			/* Developer ID ??? */
-		} else
-			goto out;
 	}
 	ret = 0;
 out:
@@ -1757,6 +1776,7 @@ int udf_write_inode(struct inode *inode, struct writeback_control *wbc)
 	struct udf_sb_info *sbi = UDF_SB(inode->i_sb);
 	unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits;
 	struct udf_inode_info *iinfo = UDF_I(inode);
+	int err;
 
 	bh = sb_getblk(inode->i_sb,
 			udf_get_lb_pblock(inode->i_sb, &iinfo->i_location, 0));
@@ -1821,6 +1841,10 @@ int udf_write_inode(struct inode *inode, struct writeback_control *wbc)
 				udf_add_extendedattr(inode,
 						     sizeof(struct deviceSpec) +
 						     sizeof(struct regid), 12, 0x3);
+			if (!dsea) {
+				err = -ENOSPC;
+				goto out_unlock;
+			}
 			dsea->attrType = cpu_to_le32(12);
 			dsea->attrSubtype = 1;
 			dsea->attrLength = cpu_to_le32(
@@ -1828,6 +1852,10 @@ int udf_write_inode(struct inode *inode, struct writeback_control *wbc)
 						sizeof(struct regid));
 			dsea->impUseLength = cpu_to_le32(sizeof(struct regid));
 		}
+		if (!udf_device_spec_valid(dsea)) {
+			err = -EFSCORRUPTED;
+			goto out_unlock;
+		}
 		eid = (struct regid *)dsea->impUse;
 		memset(eid, 0, sizeof(*eid));
 		strcpy(eid->ident, UDF_ID_DEVELOPER);
@@ -1962,6 +1990,11 @@ int udf_write_inode(struct inode *inode, struct writeback_control *wbc)
 	set_inode_metadata_writeback(inode);
 
 	return 0;
+
+out_unlock:
+	unlock_buffer(bh);
+	brelse(bh);
+	return err;
 }
 
 struct inode *__udf_iget(struct super_block *sb, struct kernel_lb_addr *ino,
Signature · 1 line
2.53.0
author maintainer
#52 lore raw

PATCH 49/1257 microblaze: reserve the ABI argument-home area in the signal frame

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ramin Moussavi <[email protected]>

[ Upstream commit c5947d28c20955de897eeb98430f96db0494f7d7 ]

The MicroBlaze procedure call standard reserves [r1+0] for the return address and lets a callee store its incoming register arguments r5..r10 into the caller-provided home slots at [r1+4]..[r1+24]. When the kernel enters a signal handler it sets r1 to point at struct rt_sigframe, whose leading member is the siginfo prepared for the handler. A handler that homes its arguments - which an unoptimised (-O0) build always does - therefore overwrites the first 24 bytes of that siginfo, so an SA_SIGINFO handler reads corrupted values. The stores stay within siginfo (128 bytes) and do not reach the ucontext behind it.

Reserve the home area by making a seven-word gap -- the return-address slot plus the six argument slots, 28 bytes -- the first member of struct rt_sigframe, so the handler's argument stores land in scratch space instead of clobbering siginfo.

Tested on qemu-system-microblazeel (petalogix-s3adsp1800) with the uClibc-ng NPTL test suite: tst-timer4, tst-timer5, tst-mqueue5 and tst-signal6 pass; before this change they failed because the handler clobbered the signal frame.

Fixes 2148daa9c45f ("microblaze_v8: Signal support")
Assisted-by Claude:claude-opus-5
---
 arch/microblaze/kernel/signal.c | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/microblaze/kernel/signal.c +8 -0
index c78a0ff480660..4956014a99379 100644
@@ -49,6 +49,14 @@ struct sigframe {
 };
 
 struct rt_sigframe {
+	/*
+	 * Home area for the handler's register arguments: the MicroBlaze
+	 * ABI reserves [r1+0] for the return address and lets the callee
+	 * store r5..r10 at [r1+4]..[r1+24], and r1 points at this frame
+	 * when the handler is entered.  Without the gap those stores
+	 * corrupt frame->info.
+	 */
+	unsigned long abi_gap[7];
 	struct siginfo info;
 	struct ucontext uc;
 	unsigned long tramp[2];	/* signal trampoline */
Signature · 1 line
2.53.0
author maintainer
#53 lore raw

PATCH 50/1257 microblaze: dont clobber r3/r4 restored by rt_sigreturn

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ramin Moussavi <[email protected]>

[ Upstream commit da6829138a39fa3b9ec318ca54ff89af9d94d350 ]

ret_from_trap begins by storing the system call return values r3 and r4 back into the saved user pt_regs. That is right for an ordinary system call, but sys_rt_sigreturn() returns through the same path and has to be
transparent: restore_sigcontext() has just filled pt_regs from the signal frame, and every register must reach userspace exactly as saved. The two stores overwrite the restored r3/r4 with whatever the C function left in those registers.

Only r4 is actually lost, and that follows from how sigreturn is written everywhere rather than from chance. Architectures have sys_rt_sigreturn() return the restored return-value register precisely so that this writeback stores the restored value -- arm returns regs->ARM_r0, riscv and csky regs->a0, arc regs->r0 -- and microblaze does the same through *rval_p = regs->r3 in restore_sigcontext(). But the entry macros treat r3 and r4 as a pair, so ret_from_trap writes back two registers while a C function has only one return value; nothing carries the restored r4.

Commit 791d0a169b91 ("microblaze: Fix sys_rt_sigreturn_wrapper") introduced this in v2.6.37. The old wrapper saved r3/r4 before the call and reloaded them from pt_regs afterwards; switching brlid to brid removed the only point where they were reloaded, and the stores have been overwriting them ever since.

Fix it the way the sibling paths already behave: ret_from_irq and ret_from_exc restore the full register set and do not perform these stores at all. Label the instruction after the stores ret_from_trap_no_rval and enter there, biasing r15 by -8 so that the ABI return "rtsd r15, 8" lands on it; naming the entry rather than computing ret_from_trap + 8 keeps it correct if the number of stores ever changes. Restoring the old save/reload would work too, but costs four memory accesses and a branch to undo damage that is better not done.

Any value the compiler keeps in r4 across a signal is lost. The tightest windows are the lwx/swx compare-and-swap retry loops gcc emits for atomics:
in uClibc-ng's libc.so alone, 50 of 364 such loops hold the address in r4. This is not specific to one libc -- musl passes the address as "r"(p), and glibc has no microblaze atomic-machine.h and so uses gcc's __atomic builtins, which expand the same way. Triggering it needs threads plus a signal storm, which is why it survived 15 years.

Reproduced on qemu-system-microblazeel (petalogix-s3adsp1800) by running the uClibc-ng NPTL test tst-eintr1 40 times against an unchanged userspace:
on v7.2 built with gcc 16.2.0, 23 of 40 iterations died with SIGSEGV without this patch and 0 of 40 with it; on v7.0 built with gcc 12.5.0 the same comparison gave 6 of 40 against 0 of 40. The register dump of a failing iteration shows the signature: a zero r4 and a fault at address 0, while r3 came back intact.

Fixes 791d0a169b91 ("microblaze: Fix sys_rt_sigreturn_wrapper")
Assisted-by Claude:claude-opus-5
---
 arch/microblaze/kernel/entry.S | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
arch/microblaze/kernel/entry.S +16 -1
index ad44341a5dbc7..efa4ab056fb5f 100644
@@ -434,7 +434,13 @@ C_ENTRY(_user_exception):
 C_ENTRY(ret_from_trap):
 	swi	r3, r1, PT_R3
 	swi	r4, r1, PT_R4
-
+/*
+ * Entry point for returns that must not store r3/r4 back into pt_regs,
+ * i.e. rt_sigreturn, which has already restored them from the signal
+ * context.  Reached as "rtsd r15, 8" with r15 set to this label minus 8,
+ * so it stays correct if the number of stores above ever changes.
+ */
+ret_from_trap_no_rval:
 	lwi	r11, r1, PT_MODE;
 /* See if returning to kernel mode, if so, skip resched &c.  */
 	bnei	r11, 2f;
@@ -518,6 +524,15 @@ C_ENTRY(ret_from_kernel_thread):
 
 C_ENTRY(sys_rt_sigreturn_wrapper):
 	addik	r30, r0, 0		/* no restarts */
+	/*
+	 * rt_sigreturn restores the full register set from the signal
+	 * context, so it must skip the r3/r4 syscall-return stores at the
+	 * head of ret_from_trap which would otherwise overwrite the
+	 * just-restored r3/r4.  Every C function returns with "rtsd r15, 8"
+	 * -- the ABI return, where the 8 skips the caller's branch and its
+	 * delay slot -- so bias r15 by -8 to land on ret_from_trap_no_rval.
+	 */
+	addik	r15, r0, ret_from_trap_no_rval - 8
 	brid	sys_rt_sigreturn	/* Do real work */
 	addik	r5, r1, 0;		/* add user context as 1st arg */
 
Signature · 1 line
2.53.0
author maintainer
#54 lore raw

PATCH 51/1257 microblaze: restore the ABI argument home area below pt_regs (PTO)

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ramin Moussavi <[email protected]>

[ Upstream commit c35d40a3efd2e575ef51a761e983f2bf7113be6c ]

The MicroBlaze ABI has the caller reserve stack space for the arguments it passes in registers: REG_PARM_STACK_SPACE is 24 and OUTGOING_REG_PARM_STACK_SPACE is 1 in the gcc backend, so a callee may write to [caller_sp + 4, caller_sp + 28). The kernel calls C functions from entry.S with r1 pointing at pt_regs, handing the callee license to spill its incoming arguments over the saved registers -- the syscall dispatch is the worst case, where the first argument slot is PT_R1, the saved user stack pointer.

This was latent until GCC 15: since 3b9b8d6cfdf5 ("ira: Scale save/restore costs of callee save registers with block frequency") the allocator prefers spilling incoming arguments over copying them into callee-saved registers, and a kernel built with gcc >= 15 (without the TARGET_CALLEE_SAVE_COST workaround some distributions carry) corrupts PT_R1 on the first syscall: init takes SIGSEGV and the kernel panics.

The kernel had exactly this reservation until 2011:
commit 6e83557c38b4 ("microblaze: Remove r0_ram pointer and PTO alignment") removed STATE_SAVE_ARG_SPACE and with it the PTO offset, as part of cleaning up what was thought to be copied-from-v850 leftovers. Restore
it: the frame is STATE_SAVE_SIZE = PT_SIZE + PTO, r1 stays at the frame base through every asm-to-C call, and the saved registers are reached at r1 + PTO + PT_*. PTO is 28 rather than the historic 24, which was one word short: FIRST_PARM_OFFSET is 4 and REG_PARM_STACK_SPACE is 24, so the area spans [sp+4, sp+28) and needs 28 bytes. With 24 the last argument slot overlapped pt_regs' r0 -- harmless only because r0 is the constant-zero register. STACK_BOUNDARY is 32 bits, so 28 needs no further rounding.

Two places deliberately keep their mainline addressing. hw_exception_handler.S needs no offset change: its real-mode handler saves into the standalone pt_pool_space buffer rather than a stack frame, and _unaligned_data_exception works through a pointer to pt_regs in r7, where plain PT_* offsets are already right. And the user-SP reload after popping the frame keeps PT_R1 - PT_SIZE because PTO cancels there: (PTO + PT_R1) - (PT_SIZE + PTO) = PT_R1 - PT_SIZE. Both are exactly as the pre-2011 code had them.

The instruction count is unchanged -- the same instructions with different immediates, no per-call reservation and no trampolines. The cost is 28 bytes more kernel stack per saved frame.

Fixes 6e83557c38b4 ("microblaze: Remove r0_ram pointer and PTO alignment")
Assisted-by Claude:claude-opus-5
---
 arch/microblaze/include/asm/entry.h           |  13 +
 arch/microblaze/include/asm/processor.h       |   2 +-
 arch/microblaze/kernel/entry.S                | 329 +++++++++---------
 arch/microblaze/kernel/hw_exception_handler.S |   5 +
 arch/microblaze/kernel/process.c              |   5 +-
 5 files changed, 189 insertions(+), 165 deletions(-)
arch/microblaze/include/asm/entry.h +13 -0
index 9efadf12397ca..05acf4d7bc4b1 100644
@@ -21,6 +21,19 @@
 
 #define PER_CPU(var) var
 
+/*
+ * The MicroBlaze ABI has the caller reserve an argument home area:
+ * REG_PARM_STACK_SPACE is 24 and OUTGOING_REG_PARM_STACK_SPACE is 1, so a
+ * callee may write to [caller_sp + 4, caller_sp + 28).  The kernel calls C
+ * with r1 at the frame base, so reserve that area below pt_regs and reach
+ * the saved registers through PTO.  This restores what 6e83557c38b4
+ * ("microblaze: Remove r0_ram pointer and PTO alignment") removed; the old
+ * value of 24 was one word short and left the last argument slot
+ * overlapping pt_regs' r0.
+ */
+#define PTO			28
+#define STATE_SAVE_SIZE		(PT_SIZE + PTO)
+
 # ifndef __ASSEMBLER__
 DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
 DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
arch/microblaze/include/asm/processor.h +1 -1
index d59bdfffca7cc..595c24db27283 100644
@@ -73,7 +73,7 @@ unsigned long __get_wchan(struct task_struct *p);
 #  define task_regs(task) ((struct pt_regs *)task_tos(task) - 1)
 
 #  define task_pt_regs_plus_args(tsk) \
-	((void *)task_pt_regs(tsk))
+	(((void *)task_pt_regs(tsk)) - PTO)
 
 #  define task_sp(task)	(task_regs(task)->r1)
 #  define task_pc(task)	(task_regs(task)->pc)
arch/microblaze/kernel/entry.S +167 -162

675 lines not on this page · raw message

arch/microblaze/kernel/hw_exception_handler.S +5 -0
index 07ea23965f817..4693916be5267 100644
@@ -313,6 +313,11 @@ _MB_HW_ExceptionVectorTable:
 .align 4
 .ent _hw_exception_handler
 _hw_exception_handler:
+	/*
+	 * This handler saves into the static pt_pool_space buffer, not into a
+	 * stack frame, so the plain PT_* offsets are right here -- do not add
+	 * the PTO of entry.S's frames.
+	 */
 	swi	r1, r0, TOPHYS(pt_pool_space + PT_R1); /* GET_SP */
 	/* Save date to kernel memory. Here is the problem
 	 * when you came from user space */
arch/microblaze/kernel/process.c +3 -2
index 6cbf642d7b801..090e1697ea7ae 100644
@@ -19,6 +19,7 @@
 #include <linux/bitops.h>
 #include <linux/ptrace.h>
 #include <asm/cacheflush.h>
+#include <asm/entry.h>
 
 void show_regs(struct pt_regs *regs)
 {
@@ -65,7 +66,7 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
 		 * the registers. That's OK for a brand new thread.*/
 		memset(childregs, 0, sizeof(struct pt_regs));
 		memset(&ti->cpu_context, 0, sizeof(struct cpu_context));
-		ti->cpu_context.r1  = (unsigned long)childregs;
+		ti->cpu_context.r1  = (unsigned long)childregs - PTO;
 		ti->cpu_context.r20 = (unsigned long)args->fn;
 		ti->cpu_context.r19 = (unsigned long)args->fn_arg;
 		childregs->pt_mode = 1;
@@ -79,7 +80,7 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
 		childregs->r1 = usp;
 
 	memset(&ti->cpu_context, 0, sizeof(struct cpu_context));
-	ti->cpu_context.r1 = (unsigned long)childregs;
+	ti->cpu_context.r1 = (unsigned long)childregs - PTO;
 	childregs->msr |= MSR_UMS;
 
 	/* we should consider the fact that childregs is a copy of the parent
Signature · 1 line
2.53.0
author maintainer
#55 lore raw

PATCH 52/1257 microblaze: preserve the MSR carry flags across signals

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sam Price <[email protected]>

[ Upstream commit ca35dd21a5f8343f47a23e4e5b3f0ffccf76a4ae ]

setup_sigcontext() and restore_sigcontext() copy r0-r31, pc, ear, esr and fsr to and from the signal frame but never touch MSR. The interrupted MSR is therefore dropped from the signal context entirely: the handler's ucontext does not expose it, a handler cannot adjust the resumed arithmetic flags through uc_mcontext.regs.msr, and -- because restore_sigcontext() leaves regs->msr as whatever the rt_sigreturn trap left in it -- the interrupted context resumes with the carry produced by the syscall entry path (_user_exception does "addi r14, r14, 4", which writes carry), not with its own.

Other architectures round-trip the user-visible flags through the signal frame (arm's cpsr, csky's carry, x86's eflags), so a handler can both read and adjust the resumed flags; purely privileged status registers such as riscv's sstatus are left out. MicroBlaze should do the same for the user-writable bits.

Concretely, MSR[C] (carry) is lost across signal delivery. Code that keeps a live carry across a point where a signal can be delivered -- for example an lwx/swx compare-and-swap retry loop, between the swx and the carry test -- resumes with the handler's carry and mis-evaluates the result; the same failure class as the rt_sigreturn r3/r4 clobber, reached through a different register. Demonstrated under qemu-system-microblazeel (machine petalogix-s3adsp1800): a handler that sets MSR_C in uc_mcontext.regs.msr has no effect before this change (0 of 132 in-window signals propagated) and takes effect after (130 of 132).

Save MSR in setup_sigcontext() so the handler's ucontext exposes it. The signal frame is user-writable, so restore_sigcontext() must not restore it
verbatim: MicroBlaze packs the user-writable carry (MSR_C, MSR_CC) and the privileged control bits (MSR_UM, MSR_VM, MSR_IE, MSR_EE, ...) into the one register, and a verbatim restore would let userspace alter privileged return state -- rtbd derives the resumed mode from MSR_UMS/MSR_VMS. Restore only MSR_C | MSR_CC from the frame and keep the rest from the current regs->msr. This mirrors x86's
restore_sigcontext(), which masks the restored EFLAGS to FIX_EFLAGS for the same reason; arches whose status register is purely privileged (e.g. riscv sstatus) simply do not restore it at all.

Comment on the exposed MSR reworded: it is not read-only, restore_sigcontext() applies MSR_C|MSR_CC from the frame. Author's Signed-off-by kept; he agreed to comment and changelog cleanups.

---
 arch/microblaze/kernel/signal.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/microblaze/kernel/signal.c +18 -0
index 4956014a99379..6bbc16f98d5eb 100644
@@ -33,6 +33,7 @@
 #include <linux/linkage.h>
 #include <linux/resume_user_mode.h>
 #include <asm/entry.h>
+#include <asm/registers.h>
 #include <asm/ucontext.h>
 #include <linux/uaccess.h>
 #include <linux/syscalls.h>
@@ -81,6 +82,22 @@ static int restore_sigcontext(struct pt_regs *regs,
 	COPY(pc);	COPY(ear);	COPY(esr);	COPY(fsr);
 #undef COPY
 
+	/*
+	 * The frame is user-writable, so restore only the user-writable
+	 * status flags (carry) and keep the kernel-controlled MSR bits
+	 * (UMS/VMS/IE/EE/...) from regs->msr: rtbd derives the resumed mode
+	 * from UMS/VMS, so a verbatim restore would hand userspace the
+	 * privileged return state.  Same idea as x86 masking the restored
+	 * EFLAGS to FIX_EFLAGS.
+	 */
+	{
+		unsigned long msr;
+
+		err |= __get_user(msr, &sc->regs.msr);
+		regs->msr = (regs->msr & ~(MSR_C | MSR_CC)) |
+			    (msr & (MSR_C | MSR_CC));
+	}
+
 	*rval_p = regs->r3;
 
 	return err;
@@ -140,6 +157,7 @@ setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,
 	COPY(r26);	COPY(r27);	COPY(r28);	COPY(r29);
 	COPY(r30);	COPY(r31);
 	COPY(pc);	COPY(ear);	COPY(esr);	COPY(fsr);
+	COPY(msr);	/* restore_sigcontext() accepts only carry state */
 #undef COPY
 
 	err |= __put_user(mask, &sc->oldmask);
Signature · 1 line
2.53.0
author maintainer
#56 lore raw

PATCH 53/1257 PCI: aspeed: Fix clk and PHY leak in aspeed_pcie_port_init() error paths

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Liu Zhenlong <[email protected]>

[ Upstream commit a54ac2eb6eca8baa86b89494b8a0d9439a0f72ee ]

aspeed_pcie_port_init() calls clk_prepare_enable() to enable the port clock, but if phy_init() or phy_set_mode_ext() fails afterwards, the function returns without calling clk_disable_unprepare(), leaking the clock reference on every probe failure. Additionally, when phy_set_mode_ext() fails, phy_init() has already succeeded, so phy_exit() is also missing, leaking the PHY reference.

Add the matching clk_disable_unprepare() to both error paths, and phy_exit() to the phy_set_mode_ext() failure path, mirroring the cleanup pattern in pci-aardvark.

Compile-tested with gcc on arm64 defconfig using COMPILE_TEST.

Fixes 9aa0cb68fcc1 ("PCI: aspeed: Add ASPEED PCIe RC driver")
Assisted-by LLM
---
 drivers/pci/controller/pcie-aspeed.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/pci/controller/pcie-aspeed.c +7 -2
index 74b03a55643fa..ecb7562f84c01 100644
@@ -761,16 +761,21 @@ static int aspeed_pcie_port_init(struct aspeed_pcie_port *port)
 				     port->slot);
 
 	ret = phy_init(port->phy);
-	if (ret)
+	if (ret) {
+		clk_disable_unprepare(port->clk);
 		return dev_err_probe(dev, ret,
 				     "failed to init phy pcie for slot (%d)\n",
 				     port->slot);
+	}
 
 	ret = phy_set_mode_ext(port->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_RC);
-	if (ret)
+	if (ret) {
+		phy_exit(port->phy);
+		clk_disable_unprepare(port->clk);
 		return dev_err_probe(dev, ret,
 				     "failed to set phy mode for slot (%d)\n",
 				     port->slot);
+	}
 
 	reset_control_deassert(port->perst);
 	msleep(PCIE_RESET_CONFIG_WAIT_MS);
Signature · 1 line
2.53.0
author maintainer
#57 lore raw

PATCH 54/1257 memory: brcmstb_dpfe: Fix out-of-bounds access due to DCPU offset

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Justin Chen <[email protected]>

[ Upstream commit 7c0b82d087908765c6c7daeb06943e21b78d523e ]

On API v1/v2 boards, the DCPU coprocessor can steer kernel readl_relaxed() and writel_relaxed() to any address within 256 MB of the ioremapped DPFE dmem or regs base. The DCPU firmware provides a 28-bit offset which the driver adds to the ioremap base without any bounds checking in get_msg_ptr().

This allows a compromised DCPU firmware to trick the host kernel into reading or writing arbitrary memory-mapped I/O registers in vmalloc space. When combined with a root-writable sysfs file like dpfe_refresh, it provides an arbitrary MMIO write primitive. Similarly, world-readable sysfs files can be used to leak other devices' register contents.

Fix this by recording the resource_size() of the dmem and regs ioremaps at probe time, and rejecting any offset that, along with the largest field accessed (DRAM_VENDOR_ERROR + sizeof(u32)), exceeds the recorded mapping size.

Fixes fee5f1ef6cf7 ("memory: brcmstb: dpfe: support new way of passing data from the DCPU")
Assisted-by Gemini:gemini-3.1-pro-preview cursor
---
 drivers/memory/brcmstb_dpfe.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)
drivers/memory/brcmstb_dpfe.c +20 -2
index 08d9e05b1b338..66343205f585b 100644
@@ -182,6 +182,8 @@ struct brcmstb_dpfe_priv {
 	void __iomem *regs;
 	void __iomem *dmem;
 	void __iomem *imem;
+	resource_size_t regs_size;
+	resource_size_t dmem_size;
 	struct device *dev;
 	const struct dpfe_api *dpfe_api;
 	struct mutex lock;
@@ -401,9 +403,14 @@ static void __iomem *get_msg_ptr(struct brcmstb_dpfe_priv *priv, u32 response,
 	 */
 	switch (msg_type) {
 	case 1:
+		if (DCPU_MSG_RAM_START + offset + DRAM_VENDOR_ERROR +
+		    sizeof(u32) > priv->regs_size)
+			goto bad_offset;
 		ptr = priv->regs + DCPU_MSG_RAM_START + offset;
 		break;
 	case 0:
+		if (offset + DRAM_VENDOR_ERROR + sizeof(u32) > priv->dmem_size)
+			goto bad_offset;
 		ptr = priv->dmem + offset;
 		break;
 	default:
@@ -415,6 +422,12 @@ static void __iomem *get_msg_ptr(struct brcmstb_dpfe_priv *priv, u32 response,
 	}
 
 	return ptr;
+
+bad_offset:
+	dev_err(priv->dev, "DCPU returned out-of-range offset %#x\n", offset);
+	if (buf && size)
+		*size = sprintf(buf, "ERROR: DCPU offset out of range\n");
+	return NULL;
 }
 
 static void __finalize_command(struct brcmstb_dpfe_priv *priv)
@@ -858,6 +871,7 @@ static int brcmstb_dpfe_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct brcmstb_dpfe_priv *priv;
+	struct resource *res;
 	int ret;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -869,17 +883,21 @@ static int brcmstb_dpfe_probe(struct platform_device *pdev)
 	mutex_init(&priv->lock);
 	platform_set_drvdata(pdev, priv);
 
-	priv->regs = devm_platform_ioremap_resource_byname(pdev, "dpfe-cpu");
+	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dpfe-cpu");
+	priv->regs = devm_ioremap_resource(dev, res);
 	if (IS_ERR(priv->regs)) {
 		dev_err(dev, "couldn't map DCPU registers\n");
 		return -ENODEV;
 	}
+	priv->regs_size = resource_size(res);
 
-	priv->dmem = devm_platform_ioremap_resource_byname(pdev, "dpfe-dmem");
+	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dpfe-dmem");
+	priv->dmem = devm_ioremap_resource(dev, res);
 	if (IS_ERR(priv->dmem)) {
 		dev_err(dev, "Couldn't map DCPU data memory\n");
 		return -ENOENT;
 	}
+	priv->dmem_size = resource_size(res);
 
 	priv->imem = devm_platform_ioremap_resource_byname(pdev, "dpfe-imem");
 	if (IS_ERR(priv->imem)) {
Signature · 1 line
2.53.0
author maintainer
#58 lore raw

PATCH 55/1257 memory: brcmstb_dpfe: Bounds check DCPU-supplied MSG_ARG_COUNT

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Justin Chen <[email protected]>

[ Upstream commit 6b07f8c06caca015a0db69e3f323b5186469bc66 ]

A compromised or buggy DCPU coprocessor can make any user who reads world-readable /sys/devices/.../dpfe_info|dpfe_dram trigger a kernel stack out-of-bounds read of arbitrary extent. This bounds checks chksum_idx against MSG_FIELD_MAX after reading the response from DCPU message RAM.

Fixes 5d06f53d9509 ("memory: brcmstb: dpfe: Compute checksum at __send_command() time")
Assisted-by Gemini:gemini-3.1-pro-preview cursor
---
 drivers/memory/brcmstb_dpfe.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/memory/brcmstb_dpfe.c +2 -0
index 66343205f585b..7b02c36c7fca7 100644
@@ -503,6 +503,8 @@ static int __send_command(struct brcmstb_dpfe_priv *priv, unsigned int cmd,
 		for (i = 0; i < MSG_FIELD_MAX; i++)
 			result[i] = readl_relaxed(regs + DCPU_MSG_RAM(i));
 		chksum_idx = result[MSG_ARG_COUNT] + MSG_ARG_COUNT + 1;
+		if (chksum_idx >= MSG_FIELD_MAX)
+			ret = -EINVAL;
 	}
 
 	/* Tell DCPU we are done */
Signature · 1 line
2.53.0
author maintainer
#59 lore raw

PATCH 56/1257 memory: renesas-rpc-if: Mark XSPI_CDD1BUF0 as volatile

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Lad Prabhakar <[email protected]>

[ Upstream commit 3db1fb5e1bb4c9eefc554f985f6f3316fa1292e5 ]

Add XSPI_CDD1BUF0 to the xSPI regmap volatile register table.

XSPI_CDD1BUF0 is a data buffer register used during manual transfers and, like XSPI_CDD0BUF0, its contents are transient and should not be cached by regmap. Mark it as volatile so reads always access the hardware register.

Fixes 687cac9559d8 ("memory: renesas-rpc-if: Add RZ/G3E xSPI support")
---
 drivers/memory/renesas-rpc-if.c | 1 +
 1 file changed, 1 insertion(+)
drivers/memory/renesas-rpc-if.c +1 -0
index 3755956ae9065..104c28532c202 100644
@@ -34,6 +34,7 @@ static const struct regmap_access_table rpcif_volatile_table = {
 
 static const struct regmap_range xspi_volatile_ranges[] = {
 	regmap_reg_range(XSPI_CDD0BUF0, XSPI_CDD0BUF0),
+	regmap_reg_range(XSPI_CDD1BUF0, XSPI_CDD1BUF0),
 };
 
 static const struct regmap_access_table xspi_volatile_table = {
Signature · 1 line
2.53.0
author maintainer
#60 lore raw

PATCH 57/1257 wifi: rtw88: fix out-of-bounds CAM write when key table is full

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: イムティヤズ <[email protected]>

[ Upstream commit 10d58823cb44681466c022054030b8e68d94ce2f ]

In rtw_ops_set_key(), when the CAM table is full, rtw_sec_get_free_cam() returns RTW_MAX_SEC_CAM_NUM (32) because find_next_zero_bit()/find_first_zero_bit() return the bitmap size when no free slot exists. The bounds check compares the returned index with ">" against total_cam_num (32), so the invalid index 32 passes the check.

rtw_sec_write_cam() then indexes cam_table[32], an array declared with RTW_MAX_SEC_CAM_NUM (32) entries, causing an out-of-bounds write that corrupts the cam_map allocation bitmap. The write also sets bit 32 of cam_map, which overruns the bitmap as well.

Fix the off-by-one by rejecting indices >= total_cam_num.

Tested on: RTL8821CE (PCIe) on kernel 7.2.0-rc6-rtw88test-00059-g0d8395707651. The patched module loaded and associated to a WPA2 network; ping traffic passed with 0% packet loss. Reassociation and disconnect/reconnect cycles completed without errors, and the CAM table (debugfs dump_cam) showed valid key entries. The CAM-full boundary (28+ pairwise keys) requires an access point with 28+ clients and is not reachable in a single-client setup, so that path was verified by code inspection.

---
 drivers/net/wireless/realtek/rtw88/mac80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/mac80211.c +1 -1
index b01b98d24b0a5..0b622d7663b66 100644
@@ -603,7 +603,7 @@ static int rtw_ops_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
 		hw_key_idx = key->keyidx;
 	}
 
-	if (hw_key_idx > sec->total_cam_num) {
+	if (hw_key_idx >= sec->total_cam_num) {
 		ret = -ENOSPC;
 		goto out;
 	}
Signature · 1 line
2.53.0
author maintainer
#61 lore raw

PATCH 58/1257 wifi: rtw89: 8851b: fix swapped DPK channel/bandwidth backup fields

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yi Cong <[email protected]>

[ Upstream commit 7e080e17ca38b72f6cf01e3bc750c243573e69a7 ]

The .ch and .bw backup fields are swapped; .ch should store the channel and .bw the bandwidth, matching all other chips.

---
 drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c +2 -2
index c63f0e6364dad..71342461f2b30 100644
@@ -1895,8 +1895,8 @@ static void _dpk_information(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy,
 	u8 kidx = dpk->cur_idx[path];
 
 	dpk->bp[path][kidx].band = chan->band_type;
-	dpk->bp[path][kidx].ch = chan->band_width;
-	dpk->bp[path][kidx].bw = chan->channel;
+	dpk->bp[path][kidx].ch = chan->channel;
+	dpk->bp[path][kidx].bw = chan->band_width;
 
 	rtw89_debug(rtwdev, RTW89_DBG_RFK,
 		    "[DPK] S%d[%d] (PHY%d): TSSI %s/ DBCC %s/ %s/ CH%d/ %s\n",
Signature · 1 line
2.53.0
author maintainer
#62 lore raw

PATCH 59/1257 wifi: rtw89: cap firmware section_num before parsing

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Laxman Acharya Padhya <[email protected]>

[ Upstream commit 273b0a8be083df6d0319ce62caa870e927f94a31 ]

rtw89_fw_bin_info.section_info has FWDL_SECTION_MAX_NUM (10) entries. The v0/v1 header parsers take section_num from an 8-bit firmware field (0..255) and write info->section_info[i] with no cap. rtw89_fw_download_suit() keeps that object on the stack, so a crafted firmware blob overflows the stack.

Reject a truncated header and a section table that does not fit in the firmware image before reading fw_hdr->sections[i].

---
 drivers/net/wireless/realtek/rtw89/fw.c | 32 +++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
drivers/net/wireless/realtek/rtw89/fw.c +32 -0
index 0099c5c03e7a6..b2991bc93f852 100644
@@ -156,8 +156,24 @@ static int rtw89_fw_hdr_parser_v0(struct rtw89_dev *rtwdev, const u8 *fw, u32 le
 	if (!info)
 		return -EINVAL;
 
+	if (len < sizeof(*fw_hdr)) {
+		rtw89_err(rtwdev, "[ERR]fw header truncated\n");
+		return -EINVAL;
+	}
+
 	info->section_num = le32_get_bits(fw_hdr->w6, FW_HDR_W6_SEC_NUM);
+	if (!info->section_num || info->section_num > FWDL_SECTION_MAX_NUM) {
+		rtw89_err(rtwdev, "[ERR]invalid fw section num %u\n",
+			  info->section_num);
+		return -EINVAL;
+	}
+
 	base_hdr_len = struct_size(fw_hdr, sections, info->section_num);
+	if (base_hdr_len > len) {
+		rtw89_err(rtwdev, "[ERR]fw header truncated\n");
+		return -EINVAL;
+	}
+
 	info->dynamic_hdr_en = le32_get_bits(fw_hdr->w7, FW_HDR_W7_DYN_HDR);
 	info->idmem_share_mode = le32_get_bits(fw_hdr->w7, FW_HDR_W7_IDMEM_SHARE_MODE);
 
@@ -455,9 +471,25 @@ static int rtw89_fw_hdr_parser_v1(struct rtw89_dev *rtwdev, const u8 *fw, u32 le
 	int ret;
 	u32 i;
 
+	if (len < sizeof(*fw_hdr)) {
+		rtw89_err(rtwdev, "[ERR]fw header truncated\n");
+		return -EINVAL;
+	}
+
 	info->section_num = le32_get_bits(fw_hdr->w6, FW_HDR_V1_W6_SEC_NUM);
+	if (!info->section_num || info->section_num > FWDL_SECTION_MAX_NUM) {
+		rtw89_err(rtwdev, "[ERR]invalid fw section num %u\n",
+			  info->section_num);
+		return -EINVAL;
+	}
+
 	info->dsp_checksum = le32_get_bits(fw_hdr->w6, FW_HDR_V1_W6_DSP_CHKSUM);
 	base_hdr_len = struct_size(fw_hdr, sections, info->section_num);
+	if (base_hdr_len > len) {
+		rtw89_err(rtwdev, "[ERR]fw header truncated\n");
+		return -EINVAL;
+	}
+
 	info->dynamic_hdr_en = le32_get_bits(fw_hdr->w7, FW_HDR_V1_W7_DYN_HDR);
 	info->idmem_share_mode = le32_get_bits(fw_hdr->w7, FW_HDR_V1_W7_IDMEM_SHARE_MODE);
 
Signature · 1 line
2.53.0
author maintainer
#63 lore raw

PATCH 60/1257 platform/x86: int3472: Fix uninitialised variable warning

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Sakari Ailus <[email protected]>

[ Upstream commit 70e6384fe0f4cf9768944f81924f6c1478b0ce43 ]

Fix a compiler warning about an uninitialised err_msg variable by printing the error where it is handled:

drivers/platform/x86/intel/int3472/discrete.c:440:24: warning: ‘err_msg’ may be used uninitialized [-Wmaybe-uninitialized]
440 | return dev_err_probe(int3472->dev, ret, err_msg);

---
 drivers/platform/x86/intel/int3472/discrete.c | 25 +++++++++++--------
 1 file changed, 14 insertions(+), 11 deletions(-)
drivers/platform/x86/intel/int3472/discrete.c +14 -11
index 6c729fcfce5db..9cd4f78875abf 100644
@@ -329,7 +329,6 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
 	unsigned long gpio_flags;
 	union acpi_object *obj;
 	struct gpio_desc *gpio;
-	const char *err_msg;
 	const char *con_id;
 	int ret;
 
@@ -375,7 +374,8 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
 	case INT3472_GPIO_TYPE_HOTPLUG_DETECT:
 		ret = skl_int3472_map_gpio_to_sensor(int3472, agpio, con_id, gpio_flags);
 		if (ret)
-			err_msg = "Failed to map GPIO pin to sensor\n";
+			dev_err_probe(int3472->dev, ret,
+				      "Failed to map GPIO pin to sensor\n");
 
 		break;
 	case INT3472_GPIO_TYPE_CLK_ENABLE:
@@ -387,7 +387,7 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
 		gpio = skl_int3472_gpiod_get_from_temp_lookup(int3472, agpio, con_id, gpio_flags);
 		if (IS_ERR(gpio)) {
 			ret = PTR_ERR(gpio);
-			err_msg = "Failed to get GPIO\n";
+			dev_err_probe(int3472->dev, ret, "Failed to get GPIO\n");
 			break;
 		}
 
@@ -395,14 +395,16 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
 		case INT3472_GPIO_TYPE_CLK_ENABLE:
 			ret = skl_int3472_register_gpio_clock(int3472, gpio);
 			if (ret)
-				err_msg = "Failed to register clock\n";
+				dev_err_probe(int3472->dev, ret,
+					      "Failed to register clock\n");
 
 			break;
 		case INT3472_GPIO_TYPE_PRIVACY_LED:
 		case INT3472_GPIO_TYPE_STROBE:
 			ret = skl_int3472_register_led(int3472, gpio, con_id);
 			if (ret)
-				err_msg = "Failed to register LED\n";
+				dev_err_probe(int3472->dev, ret,
+					      "Failed to register LED\n");
 
 			break;
 		case INT3472_GPIO_TYPE_POWER_ENABLE:
@@ -413,7 +415,8 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
 			ret = skl_int3472_register_regulator(int3472, gpio, enable_time_us,
 							     con_id, second_sensor);
 			if (ret)
-				err_msg = "Failed to register regulator\n";
+				dev_err_probe(int3472->dev, ret,
+					      "Failed to register regulator\n");
 
 			break;
 		default: /* Never reached */
@@ -436,11 +439,11 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
 	int3472->ngpios++;
 	ACPI_FREE(obj);
 
-	if (ret < 0)
-		return dev_err_probe(int3472->dev, ret, err_msg);
-
-	/* Tell acpi_dev_get_resources() to not make a copy of the resource */
-	return 1;
+	/*
+	 * Either return an error or tell acpi_dev_get_resources() to not make a
+	 * copy of the resource.
+	 */
+	return ret < 0 ? ret : 1;
 }
 
 int int3472_discrete_parse_crs(struct int3472_discrete_device *int3472)
Signature · 1 line
2.53.0
author maintainer
#64 lore raw

PATCH 61/1257 platform/x86: int3472: Increase handshake GPIO delay to 200 ms

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Hans de Goede <[email protected]>

[ Upstream commit 844982d3b99340c21dd2125f44e1ad04ace6a38e ]

There have been several reports of the sensor not properly powering on, on laptops where an INT3472 handshake GPIO is used. Both with ov08x40 and hi556 sensors.

Testing has shown that a delay of 200 ms is necessary in some cases. The handshake GPIO is typically used to signal an extra bridge or other IC with that IC running the full sensor power sequence based on the handshake signal and also possible controlling I2C pass-through.

It seems that in some cases that extra IC takes up to 200 ms to before the sensor is fully powered up and ready for I2C communication.

With the default handshake signal delay increased to 200 ms the quirk to increase it to 45 ms for the ov08x40 is no longer necessary and is actually undesirable since some ov08x40 setups also need the longer delay, drop it.

---
 drivers/platform/x86/intel/int3472/discrete.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/platform/x86/intel/int3472/discrete.c +3 -9
index 9cd4f78875abf..6bc0ab3e8d1f4 100644
@@ -15,6 +15,7 @@
 #include <linux/platform_data/x86/int3472.h>
 #include <linux/platform_device.h>
 #include <linux/string_choices.h>
+#include <linux/time64.h>
 #include <linux/uuid.h>
 
 /*
@@ -178,13 +179,6 @@ static const struct int3472_gpio_map int3472_gpio_map[] = {
 		.type_to = INT3472_GPIO_TYPE_RESET,
 		.con_id = "enable",
 	},
-	{	/* ov08x40's handshake pin needs a 45 ms delay on some HP laptops */
-		.hids = (const char * const[]) { "OVTI08F4", NULL },
-		.type_from = INT3472_GPIO_TYPE_HANDSHAKE,
-		.type_to = INT3472_GPIO_TYPE_HANDSHAKE,
-		.con_id = "dvdd",
-		.enable_time_us = 45 * USEC_PER_MSEC,
-	},
 	{	/* Sensors which expect "vana" as con_id for power enable */
 		.hids = power_enable_hids_vana,
 		.type_from = INT3472_GPIO_TYPE_POWER_ENABLE,
@@ -273,8 +267,8 @@ static void int3472_get_con_id_and_polarity(struct int3472_discrete_device *int3
 	case INT3472_GPIO_TYPE_HANDSHAKE:
 		*con_id = "dvdd";
 		*gpio_flags = GPIO_ACTIVE_HIGH;
-		/* Setups using a handshake pin need 25 ms enable delay */
-		*enable_time_us = 25 * USEC_PER_MSEC;
+		/* Powering up the sensor through the handshake pin takes up to 200 ms */
+		*enable_time_us = 200 * USEC_PER_MSEC;
 		break;
 	default:
 		*con_id = "unknown";
Signature · 1 line
2.53.0
author maintainer
#65 lore raw

PATCH 62/1257 clk: mstar: msc313-mpll: fix off-by-one in clock array allocation

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: hanzhijian <[email protected]>

[ Upstream commit 712b75152c00a8ab0c56dbfe34caf88e3870ddde ]

The hws array of mpll->clk_data is allocated with struct_size() using ARRAY_SIZE(output_dividers) as the element count, giving it 7 elements. But the probe function stores the MPLL clock at hws[0] and one fixed-factor clock for each output divider at hws[i + 1] for i in [0, ARRAY_SIZE(output_dividers)), writing 8 elements in total. The final write to hws[7] is past the end of the allocation.

clk_data->num is also set to NUMOUTPUTS (8), so the clock framework reads hws[0..7], again accessing hws[7] out of bounds.

Use NUMOUTPUTS as the element count so the allocation matches the number of clocks actually stored and exposed.

Found by smatch:
drivers/clk/mstar/clk-msc313-mpll.c:134 msc313_mpll_probe()
error: buffer overflow 'mpll->clk_data->hws' 7 <= 7

Fixes bef7a78da716 ("clk: mstar: MStar/SigmaStar MPLL driver")
---
 drivers/clk/mstar/clk-msc313-mpll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/mstar/clk-msc313-mpll.c +1 -1
index 61beb4e875250..bd45aa0aec011 100644
@@ -105,7 +105,7 @@ static int msc313_mpll_probe(struct platform_device *pdev)
 		return PTR_ERR(mpll->loop_div_second);
 
 	mpll->clk_data = devm_kzalloc(dev, struct_size(mpll->clk_data, hws,
-			ARRAY_SIZE(output_dividers)), GFP_KERNEL);
+				NUMOUTPUTS), GFP_KERNEL);
 	if (!mpll->clk_data)
 		return -ENOMEM;
 
Signature · 1 line
2.53.0
author maintainer
#66 lore raw

PATCH 63/1257 ARM: imx: Fix suspend/resume crash with Clang CFI

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yo'av Moshe <[email protected]>

[ Upstream commit 242757d109bd5c9b8fb7194fb4d44625be0b859a ]

The suspend code that runs from OCRAM is copied there with fncpy(), which does not copy the kCFI type hash preceding the function. With CONFIG_CFI=y the indirect call through imx6_suspend_in_ocram_fn therefore panics.

Keep the call covered by CFI instead of exempting it:

- Add SYM_TYPED_FUNC_START_ALIGNED(), a variant of SYM_TYPED_FUNC_START() that aligns the function entry rather than the type hash preceding it, and use it to declare imx6_suspend():
fncpy() requires the entry point of the function it copies to be 8-byte aligned. The macro lives in arch/arm/include/asm/linkage.h since the requirement comes from arm's fncpy().

- Add a cfi_type member at the end of struct imx6_cpu_pm_info, which directly precedes the OCRAM copy of the function. It fits in the struct's tail padding, so no sizes or offsets change. Fill it using cfi_get_func_hash(), putting the hash where the caller's CFI check expects it: four bytes before the function entry.

Also mark ccm_base, suspend_ocram_base and imx6_suspend_in_ocram_fn as __ro_after_init: they are only written during __init, and the function pointer in particular should not be writable afterwards.

---
 arch/arm/include/asm/linkage.h   | 29 +++++++++++++++++++++++++++++
 arch/arm/mach-imx/pm-imx6.c      | 26 +++++++++++++++++++++++---
 arch/arm/mach-imx/suspend-imx6.S |  6 ++++--
 3 files changed, 56 insertions(+), 5 deletions(-)
arch/arm/include/asm/linkage.h +29 -0
index c4670694ada79..bba992f5d7a80 100644
@@ -9,4 +9,33 @@
   .type name, %function; \
   END(name)
 
+#ifdef __ASSEMBLY__
+
+/*
+ * Variants of SYM_TYPED_START/SYM_TYPED_FUNC_START that align the
+ * function entry itself instead of the kCFI type hash preceding it,
+ * for functions whose entry point must meet an alignment requirement,
+ * such as the 8-byte alignment fncpy() demands of its source.
+ */
+#ifdef CONFIG_CFI
+
+#define SYM_TYPED_START_ALIGNED(name, linkage, align)	\
+	linkage(name) ASM_NL				\
+	.balign align ASM_NL				\
+	.fill (align) - 4, 1, 0 ASM_NL			\
+	__CFI_TYPE(name) ASM_NL				\
+	name:
+
+#else /* CONFIG_CFI */
+
+#define SYM_TYPED_START_ALIGNED(name, linkage, align)	\
+	SYM_START(name, linkage, .balign align)
+
+#endif /* CONFIG_CFI */
+
+#define SYM_TYPED_FUNC_START_ALIGNED(name, align)	\
+	SYM_TYPED_START_ALIGNED(name, SYM_L_GLOBAL, align)
+
+#endif /* __ASSEMBLY__ */
+
 #endif
arch/arm/mach-imx/pm-imx6.c +23 -3
index a671ca498f887..3c73e2cdb8ceb 100644
@@ -4,6 +4,8 @@
  * Copyright 2011 Linaro Ltd.
  */
 
+#include <linux/build_bug.h>
+#include <linux/cfi.h>
 #include <linux/clk/imx.h>
 #include <linux/delay.h>
 #include <linux/init.h>
@@ -18,6 +20,7 @@
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
+#include <linux/stddef.h>
 #include <linux/suspend.h>
 #include <asm/cacheflush.h>
 #include <asm/fncpy.h>
@@ -61,9 +64,9 @@
 #define MX6Q_SUSPEND_OCRAM_SIZE		0x1000
 #define MX6_MAX_MMDC_IO_NUM		33
 
-static void __iomem *ccm_base;
-static void __iomem *suspend_ocram_base;
-static void (*imx6_suspend_in_ocram_fn)(void __iomem *ocram_vbase);
+static void __iomem *ccm_base __ro_after_init;
+static void __iomem *suspend_ocram_base __ro_after_init;
+static void (*imx6_suspend_in_ocram_fn)(void __iomem *ocram_vbase) __ro_after_init;
 
 /*
  * suspend ocram space layout:
@@ -229,8 +232,18 @@ struct imx6_cpu_pm_info {
 	struct imx6_pm_base l2_base;
 	u32 mmdc_io_num; /* Number of MMDC IOs which need saved/restored. */
 	u32 mmdc_io_val[MX6_MAX_MMDC_IO_NUM][2]; /* To save offset and value */
+	u32 cfi_type; /* kCFI type hash of imx6_suspend() */
 } __aligned(8);
 
+/*
+ * The ocram copy of imx6_suspend() starts right after struct imx6_cpu_pm_info,
+ * and the CFI check on the indirect call reads the kCFI type hash from the
+ * four bytes preceding the function entry, so cfi_type must occupy the last
+ * four bytes of the struct, i.e. fit into its tail padding.
+ */
+static_assert(offsetofend(struct imx6_cpu_pm_info, cfi_type) ==
+	      sizeof(struct imx6_cpu_pm_info));
+
 void imx6_set_int_mem_clk_lpm(bool enable)
 {
 	u32 val = readl_relaxed(ccm_base + CGPR);
@@ -568,6 +581,13 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
 			mmdc_offset_array[i]);
 	}
 
+	/*
+	 * Mask out the Thumb bit, as cfi_get_func_hash() expects the
+	 * function's actual start address. Returns 0 if CONFIG_CFI=n.
+	 */
+	pm_info->cfi_type =
+		cfi_get_func_hash((void *)((uintptr_t)&imx6_suspend & ~1UL));
+
 	imx6_suspend_in_ocram_fn = fncpy(
 		suspend_ocram_base + sizeof(*pm_info),
 		&imx6_suspend,
arch/arm/mach-imx/suspend-imx6.S +4 -2
index 63ccc2d0e920a..95d5f723ea0ed 100644
@@ -3,6 +3,7 @@
  * Copyright 2014 Freescale Semiconductor, Inc.
  */
 
+#include <linux/cfi_types.h>
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
@@ -148,7 +149,8 @@
 
 	.endm
 
-ENTRY(imx6_suspend)
+/* fncpy() requires an 8-byte-aligned entry; see arch/arm/include/asm/fncpy.h */
+SYM_TYPED_FUNC_START_ALIGNED(imx6_suspend, 8)
 	ldr	r1, [r0, #PM_INFO_PBASE_OFFSET]
 	ldr	r2, [r0, #PM_INFO_RESUME_ADDR_OFFSET]
 	ldr	r3, [r0, #PM_INFO_DDR_TYPE_OFFSET]
@@ -329,4 +331,4 @@ resume:
 	resume_mmdc
 
 	ret	lr
-ENDPROC(imx6_suspend)
+SYM_FUNC_END(imx6_suspend)
Signature · 1 line
2.53.0
author maintainer
#67 lore raw

PATCH 64/1257 bpf: Fix queue/stack map u32 index overflow

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Yuan Chen <[email protected]>

[ Upstream commit 802a30c5db726639df7f93b3a1982ecc64202abe ]

The queue/stack map addresses elements[] with the product of a u32 head/tail index and value_size, but the storage itself is allocated in 64-bit arithmetic. When max_entries * value_size reaches or exceeds U32_MAX, the product wraps and push/peek/pop operate on the wrong element, corrupting map data and leaking stale values to user space. max_entries == U32_MAX would also make the u32 capacity counter qs->size (max_entries + 1) wrap to 0 and permanently break the map.

The original bound check was removed by commit a37fb7ef24a4 ("bpf:
Eliminate rlimit-based memory accounting for queue_stack_maps maps"), which deleted the bpf_map_charge_init() call and with it the U32_MAX - PAGE_SIZE check that had earlier been moved into bpf_map_charge_init() by c85d69135a91. Oversized queue/stack maps can therefore be created again.

Restore the bound in queue_stack_map_alloc_check() with a single comparison that rejects any max_entries/value_size combination whose element storage would reach or exceed U32_MAX bytes, keeping the u32 index multiplication overflow-free and the capacity counter valid.

Fixes a37fb7ef24a4 ("bpf: Eliminate rlimit-based memory accounting for queue_stack_maps maps")
---
 kernel/bpf/queue_stack_maps.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/bpf/queue_stack_maps.c +3 -0
index 6e8b18c32a106..1cee2ba6e332b 100644
@@ -59,6 +59,9 @@ static int queue_stack_map_alloc_check(union bpf_attr *attr)
 		 */
 		return -E2BIG;
 
+	if (attr->max_entries >= U32_MAX / attr->value_size)
+		return -E2BIG;
+
 	return 0;
 }
 
Signature · 1 line
2.53.0
author maintainer
#68 lore raw

PATCH 65/1257 hte: tegra194: Initialize slice locks before registering chip

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Runyu Xiao <[email protected]>

[ Upstream commit 1329abe1bae416ab2cff89c3312d33f745d341c7 ]

Registering the HTE chip publishes its request callbacks to consumers. Initialize every slice lock before registration so a concurrent HTE request cannot use an uninitialized lock.

Fixes 09574cca6ad6 ("hte: Add Tegra194 HTE kernel provider")
---
 drivers/hte/hte-tegra194.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/hte/hte-tegra194.c +5 -5
index 4a7702b32b24f..1612812abe8f6 100644
@@ -910,17 +910,17 @@ static int tegra_hte_probe(struct platform_device *pdev)
 
 	hte_dev->chip = gc;
 
+	for (i = 0; i < slices; i++) {
+		hte_dev->sl[i].flags = 0;
+		spin_lock_init(&hte_dev->sl[i].s_lock);
+	}
+
 	ret = devm_hte_register_chip(hte_dev->chip);
 	if (ret) {
 		dev_err(gc->dev, "hte chip register failed");
 		return ret;
 	}
 
-	for (i = 0; i < slices; i++) {
-		hte_dev->sl[i].flags = 0;
-		spin_lock_init(&hte_dev->sl[i].s_lock);
-	}
-
 	val = HTE_TECTRL_ENABLE_ENABLE |
 	      (HTE_TECTRL_INTR_ENABLE << HTE_TECTRL_INTR_SHIFT) |
 	      (hte_dev->itr_thrshld << HTE_TECTRL_OCCU_SHIFT);
Signature · 1 line
2.53.0
author maintainer
#69 lore raw

PATCH 66/1257 media: i2c: cvs: Add sensor node in bound callback

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Antti Laakso <[email protected]>

[ Upstream commit 7456b40bc992a3fc34b587545716729923d507b9 ]

Sensor device nodes are created in the complete callback, which is only called when all devices are successfully registered. If any device fails to register, e.g. due to a missing driver, the complete callback is never invoked and sensor nodes are not created.

Create sensor device nodes in the bound callback instead, ensuring they are available as soon as sensor is bound regardless of other devices registration status.

Fixes 8e2b43d2c10b ("media: i2c: cvs: Add driver of Intel Computer Vision Sensing Controller(CVS)")
---
 drivers/media/i2c/cvs/v4l2.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/media/i2c/cvs/v4l2.c +9 -4
index 9fadca7a3beed..863112cde2665 100644
@@ -13,6 +13,7 @@
 #include <media/v4l2-async.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ctrls.h>
+#include <media/v4l2-device.h>
 #include <media/v4l2-event.h>
 #include <media/v4l2-fwnode.h>
 #include <media/v4l2-mc.h>
@@ -400,7 +401,7 @@ static int cvs_csi_notify_bound(struct v4l2_async_notifier *notifier,
 				struct v4l2_async_connection *asc)
 {
 	struct icvs *ctx = notifier_to_csi(notifier);
-	int pad;
+	int pad, ret;
 
 	pad = media_entity_get_fwnode_pad(&sd->entity, asc->match.fwnode,
 					  MEDIA_PAD_FL_SOURCE);
@@ -409,9 +410,13 @@ static int cvs_csi_notify_bound(struct v4l2_async_notifier *notifier,
 
 	ctx->remote = &sd->entity.pads[pad];
 
-	return media_create_pad_link(&sd->entity, pad, &ctx->subdev.entity,
-				     ICVS_CSI_PAD_SINK, MEDIA_LNK_FL_ENABLED |
-				     MEDIA_LNK_FL_IMMUTABLE);
+	ret = media_create_pad_link(&sd->entity, pad, &ctx->subdev.entity,
+				    ICVS_CSI_PAD_SINK, MEDIA_LNK_FL_ENABLED |
+				    MEDIA_LNK_FL_IMMUTABLE);
+	if (ret)
+		return ret;
+
+	return v4l2_device_register_subdev_nodes(sd->v4l2_dev);
 }
 
 /**
Signature · 1 line
2.53.0
author maintainer
#70 lore raw

PATCH 67/1257 arm64: dts: qcom: sdm845-google: Set i2c3 frequency to 400 kHz

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: David Heidelberg <[email protected]>

[ Upstream commit a317bee7cd894188d99b4edd841744f70ed9cd8c ]

The Device Tree found in the downstream kernel for this device doesn't explicitly set a bus frequency, resulting in 400 kHz being chosen.

This upstream DT also lacks it, however that results in a different default value of 100 kHz. Set it to 400 explicitly to match the downstream kernel.

Fixes 10f91b0dfaf6 ("arm64: dts: qcom: sdm845-google-common: Enable NFC")
[bjorn: Updated commit message based on suggestion from Konrad]
---
 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi +2 -0
index 9e952f9862f24..f73d4ea57705f 100644
@@ -392,6 +392,8 @@ &gpu_zap_shader {
 };
 
 &i2c3 {
+	clock-frequency = <400000>;
+
 	status = "okay";
 
 	nfc@28 {
Signature · 1 line
2.53.0
author maintainer
#71 lore raw

PATCH 68/1257 clk: mediatek: Add missing depend for COMMON_CLK_MT8173

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ricardo Ribalda <[email protected]>

[ Upstream commit 84964d0ce3faed815e1b8e048ce5ce1c93badb18 ]

PM_GENERIC_DOMAINS_OF depends on OF, by adding a select to it without adding a depend on OF, the following warning is triggered:

WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS_OF
Depends on [n]: PM_GENERIC_DOMAINS [=y] && OF [=n]
Selected by [y]:
- COMMON_CLK_MT8173_MFGTOP [=y] && COMMON_CLK [=y] && (ARCH_MEDIATEK || COMPILE_TEST [=y]) && COMMON_CLK_MT8173 [=y] && PM [=y]

This patch explicitly adds a dependency on OF to solve this issue.

Fixes ebd0b73d2137 ("clk: mediatek: Add mt8173-mfgtop driver")
---
 drivers/clk/mediatek/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/mediatek/Kconfig +1 -0
index b059d44577f1e..ba1ca9c90dbf1 100644
@@ -541,6 +541,7 @@ config COMMON_CLK_MT8173_MFGTOP
 	tristate "Clock and power driver for MediaTek MT8173 mfgtop"
 	depends on COMMON_CLK_MT8173
 	depends on PM
+	depends on OF
 	default COMMON_CLK_MT8173
 	select PM_GENERIC_DOMAINS
 	select PM_GENERIC_DOMAINS_OF
Signature · 1 line
2.53.0
author maintainer
#72 lore raw

PATCH 69/1257 wifi: ath11k: Fix possible memory leak in ath11k_dp_srng_setup()

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Abdun Nihaal <[email protected]>

[ Upstream commit 6132d70d0890c03546f6970893fd71938efb2a2f ]

In ath11k_dp_srng_setup(), the memory allocated for ring->vaddr_unaligned is not freed in the error paths that follow. Fix that by calling ath11k_dp_srng_cleanup() in those error paths.

Compile tested only. Issue found using a prototype static analysis tool built on the LLVM compiler infrastructure.

Fixes d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Assisted-by Claude:claude-sonnet-4-6
---
 drivers/net/wireless/ath/ath11k/dp.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/ath/ath11k/dp.c +2 -0
index f389b97acbdd5..be65d73b904b6 100644
@@ -313,6 +313,7 @@ int ath11k_dp_srng_setup(struct ath11k_base *ab, struct dp_srng *ring,
 	case HAL_RXDMA_DIR_BUF:
 		break;
 	default:
+		ath11k_dp_srng_cleanup(ab, ring);
 		ath11k_warn(ab, "Not a valid ring type in dp :%d\n", type);
 		return -EINVAL;
 	}
@@ -324,6 +325,7 @@ int ath11k_dp_srng_setup(struct ath11k_base *ab, struct dp_srng *ring,
 
 	ret = ath11k_hal_srng_setup(ab, type, ring_num, mac_id, &params);
 	if (ret < 0) {
+		ath11k_dp_srng_cleanup(ab, ring);
 		ath11k_warn(ab, "failed to setup srng: %d ring_id %d\n",
 			    ret, ring_num);
 		return ret;
Signature · 1 line
2.53.0
author maintainer
#73 lore raw

PATCH 70/1257 media: i2c: ov8856 : remove ACPI node bypass mechanism

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Serin Yeh <[email protected]>

[ Upstream commit 609a71568664acb7ee57b42de002ca782e3769e8 ]

On Intel platforms the sensor is enumerated via ACPI, and an INT3472 "discrete" companion device (the power-logic-control driver under drivers/platform/x86/intel/int3472) registers the sensor's reset/powerdown GPIOs and the regulator supply. These resources are therefore discoverable and usable through the standard gpiod/regulator lookups at probe time.

However, the driver guarded both the GPIO/regulator acquisition in ov8856_get_hwcfg() and the whole power-on/off sequence with is_acpi_node() and skipped them on ACPI. As a result the sensor was never powered or reset by the driver, and probe failed when reading the chip ID in ov8856_identify_module().

Remove the is_acpi_node() checks so the GPIO/regulator resources are acquired and the full power sequence runs regardless of the firmware interface. The driver now behaves consistently across DT and ACPI platforms and initialises the hardware correctly.

Tested on Intel platforms with kernel 6.17 and 7.0.

Fixes d2fa1134a48b ("media: i2c: ov8856: Use V4L2 legacy sensor clock helper")
---
 drivers/media/i2c/ov8856.c | 29 ++++++++++-------------------
 1 file changed, 10 insertions(+), 19 deletions(-)
drivers/media/i2c/ov8856.c +10 -19
index 8bedb47cd7cf6..9d2b0469a5761 100644
@@ -2082,9 +2082,6 @@ static int ov8856_power_on(struct device *dev)
 	struct ov8856 *ov8856 = to_ov8856(sd);
 	int ret;
 
-	if (is_acpi_node(dev_fwnode(dev)))
-		return 0;
-
 	ret = clk_prepare_enable(ov8856->xvclk);
 	if (ret < 0) {
 		dev_err(dev, "failed to enable xvclk\n");
@@ -2120,9 +2117,6 @@ static int ov8856_power_off(struct device *dev)
 	struct v4l2_subdev *sd = dev_get_drvdata(dev);
 	struct ov8856 *ov8856 = to_ov8856(sd);
 
-	if (is_acpi_node(dev_fwnode(dev)))
-		return 0;
-
 	gpiod_set_value_cansleep(ov8856->reset_gpio, 1);
 	regulator_bulk_disable(ARRAY_SIZE(ov8856_supply_names),
 			       ov8856->supplies);
@@ -2293,21 +2287,18 @@ static int ov8856_get_hwcfg(struct ov8856 *ov8856)
 		dev_warn(dev, "external clock rate %u is unsupported",
 			 xvclk_rate);
 
-	if (!is_acpi_node(fwnode)) {
-		ov8856->reset_gpio = devm_gpiod_get_optional(dev, "reset",
-							     GPIOD_OUT_LOW);
-		if (IS_ERR(ov8856->reset_gpio))
-			return PTR_ERR(ov8856->reset_gpio);
+	ov8856->reset_gpio = devm_gpiod_get_optional(dev, "reset",
+						     GPIOD_OUT_LOW);
+	if (IS_ERR(ov8856->reset_gpio))
+		return PTR_ERR(ov8856->reset_gpio);
 
-		for (i = 0; i < ARRAY_SIZE(ov8856_supply_names); i++)
-			ov8856->supplies[i].supply = ov8856_supply_names[i];
+	for (i = 0; i < ARRAY_SIZE(ov8856_supply_names); i++)
+		ov8856->supplies[i].supply = ov8856_supply_names[i];
 
-		ret = devm_regulator_bulk_get(dev,
-					      ARRAY_SIZE(ov8856_supply_names),
-					      ov8856->supplies);
-		if (ret)
-			return ret;
-	}
+	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ov8856_supply_names),
+				      ov8856->supplies);
+	if (ret)
+		return ret;
 
 	ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
 	if (!ep)
Signature · 1 line
2.53.0
author maintainer
#74 lore raw

PATCH 71/1257 media: i2c: ov8856: fix debug message to report actual CSI-2 lane count

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Serin Yeh <[email protected]>

[ Upstream commit a15976e69b1c70ea16ef1f7172a846f6ef5dfa14 ]

The driver currently prints the number of data lanes using ov8856->cur_mode->data_lanes in ov8856_get_hwcfg(). However, the ov8856->cur_mode structure is not assigned to a clearly supported mode at that point. Due to the missing pointer, enabling dynamic debug may lead to a kernel panic.

Instead, the correct number of CSI-2 data lanes should be taken from bus_cfg.bus.mipi_csi2.num_data_lanes, which represents the real hardware configuration determined at runtime.

Fixes c492ec9ae9ed ("media: ov8856: Add support for 2 data lanes")
---
 drivers/media/i2c/ov8856.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/ov8856.c +2 -1
index 9d2b0469a5761..6011233a218d4 100644
@@ -2318,7 +2318,8 @@ static int ov8856_get_hwcfg(struct ov8856 *ov8856)
 		goto check_hwcfg_error;
 	}
 
-	dev_dbg(dev, "Using %u data lanes\n", ov8856->cur_mode->data_lanes);
+	dev_dbg(dev, "Using %u data lanes\n",
+		bus_cfg.bus.mipi_csi2.num_data_lanes);
 
 	if (bus_cfg.bus.mipi_csi2.num_data_lanes == 2)
 		ov8856->priv_lane = &lane_cfg_2;
Signature · 1 line
2.53.0
author maintainer
#75 lore raw

PATCH 72/1257 PCI: rcar-gen4: Limit Max_Read_Request_Size to 256 Bytes

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Marek Vasut <[email protected]>

[ Upstream commit f0a5c6bd797c2b9900034983a1118d27eb2f2f16 ]

R-Car Gen4 PCIe controller has a hardware limitation of 256 Bytes Max_Payload_Size (MPS). PCIe specification indicates that the MPS must not exceed minimum MPS of any element along the packet path. The PCI core already enforces this, but add a check to warn if MPS is ever set larger than 256.

R-Car Gen4 Reference Manual, chapter 104.4.8 Usage notes for MRRS (Max Read Request Size) states:

Please set "Max Read Request Size" to 128 bytes or 256 bytes. If "Max Read Request Size" is set to anything other than the above, the transferred data will not match the expected value.

This limitation also seems to apply to devices doing DMA reads, i.e., issuing MRd TLPs. This limitation can be triggered by using non-HMB NVMe SSD with Max_Read_Request_Size 512 Bytes, for example Crucial P5 Plus. Any write to the SSD (MRd TLP issued by the SSD controller) longer than 256 Bytes wraps around at the 256 Byte boundary, and the same data are written to the SSD starting at offset 0 and at 256 Bytes.

Limit Max_Read_Request_Size to at most 256 Bytes for each device connected to this PCIe controller to avoid this behavior.

A non-HMB (Host Memory Buffer) NVMe SSD can be identified using the following command. Affected SSD reports 'hmpre' field as 0:

  $ nvme id-ctrl /dev/nvme0 | grep hmpre
  hmpre     : 0

The symptom is a read from the SSD which wraps around at 256 Byte boundary. The test for this symptom can be implemented by writing 512 Byte of random data into the SSD and reading the data back. If the read back data repeat after 256 Bytes, the device is affected.

  $ dd if=/dev/urandom of=/tmp/data.bin bs=256 count=2 ; \
    dd if=/tmp/data.bin of=/dev/nvme0n1 bs=256 count=2 ; \
    dd if=/dev/nvme0n1 bs=256 count=2 of=/tmp/readback.bin

Expected data:

  $ hexdump -vC /tmp/data.bin
  00000000  97 81 b7 3b 0e 38 2b 4d  a7 d3 e0 47 ff c2 4b ca
  00000010  c1 85 98 f0 4a ac 03 a0  3b ab f3 19 44 dd 06 8b
  ...
  00000100  7a ce 3c b2 e1 d5 d9 11  88 63 10 59 76 3c dc 32 <-- random
  00000110  72 32 2a 7d a3 e1 aa 13  7c da 58 a1 7b 21 11 50 <-- data

Faulty readback, collected without this change in place:

  $ hexdump -vC /tmp/readback.bin
  00000000  97 81 b7 3b 0e 38 2b 4d  a7 d3 e0 47 ff c2 4b ca <---.
  00000010  c1 85 98 f0 4a ac 03 a0  3b ab f3 19 44 dd 06 8b <-. |
  ...                                                          | |
  00000100  97 81 b7 3b 0e 38 2b 4d  a7 d3 e0 47 ff c2 4b ca <-:-+- repeated
  00000110  c1 85 98 f0 4a ac 03 a0  3b ab f3 19 44 dd 06 8b <-+--- data
       ^^^
        |
        '--- Repeat starts at offset 0x100 = 256 Bytes
Fixes 0d0c551011df ("PCI: rcar-gen4: Add R-Car Gen4 PCIe controller support for host mode")
---
 drivers/pci/controller/dwc/pcie-rcar-gen4.c | 54 +++++++++++++++++++++
 1 file changed, 54 insertions(+)
drivers/pci/controller/dwc/pcie-rcar-gen4.c +54 -0
index fbe465a29068f..241adcd727894 100644
@@ -411,6 +411,57 @@ static int rcar_gen4_pcie_host_msi_init(struct dw_pcie_rp *pp)
 	return ret;
 }
 
+static int rcar_gen4_pcie_enable_device(struct pci_host_bridge *bridge,
+					struct pci_dev *dev)
+{
+	/*
+	 * R-Car Gen4 PCIe controller has a hardware limitation of 256 Bytes
+	 * Max_Payload_Size (MPS). PCIe specification indicates that the MPS
+	 * must not exceed minimum MPS of any element along the packet path.
+	 * The controller reports Max_Payload_Size_Supported (MPSS) 256 Bytes
+	 * for header type 0 and 128 Bytes for header type 1. The PCIe core
+	 * will not allow MPS to be set higher than MPSS; warn here in case
+	 * something went very wrong in the core.
+	 *
+	 * For details, refer to chapter "104.1.1 Features" in either of:
+	 * R-Car S4 R19UH0161EJ0140 Rev.1.40 Jul. 31, 2026 or
+	 * R-Car V4H R19UH0186EJ0140 Rev.1.40 Aug. 7, 2026 or
+	 * R-Car V4M R19UH0217EJ0110 Rev.1.10 Jun. 30, 2026.
+	 */
+	WARN_ON(pcie_get_mps(dev) > 256);
+
+	/*
+	 * R-Car Gen4 Reference Manual, chapter 104.4.8 Usage notes for
+	 * MRRS (Max Read Request Size) states:
+	 *
+	 *   Please set "Max Read Request Size" to 128 bytes or 256 bytes.
+	 *   If "Max Read Request Size" is set to anything other than the
+	 *   above, the transferred data will not match the expected value.
+	 *
+	 * This limitation also seems to apply to devices issuing MRd TLPs.
+	 * This limitation can be triggered by using non-HMB NVMe SSD with
+	 * Max_Read_Request_Size 512 Bytes, for example Crucial P5 Plus.
+	 * Any write into the SSD (MRd TLP issued by the SSD) longer than
+	 * 256 Bytes wraps around at 256 Byte boundary, and the same data
+	 * are written into the SSD starting at offset 0 and at 256 Bytes.
+	 *
+	 * Limit Max_Read_Request_Size to at most 256 Bytes for each
+	 * device connected to this PCIe controller to avoid this behavior.
+	 *
+	 * For details, refer to aforementioned chapter in either of:
+	 * R-Car S4 R19UH0161EJ0140 Rev.1.40 Jul. 31, 2026 or
+	 * R-Car V4H R19UH0186EJ0140 Rev.1.40 Aug. 7, 2026 or
+	 * R-Car V4M R19UH0217EJ0110 Rev.1.10 Jun. 30, 2026.
+	 */
+	bridge->no_inc_mrrs = 1;
+	if (pcie_get_readrq(dev) > 256) {
+		pci_info(dev, "Limiting MRRS to 256 bytes\n");
+		pcie_set_readrq(dev, 256);
+	}
+
+	return 0;
+}
+
 /* Host mode */
 static int rcar_gen4_pcie_host_init(struct dw_pcie_rp *pp)
 {
@@ -418,6 +469,9 @@ static int rcar_gen4_pcie_host_init(struct dw_pcie_rp *pp)
 	struct rcar_gen4_pcie *rcar = to_rcar_gen4_pcie(dw);
 	int ret;
 
+	if (pp->bridge)
+		pp->bridge->enable_device = rcar_gen4_pcie_enable_device;
+
 	gpiod_set_value_cansleep(dw->pe_rst, 1);
 
 	ret = rcar_gen4_pcie_common_init(rcar);
Signature · 1 line
2.53.0
author maintainer
#76 lore raw

PATCH 73/1257 mtd: spi-nor: sfdp: check the length of the xSPI Profile 1.0 table

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: HyeongJun An <[email protected]>

[ Upstream commit b9f34a95a81021fa1f3c9cb8cfd458e66824cad6 ]

The spi_nor_parse_profile1() sizes its buffer from the table length the flash reports in the SFDP parameter header. But it then reads DWORD1, DWORD4 and DWORD5 without ever checking the table is that long.

So if a flash reports a length of one, the buffer is only four bytes while DWORD4 and DWORD5 sit at byte offsets 12 and 16. With a length of zero kmalloc() returns ZERO_SIZE_PTR rather than an error, so the NULL check doesn't catch it and the first read dereferences it. And the value doesn't just get thrown away. It ends up as the dummy cycle count for 8D-8D-8D fast reads.

To fix this, reject a table that's too short for the highest DWORD the parser reads, the way spi_nor_parse_4bait() already does. The table is optional, so this isn't fatal. The spi_nor_parse_sfdp() warns and carries on.

Fixes fb27f198971a ("mtd: spi-nor: sfdp: parse xSPI Profile 1.0 table")
Assisted-by Claude:claude-opus-4-8
---
 drivers/mtd/spi-nor/sfdp.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/mtd/spi-nor/sfdp.c +4 -0
index 4600983cb5799..ece8bbd4bc47d 100644
@@ -1175,6 +1175,7 @@ static int spi_nor_parse_4bait(struct spi_nor *nor,
 #define PROFILE1_DWORD5_DUMMY_166MHZ		GENMASK(31, 27)
 #define PROFILE1_DWORD5_DUMMY_133MHZ		GENMASK(21, 17)
 #define PROFILE1_DWORD5_DUMMY_100MHZ		GENMASK(11, 7)
+#define SFDP_PROFILE1_DWORD_MIN			5
 
 /**
  * spi_nor_parse_profile1() - parse the xSPI Profile 1.0 table
@@ -1192,6 +1193,9 @@ static int spi_nor_parse_profile1(struct spi_nor *nor,
 	int ret;
 	u8 dummy, opcode;
 
+	if (profile1_header->length < SFDP_PROFILE1_DWORD_MIN)
+		return -EINVAL;
+
 	len = profile1_header->length * sizeof(*dwords);
 	dwords = kmalloc(len, GFP_KERNEL);
 	if (!dwords)
Signature · 1 line
2.53.0
author maintainer
#77 lore raw

PATCH 74/1257 mtd: spi-nor: sfdp: check the length of the SCCR map

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: HyeongJun An <[email protected]>

[ Upstream commit 1413f38f37194673502e61cd3749e091c031370b ]

The spi_nor_parse_sccr() sizes its buffer from the table length the flash reports in the SFDP parameter header. But it then reads DWORD1 and DWORD22 without ever checking the table is that long.

So if a flash reports a length of one, the buffer is only four bytes while DWORD22 sits at byte offset 84. With a length of zero kmalloc() returns ZERO_SIZE_PTR rather than an error, so the NULL check doesn't catch it and the first read dereferences it.

To fix this, reject a table that's too short for the highest DWORD the parser reads, the way spi_nor_parse_4bait() already does. The table is optional, so this isn't fatal. The spi_nor_parse_sfdp() warns and carries on.

The spi_nor_parse_sccr_mc() doesn't need the same check. It works out the number of dice from the length it allocated with, so its highest index stays inside the buffer.

Fixes 7ab8b810757a ("mtd: spi-nor: sfdp: Add support for SCCR map for multi-chip device")
Assisted-by Claude:claude-opus-4-8
---
 drivers/mtd/spi-nor/sfdp.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/mtd/spi-nor/sfdp.c +4 -0
index ece8bbd4bc47d..98559536d41b2 100644
@@ -1266,6 +1266,7 @@ static int spi_nor_parse_profile1(struct spi_nor *nor,
 }
 
 #define SCCR_DWORD22_OCTAL_DTR_EN_VOLATILE		BIT(31)
+#define SFDP_SCCR_DWORD_MIN				22
 
 /**
  * spi_nor_parse_sccr() - Parse the Status, Control and Configuration Register
@@ -1284,6 +1285,9 @@ static int spi_nor_parse_sccr(struct spi_nor *nor,
 	size_t len;
 	int ret;
 
+	if (sccr_header->length < SFDP_SCCR_DWORD_MIN)
+		return -EINVAL;
+
 	len = sccr_header->length * sizeof(*dwords);
 	dwords = kmalloc(len, GFP_KERNEL);
 	if (!dwords)
Signature · 1 line
2.53.0
author maintainer
#78 lore raw

PATCH 75/1257 mtd: spi-nor: Unprepare legacy controllers upon RWW wait interruption

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Miquel Raynal <[email protected]>

[ Upstream commit f594a33f9721f08facd98d0a31adc14ff6da9d70 ]

All the parallel locking helpers (spi_nor_prep_and_lock(), spi_nor_prep_and_lock_pe() and spi_nor_prep_and_lock_rd()) call spi_nor_prep() then wait with a killable sleep. If the sleep gets killed, we leave the controller in its prepared state.

Call ->unprepare() in these cases.

Fixes 74df43b3f626 ("mtd: spi-nor: Enhance locking to support reads while writes")
---
 drivers/mtd/spi-nor/core.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/mtd/spi-nor/core.c +9 -0
index 8bc117b46e028..250e996284f96 100644
@@ -1346,6 +1346,9 @@ int spi_nor_prep_and_lock(struct spi_nor *nor)
 		ret = wait_event_killable(nor->rww.wait,
 					  spi_nor_rww_start_exclusive(nor));
 
+	if (ret)
+		spi_nor_unprep(nor);
+
 	return ret;
 }
 
@@ -1417,6 +1420,9 @@ static int spi_nor_prep_and_lock_pe(struct spi_nor *nor, loff_t start, size_t le
 		ret = wait_event_killable(nor->rww.wait,
 					  spi_nor_rww_start_pe(nor, start, len));
 
+	if (ret)
+		spi_nor_unprep(nor);
+
 	return ret;
 }
 
@@ -1490,6 +1496,9 @@ static int spi_nor_prep_and_lock_rd(struct spi_nor *nor, loff_t start, size_t le
 		ret = wait_event_killable(nor->rww.wait,
 					  spi_nor_rww_start_rd(nor, start, len));
 
+	if (ret)
+		spi_nor_unprep(nor);
+
 	return ret;
 }
 
Signature · 1 line
2.53.0
author maintainer
#79 lore raw

PATCH 76/1257 fs_pin: publish pins with RCU list helpers

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Karl Mehltretter <[email protected]>

[ Upstream commit 8d01d6b4c17c406f37a9b6edac93dfb858af30d0 ]

pin_insert() initializes a pin before adding it under pin_lock. The kill paths read the list heads under RCU without taking that lock. Plain hlist insertion does not publish the earlier initialization to those readers.

KCSAN weak-memory checking reported acct_on() callback initialization racing with pin_kill() after the superblock-list publication. The corresponding LKMM model permits the stale read with plain publication; the RCU release/acquire pair forbids it.

Use the RCU hlist add and dereference helpers for both pin lists.

---
 fs/fs_pin.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
fs/fs_pin.c +5 -4
index 47ef3c71ce907..1a508f2167e0a 100644
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/fs.h>
+#include <linux/rculist.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include "internal.h"
@@ -22,8 +23,8 @@ void pin_remove(struct fs_pin *pin)
 void pin_insert(struct fs_pin *pin, struct vfsmount *m)
 {
 	spin_lock(&pin_lock);
-	hlist_add_head(&pin->s_list, &m->mnt_sb->s_pins);
-	hlist_add_head(&pin->m_list, &real_mount(m)->mnt_pins);
+	hlist_add_head_rcu(&pin->s_list, &m->mnt_sb->s_pins);
+	hlist_add_head_rcu(&pin->m_list, &real_mount(m)->mnt_pins);
 	spin_unlock(&pin_lock);
 }
 
@@ -73,7 +74,7 @@ void mnt_pin_kill(struct mount *m)
 	while (1) {
 		struct hlist_node *p;
 		rcu_read_lock();
-		p = READ_ONCE(m->mnt_pins.first);
+		p = rcu_dereference(hlist_first_rcu(&m->mnt_pins));
 		if (!p) {
 			rcu_read_unlock();
 			break;
@@ -87,7 +88,7 @@ void group_pin_kill(struct hlist_head *p)
 	while (1) {
 		struct hlist_node *q;
 		rcu_read_lock();
-		q = READ_ONCE(p->first);
+		q = rcu_dereference(hlist_first_rcu(p));
 		if (!q) {
 			rcu_read_unlock();
 			break;
Signature · 1 line
2.53.0
author maintainer
#80 lore raw

PATCH 77/1257 fs: make sure to call fsnotify_inoderemove() only once when inode is dead

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Amir Goldstein <[email protected]>

[ Upstream commit 669bb5af15d41a21359d00a441490f87a88eb52a ]

Daehyeon reported a race wherein fsnotify_removeinode() can be called when inode still has a live alias. This can lead to several undesired outcomes such as crashes in fsnotify code or avoidance of inode mark notifications.

Check that inode is really "dead", meaning no nlink and no more aliases before calling fsnotify_inoderemove() for final cleanup of inode marks. Also do not allow open_by_handle() to add new aliases to a "dead" inode.

Ideally, we'd call fsnotify_inoderemove() once last inode reference is dropped to make things simpler. Alas fsnotify inode marks currently hold inode references and thus this doesn't work. Once we teach fsnotify to avoid holding inode references, these games with dead inodes can go as well.

---
 fs/dcache.c | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)
fs/dcache.c +24 -3
index f44c7b39c3b38..2eb23222be549 100644
@@ -450,6 +450,17 @@ static void dentry_free(struct dentry *dentry)
 		call_rcu(&dentry->d_rcu, __d_free);
 }
 
+/*
+ * If inode is unlinked and doesn't have any aliases (i.e., all fds pointing to
+ * it are closed), it is pretty much dead. Except that file handle lookup could
+ * still revive it which causes issues to fsnotify. So once inode reaches this
+ * state we make sure to block creating any new aliases.
+ */
+static bool inode_notify_dead(struct inode *inode)
+{
+	return !inode->i_nlink && hlist_empty(&inode->i_dentry);
+}
+
 /*
  * Release the dentry's inode, using the filesystem
  * d_iput() operation if defined.
@@ -459,6 +470,7 @@ static void dentry_unlink_inode(struct dentry * dentry)
 	__releases(dentry->d_inode->i_lock)
 {
 	struct inode *inode = dentry->d_inode;
+	bool notify_dead;
 
 	raw_write_seqcount_begin(&dentry->d_seq);
 	__d_clear_type_and_inode(dentry);
@@ -469,9 +481,10 @@ static void dentry_unlink_inode(struct dentry * dentry)
 	 */
 	dentry->waiters = NULL;
 	raw_write_seqcount_end(&dentry->d_seq);
+	notify_dead = inode_notify_dead(inode);
 	spin_unlock(&dentry->d_lock);
 	spin_unlock(&inode->i_lock);
-	if (!inode->i_nlink)
+	if (notify_dead)
 		fsnotify_inoderemove(inode);
 	if (dentry->d_op && dentry->d_op->d_iput)
 		dentry->d_op->d_iput(dentry, inode);
@@ -2243,7 +2256,12 @@ static struct dentry *__d_obtain_alias(struct inode *inode, bool disconnected)
 
 	sb = inode->i_sb;
 
-	res = d_find_any_alias(inode); /* existing alias? */
+	spin_lock(&inode->i_lock);
+	if (!inode_notify_dead(inode))
+		res = __d_find_any_alias(inode);	/* existing alias? */
+	else
+		res = ERR_PTR(-ESTALE);
+	spin_unlock(&inode->i_lock);
 	if (res)
 		goto out;
 
@@ -2255,7 +2273,10 @@ static struct dentry *__d_obtain_alias(struct inode *inode, bool disconnected)
 
 	security_d_instantiate(new, inode);
 	spin_lock(&inode->i_lock);
-	res = __d_find_any_alias(inode); /* recheck under lock */
+	if (!inode_notify_dead(inode))
+		res = __d_find_any_alias(inode);	/* recheck under lock */
+	else
+		res = ERR_PTR(-ESTALE);
 	if (likely(!res)) { /* still no alias, attach a disconnected dentry */
 		unsigned add_flags = d_flags_for_inode(inode);
 
Signature · 1 line
2.53.0
author maintainer
#81 lore raw

PATCH 78/1257 arm64: dts: ti: k3-am62-verdin: Set MMC clock pins as OUTPUT

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Francesco Dolcini <[email protected]>

[ Upstream commit 0ddd661c19ec1465e1f2c204fa9b2488acfabf4b ]

MMC clock pins must be configured as OUTPUT-only per TRM [0] with receiver disabled (RXACTIVE bit = 0). Change MMC CLK pins from PIN_INPUT to PIN_OUTPUT to match documentation.

Link https://www.ti.com/lit/pdf/spruiv7 Rev. C: Table 12-246. MMCSDi I/O Signals [0]
Fixes 316b80246b16 ("arm64: dts: ti: add verdin am62")
---
 arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi +3 -3
index e97b2b047d104..895b1b7dcac71 100644
@@ -573,7 +573,7 @@ AM62X_IOPAD(0x15c, PIN_INPUT, 0)  /* (AB22) MDIO0_MDIO */ /* ETH_1_MDIO, SODIMM
 	pinctrl_sdhci0: main-mmc0-default-pins {
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x220, PIN_INPUT,        0) /*  (Y3) MMC0_CMD  */
-			AM62X_IOPAD(0x218, PIN_INPUT,        0) /* (AB1) MMC0_CLK  */
+			AM62X_IOPAD(0x218, PIN_OUTPUT,       0) /* (AB1) MMC0_CLK  */
 			AM62X_IOPAD(0x214, PIN_INPUT,        0) /* (AA2) MMC0_DAT0 */
 			AM62X_IOPAD(0x210, PIN_INPUT_PULLUP, 0) /* (AA1) MMC0_DAT1 */
 			AM62X_IOPAD(0x20c, PIN_INPUT_PULLUP, 0) /* (AA3) MMC0_DAT2 */
@@ -589,7 +589,7 @@ AM62X_IOPAD(0x1f8, PIN_INPUT_PULLUP, 0) /* (AC2) MMC0_DAT7 */
 	pinctrl_sdhci1: main-mmc1-default-pins {
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x23c, PIN_INPUT,        0) /* (A21) MMC1_CMD  */ /* SODIMM 74 */
-			AM62X_IOPAD(0x234, PIN_INPUT,        0) /* (B22) MMC1_CLK  */ /* SODIMM 78 */
+			AM62X_IOPAD(0x234, PIN_OUTPUT,       0) /* (B22) MMC1_CLK  */ /* SODIMM 78 */
 			AM62X_IOPAD(0x230, PIN_INPUT,        0) /* (A22) MMC1_DAT0 */ /* SODIMM 80 */
 			AM62X_IOPAD(0x22c, PIN_INPUT,        0) /* (B21) MMC1_DAT1 */ /* SODIMM 82 */
 			AM62X_IOPAD(0x228, PIN_INPUT,        0) /* (C21) MMC1_DAT2 */ /* SODIMM 70 */
@@ -601,7 +601,7 @@ AM62X_IOPAD(0x224, PIN_INPUT,        0) /* (D22) MMC1_DAT3 */ /* SODIMM 72 */
 	pinctrl_sdhci2: main-mmc2-default-pins {
 		pinctrl-single,pins = <
 			AM62X_IOPAD(0x120, PIN_INPUT, 0) /* (C24) MMC2_CMD   */ /* WiFi_SDIO_CMD   */
-			AM62X_IOPAD(0x118, PIN_INPUT, 0) /* (D25) MMC2_CLK   */ /* WiFi_SDIO_CLK   */
+			AM62X_IOPAD(0x118, PIN_OUTPUT,0) /* (D25) MMC2_CLK   */ /* WiFi_SDIO_CLK   */
 			AM62X_IOPAD(0x114, PIN_INPUT, 0) /* (B24) MMC2_DAT0  */ /* WiFi_SDIO_DATA0 */
 			AM62X_IOPAD(0x110, PIN_INPUT, 0) /* (C25) MMC2_DAT1  */ /* WiFi_SDIO_DATA1 */
 			AM62X_IOPAD(0x10c, PIN_INPUT, 0) /* (E23) MMC2_DAT2  */ /* WiFi_SDIO_DATA2 */
Signature · 1 line
2.53.0
author maintainer
#82 lore raw

PATCH 79/1257 thermal: intel: powerclamp: Reject invalid window_size values

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thorsten Blum <[email protected]>

[ Upstream commit 40989202104e498ff9adfb8c575d6cd159f13988 ]

window_size_set() sets ret to -EINVAL if new_window_size is outside the valid range, but then falls through and still updates window_size to the clamped value.

Return -EINVAL immediately and do not update window_size. Also drop the now-redundant clamp() call.

Fixes d6d71ee4a14a ("PM: Introduce Intel PowerClamp Driver")
Cc All applicable <[email protected]>
---
 drivers/thermal/intel/intel_powerclamp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/thermal/intel/intel_powerclamp.c +2 -1
index bd7fd98dc310e..8026651133d5d 100644
@@ -289,9 +289,10 @@ static int window_size_set(const char *arg, const struct kernel_param *kp)
 		pr_err("Out of recommended window size %lu, between 2-10\n",
 			new_window_size);
 		ret = -EINVAL;
+		goto exit_win;
 	}
 
-	window_size = clamp(new_window_size, 2ul, 10ul);
+	window_size = new_window_size;
 	smp_mb();
 
 exit_win:
Signature · 1 line
2.53.0
author maintainer
#83 lore raw

PATCH 80/1257 thermal: intel: int340x: Fix temperature selection around 0 C

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Thorsten Blum <[email protected]>

[ Upstream commit e56e2b49c67d132728e52ce493079e83cc914657 ]

Since commit 7251b9e8a007 ("thermal/intel: Fix intel_tcc_get_temp() to support negative CPU temperature"), intel_tcc_get_temp() can report negative temperatures.

proc_thermal_get_zone_temp() still uses *temp as the current maximum and as an implicit "no reading yet" marker. However, this breaks when a CPU reports 0 C, because a subsequent negative reading can overwrite it.

Use bool temp_valid to track whether a valid temperature has been read. Initialize *temp with the first valid reading and only update it with warmer readings.

Fixes 7251b9e8a007 ("thermal/intel: Fix intel_tcc_get_temp() to support negative CPU temperature")
Cc 6.3+ <[email protected]> # 6.3+
---
 .../intel/int340x_thermal/processor_thermal_device.c   | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/thermal/intel/int340x_thermal/processor_thermal_device.c +7 -3
index f80dbe2ca7e47..b0284c2e2e74d 100644
@@ -179,17 +179,21 @@ static int proc_thermal_get_zone_temp(struct thermal_zone_device *zone,
 {
 	int cpu;
 	int curr_temp, ret;
-
-	*temp = 0;
+	bool temp_valid = false;
 
 	for_each_online_cpu(cpu) {
 		ret = intel_tcc_get_temp(cpu, &curr_temp, false);
 		if (ret < 0)
 			return ret;
-		if (!*temp || curr_temp > *temp)
+		if (!temp_valid || curr_temp > *temp) {
 			*temp = curr_temp;
+			temp_valid = true;
+		}
 	}
 
+	if (!temp_valid)
+		return -ENODATA;
+
 	*temp *= 1000;
 
 	return 0;
Signature · 1 line
2.53.0
author maintainer
#84 lore raw

PATCH 81/1257 mtd: rawnand: ndfc: use devm_platform_ioremap_resource()

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Rosen Penev <[email protected]>

[ Upstream commit 0d66f9895f286d2fab396a71e6efeb95c4a7e5a6 ]

Replace the open-coded of_iomap()/iounmap() with the managed devm_platform_ioremap_resource() helper. This fixes a mapping leak on driver remove (the old code never called iounmap()) and simplifies the error path by dropping the manual cleanup in ndfc_probe().

There is no overlapping memory-region concern introduced by this
change: each supported board DT describes a single ndfc node with a unique 0x2000 register region, and the EBC parent uses dcr-reg rather than a MEM reg resource, so the newly added request_mem_region() cannot conflict with an existing reservation. Distinct chip selects map to distinct 64-bit physical addresses, so CS instances do not overlap.

Fixes a808ad3b0d28 ("[MTD] [NAND] ndfc driver")
Assisted-by opencode:hy3-free
---
 drivers/mtd/nand/raw/ndfc.c | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)
drivers/mtd/nand/raw/ndfc.c +8 -13
index a48274297d3b1..d6db04d48c45a 100644
@@ -185,10 +185,15 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
 static int ndfc_probe(struct platform_device *ofdev)
 {
 	struct ndfc_controller *ndfc;
+	void __iomem *ndfcbase;
 	const __be32 *reg;
 	u32 ccr;
 	u32 cs;
-	int err, len = 0;
+	int len = 0;
+
+	ndfcbase = devm_platform_ioremap_resource(ofdev, 0);
+	if (IS_ERR(ndfcbase))
+		return PTR_ERR(ndfcbase);
 
 	/* Read the reg property to get the chip select */
 	reg = of_get_property(ofdev->dev.of_node, "reg", &len);
@@ -210,11 +215,7 @@ static int ndfc_probe(struct platform_device *ofdev)
 	ndfc->ofdev = ofdev;
 	dev_set_drvdata(&ofdev->dev, ndfc);
 
-	ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0);
-	if (!ndfc->ndfcbase) {
-		dev_err(&ofdev->dev, "failed to get memory\n");
-		return -EIO;
-	}
+	ndfc->ndfcbase = ndfcbase;
 
 	ccr = NDFC_CCR_BS(ndfc->chip_select);
 
@@ -232,13 +233,7 @@ static int ndfc_probe(struct platform_device *ofdev)
 		iowrite32be(be32_to_cpup(reg), ndfc->ndfcbase + offset);
 	}
 
-	err = ndfc_chip_init(ndfc, ofdev->dev.of_node);
-	if (err) {
-		iounmap(ndfc->ndfcbase);
-		return err;
-	}
-
-	return 0;
+	return ndfc_chip_init(ndfc, ofdev->dev.of_node);
 }
 
 static void ndfc_remove(struct platform_device *ofdev)
Signature · 1 line
2.53.0
author maintainer
#85 lore raw

PATCH 82/1257 riscv: dts: spacemit: k3: fix IMSIC num-guest-ids

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: GUO Ren (XuanTie) <[email protected]>

[ Upstream commit 69f95409f0053f787ad60175944080621a8b7d95 ]

The initial K3 device tree used generic/placeholder values for the IMSIC guest configuration:

  riscv,num-guest-ids    = <511>;

According to the SpacemiT K3 User Manual this values is incorrect for the X100 cores:

- Advanced Interrupt Architecture (AIA):
- M-mode MSI: 512
- S-mode MSI: 512
- VS-mode MSI: 64

Therefore, S-mode IMSIC (simsic) needs num-guest-ids = 63.

Fixes 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC")
Cc Guodong Xu <[email protected]>
Cc Yixun Lan <[email protected]>
---
 arch/riscv/boot/dts/spacemit/k3.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/boot/dts/spacemit/k3.dtsi +1 -1
index c3f2dce0969c0..f9c2ffedeae80 100644
@@ -1248,7 +1248,7 @@ simsic: interrupt-controller@e0400000 {
 			msi-controller;
 			riscv,guest-index-bits = <6>;
 			riscv,hart-index-bits = <4>;
-			riscv,num-guest-ids = <511>;
+			riscv,num-guest-ids = <63>;
 			riscv,num-ids = <511>;
 		};
 
Signature · 1 line
2.53.0
author maintainer
#86 lore raw

PATCH 83/1257 isofs: fix Rock Ridge CE extent validation on multisession media

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Baolin Liu <[email protected]>

[ Upstream commit 43de050fa4a31f7e7a73cf8974dcf6037e161a39 ]

Commit a36d990f5913 ("isofs: validate Rock Ridge CE continuation extent against volume size") compares the CE extent directly with s_nzones. The extent is an absolute block number, while s_nzones is the number of blocks relative to the selected ISO session. The comparison is therefore wrong when a multisession disc starts at a non-zero block.

isofs_get_last_session() selects the last session on multisession media, and its volume descriptors describe a volume beginning at that session's LBA.
For example, a session beginning at LBA 45447 with 64 blocks can contain a valid CE at absolute LBA 45467. The existing check rejects that CE, so the ER continuation record is not read, Rock Ridge is disabled, and the mount falls back to Joliet names.

Save the selected session start in filesystem-block units and validate the CE extent against the half-open interval [session_start, session_end). Scale the session length to the same block units and retain a separate block-device limit. The lower bound is intentional: accepting arbitrary blocks before the selected session could make a CE read data from a previous session or another filesystem on the device.

Only apply the bounds check when cont_extent is non-zero. A zero extent is the in-memory sentinel indicating that no CE continuation was found, rather than a request to read block zero.

For a single-session image, session_start is zero and the effective volume boundary remains unchanged.

Build-tested with:

make CONFIG_RUST= CONFIG_RUST_DRIVERS= fs/isofs/

Fixes a36d990f5913 ("isofs: validate Rock Ridge CE continuation extent against volume size")
---
 fs/isofs/inode.c |  2 ++
 fs/isofs/isofs.h |  2 ++
 fs/isofs/rock.c  | 11 +++++++++--
 3 files changed, 13 insertions(+), 2 deletions(-)
fs/isofs/inode.c +2 -0
index 337836a0a1704..b766b5c9c593b 100644
@@ -821,6 +821,8 @@ static int isofs_fill_super(struct super_block *s, struct fs_context *fc)
 	if (!sb_set_blocksize(s, orig_zonesize))
 		goto out_freesbi;
 
+	sbi->s_session_start = (sector_t)vol_desc_start <<
+				(ISOFS_BLOCK_BITS - s->s_blocksize_bits);
 	sbi->s_nls_iocharset = NULL;
 
 #ifdef CONFIG_JOLIET
fs/isofs/isofs.h +2 -0
index dacb9cdae4fd1..79ca0256843aa 100644
@@ -35,6 +35,8 @@ struct isofs_sb_info {
 	unsigned long s_firstdatazone;
 	unsigned long s_log_zone_size;
 	unsigned long s_max_size;
+	/* Session start in filesystem block units. */
+	sector_t s_session_start;
 	
 	int           s_rock_offset; /* offset of SUSP fields within SU area */
 	s32           s_sbsector;
fs/isofs/rock.c +9 -2
index 2628f31bd3a5d..84e0d764c2100 100644
@@ -9,6 +9,7 @@
 
 #include <linux/slab.h>
 #include <linux/pagemap.h>
+#include <linux/blkdev.h>
 
 #include "isofs.h"
 #include "rock.h"
@@ -84,6 +85,10 @@ static void init_rock_state(struct rock_state *rs, struct inode *inode)
  */
 static int rock_continue(struct rock_state *rs)
 {
+	struct super_block *sb = rs->inode->i_sb;
+	struct isofs_sb_info *sbi = ISOFS_SB(sb);
+	sector_t session_end = sbi->s_session_start +
+		((sector_t)sbi->s_nzones << (ISOFS_BLOCK_BITS - sb->s_blocksize_bits));
 	int ret = 1;
 	int blocksize = 1 << rs->inode->i_blkbits;
 	const int min_de_size = offsetof(struct rock_ridge, u);
@@ -101,11 +106,13 @@ static int rock_continue(struct rock_state *rs)
 		goto out;
 	}
 
-	if ((unsigned)rs->cont_extent >= ISOFS_SB(rs->inode->i_sb)->s_nzones) {
+	if (rs->cont_extent &&
+	    (rs->cont_extent < sbi->s_session_start ||
+	     rs->cont_extent >= session_end)) {
 		printk(KERN_NOTICE "rock: corrupted directory entry. "
 			"extent=%u out of volume (nzones=%lu)\n",
 			(unsigned)rs->cont_extent,
-			ISOFS_SB(rs->inode->i_sb)->s_nzones);
+			sbi->s_nzones);
 		ret = -EIO;
 		goto out;
 	}
Signature · 1 line
2.53.0
author maintainer
#87 lore raw

PATCH 84/1257 arm64: dts: mediatek: mt7986: correct timer frequency

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Andrea Pesaresi <[email protected]>

[ Upstream commit 1cf18e4b9815beaf0439c5b57b65b45151c82ad7 ]

The MT7986 architected timer runs at 12,986,200 Hz rather than 13 MHz. Firmware reports 13 MHz through CNTFRQ_EL0, causing the system clock to run slow by about 1062 ppm. This exceeds the kernel's 500 ppm NTP correction limit and leaves clock discipline saturated.

The corrected rate comes from MediaTek's downstream OpenWrt feed, where it is applied to both MT7986A and MT7986B. Since upstream mt7986b.dtsi includes mt7986a.dtsi, add it once to the common timer node so the architected timer driver uses the actual counter rate.

---
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +1 -0
index 9ebc196107e5a..318639a7c64e9 100644
@@ -657,6 +657,7 @@ cpu_trip_active_low: active-low {
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupt-parent = <&gic>;
+		clock-frequency = <12986200>;
 		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
 			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
 			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
Signature · 1 line
2.53.0
author maintainer
#88 lore raw

PATCH 85/1257 media: hws: report measured colorimetry

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ben Hoff <[email protected]>

[ Upstream commit 4d28f97400376d4064c69e2c194ce18eeb69f3e5 ]

At 1920x1080, the driver advertises V4L2_COLORSPACE_REC709 with V4L2_YCBCR_ENC_DEFAULT. The default maps to a Rec.709 matrix, but controlled A/B captures using the in-tree and baseline drivers show that both produce YUYV samples using a BT.601 matrix and full-range quantization. The captures differ by at most one code value, whereas a 601-to-709 conversion would move primary luma values by roughly 11 to 33 codes.

Set the Y'CbCr encoding explicitly to V4L2_YCBCR_ENC_601 at every resolution. Keep the resolution-based colorspace so HD retains presumed Rec.709 primaries and transfer characteristics while SD continues to use SMPTE 170M. Refresh the colorspace on detected geometry changes so an SD/HD transition does not leave stale metadata.

The decoder mode register is undocumented. Stop claiming that value 0x13 selects BT.709; both drivers use that value while producing the measured output.

Fixes ba07fd2f5742 ("media: pci: add AVMatrix HWS capture driver")
Assisted-by Codex:gpt-5.6
---
 drivers/media/pci/hws/hws.h            | 4 ++--
 drivers/media/pci/hws/hws_reg.h        | 3 ++-
 drivers/media/pci/hws/hws_v4l2_ioctl.c | 5 +++--
 drivers/media/pci/hws/hws_video.c      | 4 +++-
 4 files changed, 10 insertions(+), 6 deletions(-)
drivers/media/pci/hws/hws.h +2 -2
index 8fbe1fe27844d..d87d52674b692 100644
@@ -33,8 +33,8 @@ struct hws_pix_state {
 	u32 sizeimage;		/* full frame */
 	enum v4l2_field field;	/* V4L2_FIELD_NONE or INTERLACED */
 	enum v4l2_colorspace colorspace;	/* e.g., REC709 */
-	enum v4l2_ycbcr_encoding ycbcr_enc;	/* V4L2_YCBCR_ENC_DEFAULT */
-	enum v4l2_quantization quantization;	/* V4L2_QUANTIZATION_LIM_RANGE */
+	enum v4l2_ycbcr_encoding ycbcr_enc;	/* V4L2_YCBCR_ENC_601 */
+	enum v4l2_quantization quantization;	/* V4L2_QUANTIZATION_FULL_RANGE */
 	enum v4l2_xfer_func xfer_func;	/* V4L2_XFER_FUNC_DEFAULT */
 	bool interlaced;	/* cached hardware state */
 	u32 half_size;		/* hardware half-frame size */
drivers/media/pci/hws/hws_reg.h +2 -1
index e4fb4af444340..f6027a16a1938 100644
@@ -70,7 +70,8 @@
 #define HWS_CTL_IRQ_ENABLE_BIT BIT(0)   /* Global interrupt enable bit */
 /*  Write 0x00 to fully reset decoder,
  *  set bit 31=1 to "start run",
- *  low byte=0x13 selects YUYV/BT.709/etc,
+ *  low byte=0x13 is the vendor baseline capture-mode value; its individual
+ *  bit meanings are not documented,
  *  in ReadChipId() we also write 0x00 and 0x10 here for chip-ID sequencing.
  */
 
drivers/media/pci/hws/hws_v4l2_ioctl.c +3 -2
index 0303e311ee4a8..ce396b7225d22 100644
@@ -511,8 +511,9 @@ static inline void hws_set_colorimetry_state(struct hws_pix_state *p)
 {
 	bool sd = p->height <= 576;
 
+	/* Captured samples use full-range BT.601 Y'CbCr at every resolution. */
 	p->colorspace   = sd ? V4L2_COLORSPACE_SMPTE170M : V4L2_COLORSPACE_REC709;
-	p->ycbcr_enc    = V4L2_YCBCR_ENC_DEFAULT;
+	p->ycbcr_enc    = V4L2_YCBCR_ENC_601;
 	p->quantization = V4L2_QUANTIZATION_FULL_RANGE;
 	p->xfer_func    = V4L2_XFER_FUNC_DEFAULT;
 }
@@ -736,7 +737,7 @@ static inline void hws_set_colorimetry_fmt(struct v4l2_pix_format *p)
 	bool sd = p->height <= 576;
 
 	p->colorspace   = sd ? V4L2_COLORSPACE_SMPTE170M : V4L2_COLORSPACE_REC709;
-	p->ycbcr_enc    = V4L2_YCBCR_ENC_DEFAULT;
+	p->ycbcr_enc    = V4L2_YCBCR_ENC_601;
 	p->quantization = V4L2_QUANTIZATION_FULL_RANGE;
 	p->xfer_func    = V4L2_XFER_FUNC_DEFAULT;
 }
drivers/media/pci/hws/hws_video.c +3 -1
index 18e4bc6901d30..09cfb5a909f9c 100644
@@ -327,7 +327,7 @@ int hws_video_init_channel(struct hws_pcie_dev *pdev, int ch)
 	vid->pix.sizeimage = vid->pix.bytesperline * vid->pix.height;
 	vid->pix.field = V4L2_FIELD_NONE;
 	vid->pix.colorspace = V4L2_COLORSPACE_REC709;
-	vid->pix.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;
+	vid->pix.ycbcr_enc = V4L2_YCBCR_ENC_601;
 	vid->pix.quantization = V4L2_QUANTIZATION_FULL_RANGE;
 	vid->pix.xfer_func = V4L2_XFER_FUNC_DEFAULT;
 	vid->pix.interlaced = false;
@@ -895,6 +895,8 @@ static void hws_video_apply_mode_change(struct hws_pcie_dev *pdx,
 	v->pix.width = w;
 	v->pix.height = h;
 	v->pix.interlaced = interlaced;
+	v->pix.colorspace = h <= 576 ? V4L2_COLORSPACE_SMPTE170M :
+					 V4L2_COLORSPACE_REC709;
 	hws_set_current_dv_timings(v, w, h, interlaced);
 	v->current_fps = fps;
 
Signature · 1 line
2.53.0
author maintainer
#89 lore raw

PATCH 86/1257 media: hws: Wait for IRQ handler before returning buffers

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Hao-Qun Huang <[email protected]>

[ Upstream commit 1ba17b5a54187e8bb251ff9636ed65c84719b013 ]

hws_stop_streaming() disables capture and then collects the active and queued buffers straight away. Clearing cap_active and setting stop_requested only stops a VDONE handler that has not checked them yet; one already running on another CPU has passed those checks and cannot be recalled.

That handler snapshots v->active into a local pointer and drops irq_lock before it touches the buffer, so stop_streaming can run in between. Without a next_prepared buffer both paths complete the same buffer, and the second vb2_buffer_done() hits the WARN_ON for a buffer that is no longer active. With a next_prepared buffer the snapshot is the only remaining reference to the old active buffer, so stop_streaming returns without it and vb2 reports "stop_streaming operation is leaving buffer %u in active state" before completing it with an error.

Either way the driver breaks the vb2 rule that stop_streaming has to give back every buffer it owns before it returns.

Wait for the handler once the hardware is disabled and before the buffers are collected. The live mode change and the channel cleanup paths already do this around the same collect helper.

Fixes ba07fd2f5742 ("media: pci: add AVMatrix HWS capture driver")
Assisted-by Claude:claude-opus-5
---
 drivers/media/pci/hws/hws_video.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/pci/hws/hws_video.c +2 -0
index 09cfb5a909f9c..dbe0fc2a66b57 100644
@@ -1294,6 +1294,8 @@ static void hws_stop_streaming(struct vb2_queue *q)
 	WRITE_ONCE(v->stop_requested, true);
 
 	hws_enable_video_capture(v->parent, v->channel_index, false);
+	if (hws->irq >= 0)
+		synchronize_irq(hws->irq);
 
 	/* 2) Collect in-flight + queued under the IRQ lock */
 	spin_lock_irqsave(&v->irq_lock, flags);
Signature · 1 line
2.53.0
author maintainer
#90 lore raw

PATCH 87/1257 media: pci: hws: only init channels the device actually has

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Linkai Gong <[email protected]>

[ Upstream commit ad5390c35ccf98cec66ef1009351305f25b5a757 ]

hws_probe() initializes max_channels (always 4) control handlers, but register/unregister only walk cur_max_video_ch (1 or 2 on smaller chips). The extra handlers are never freed.

Initialize the same number of channels that cleanup uses.

Fixes ba07fd2f5742 ("media: pci: add AVMatrix HWS capture driver")
---
 drivers/media/pci/hws/hws_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/hws/hws_pci.c +1 -1
index 30bb7d34465b8..87ba27877f29a 100644
@@ -441,7 +441,7 @@ static int hws_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
 	hws_init_video_sys(hws, false);
 
 	/* 5) Init channels (video state, locks, vb2, ctrls) */
-	for (i = 0; i < hws->max_channels; i++) {
+	for (i = 0; i < hws->cur_max_video_ch; i++) {
 		ret = hws_video_init_channel(hws, i);
 		if (ret) {
 			dev_err(&pdev->dev, "video channel init failed (ch=%d)\n", i);
Signature · 1 line
2.53.0
author maintainer
#91 lore raw

PATCH 88/1257 media: cx231xx-audio: drain wq_trigger before audio fini

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Fan Wu <[email protected]>

[ Upstream commit a691c54986412e1fa87f036d2577d5a78a75e658 ]

audio_trigger() is deferred work (dev->wq_trigger) armed from snd_cx231xx_capture_trigger() on every PCM START/STOP; it dereferences dev->adev state and may free the URBs via cx231xx_isoc_audio_deinit(). cx231xx_audio_fini() tore down that state without draining wq_trigger, so work armed before or racing fini ran against freed state.

Use disable_work_sync() in fini to drain the work and prevent further queueing. Initialize the work, lock and stream_started counter at the top of cx231xx_audio_init(), before any fallible allocation, and clear the partially-built audio state on its error path, so fini is safe even if a later step fails.

This issue was found by an in-house static analysis tool.

Fixes 61b04cb24a12 ("[media] cx231xx-audio: fix some locking issues")
Cc [email protected] # v6.10+
Assisted-by Codex:gpt-5.6
---
 drivers/media/usb/cx231xx/cx231xx-audio.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/media/usb/cx231xx/cx231xx-audio.c +12 -3
index b24ceef497e4c..af04fb104cc4e 100644
@@ -581,12 +581,19 @@ static int cx231xx_audio_init(struct cx231xx *dev)
 	dev_dbg(dev->dev,
 		"probing for cx231xx non standard usbaudio\n");
 
+	/*
+	 * Extension init errors are ignored by the cx231xx core, so fini()
+	 * must be safe even if initialization fails part way through.
+	 */
+	spin_lock_init(&adev->slock);
+	INIT_WORK(&dev->wq_trigger, audio_trigger);
+	atomic_set(&dev->stream_started, 0);
+
 	err = snd_card_new(dev->dev, index[devnr], "Cx231xx Audio",
 			   THIS_MODULE, 0, &card);
 	if (err < 0)
 		return err;
 
-	spin_lock_init(&adev->slock);
 	err = snd_pcm_new(card, "Cx231xx Audio", 0, 0, 1, &pcm);
 	if (err < 0)
 		goto err_free_card;
@@ -601,8 +608,6 @@ static int cx231xx_audio_init(struct cx231xx *dev)
 	strscpy(card->shortname, "Cx231xx Audio", sizeof(card->shortname));
 	strscpy(card->longname, "Conexant cx231xx Audio", sizeof(card->longname));
 
-	INIT_WORK(&dev->wq_trigger, audio_trigger);
-
 	err = snd_card_register(card);
 	if (err < 0)
 		goto err_free_card;
@@ -656,8 +661,10 @@ static int cx231xx_audio_init(struct cx231xx *dev)
 
 err_free_pkt_size:
 	kfree(adev->alt_max_pkt_size);
+	adev->alt_max_pkt_size = NULL;
 err_free_card:
 	snd_card_free(card);
+	adev->sndcard = NULL;
 
 	return err;
 }
@@ -674,6 +681,8 @@ static int cx231xx_audio_fini(struct cx231xx *dev)
 		return 0;
 	}
 
+	disable_work_sync(&dev->wq_trigger);
+
 	if (dev->adev.sndcard) {
 		snd_card_free_when_closed(dev->adev.sndcard);
 		kfree(dev->adev.alt_max_pkt_size);
Signature · 1 line
2.53.0
author maintainer
#92 lore raw

PATCH 89/1257 media: cx231xx: Fix cleanup path on failure

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Andi Shyti <[email protected]>

[ Upstream commit 6e30287eaf3e41b86dfb86df3b811526693d74b4 ]

If cx231xx_init_v4l2() fails the probe currently jumps to err_init, which only unregisters the V4L2 device. The analog devices and I2C resources are left registered while the driver state can be released.

A subsequent driver bind attempts to create the same I2C mux channel links and triggers a warning when the existing "channel-0" link is encountered. The remaining devices may also access released driver state. This produces the following warning

    can't create symlink to channel 0
    WARNING: drivers/i2c/i2c-mux.c:403 at i2c_mux_add_adapter+0xcd8/0xeb0
    Call Trace:
     i2c_mux_add_adapter+0xcdc/0xeb0
     cx231xx_dev_init+0x2fb/0x1260
     cx231xx_usb_probe+0xc48/0x2140
     usb_probe_interface+0x657/0xc70
     ...

Jump to err_video_alt instead, which performs the full device cleanup before unregistering the V4L2 device.

---
 drivers/media/usb/cx231xx/cx231xx-cards.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/cx231xx/cx231xx-cards.c +1 -1
index 69b24205bc567..b0941cd2a2d85 100644
@@ -1826,7 +1826,7 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
 
 	retval = cx231xx_init_v4l2(dev, udev, interface, isoc_pipe);
 	if (retval)
-		goto err_init;
+		goto err_video_alt;
 
 	if (dev->current_pcb_config.ts1_source != 0xff) {
 		/* compute alternate max packet sizes for TS1 */
Signature · 1 line
2.53.0
author maintainer
#93 lore raw

PATCH 90/1257 firewire: core: fix source bus ID detection for AT context in big-endian systems

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Takashi Sakamoto <[email protected]>

[ Upstream commit 6393d75914a6ac95a05621db8d9d6a98eafe72f7 ]

The source bus ID bit in AT DMA context is not detected correctly on big-endian systems because the little-endian data is not converted to CPU endianness.

Fix the bug. The helper functions related to this are never used in driver code, so extend the test to check the field instead.

Fixes 8db9d1557122 ("firewire: ohci: add static inline functions to serialize/deserialize data of AT DMA")
---
 drivers/firewire/ohci-serdes-test.c | 4 ++--
 drivers/firewire/ohci.h             | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/firewire/ohci-serdes-test.c +2 -2
index 258f668619ef1..87b136e041de3 100644
@@ -43,7 +43,7 @@ static void test_self_id_receive_buffer_deserialization(struct kunit *test)
 static void test_at_data_serdes(struct kunit *test)
 {
 	static const __le32 expected[] = {
-		cpu_to_le32(0x00020e80),
+		cpu_to_le32(0x00820e80),
 		cpu_to_le32(0xffc2ffff),
 		cpu_to_le32(0xe0000000),
 	};
@@ -56,7 +56,7 @@ static void test_at_data_serdes(struct kunit *test)
 	unsigned int destination_id = ohci1394_at_data_get_destination_id(expected);
 	u64 destination_offset = ohci1394_at_data_get_destination_offset(expected);
 
-	KUNIT_EXPECT_FALSE(test, has_src_bus_id);
+	KUNIT_EXPECT_TRUE(test, has_src_bus_id);
 	KUNIT_EXPECT_EQ(test, 0x02, speed);
 	KUNIT_EXPECT_EQ(test, 0x03, tlabel);
 	KUNIT_EXPECT_EQ(test, 0x02, retry);
drivers/firewire/ohci.h +1 -1
index 218666cfe14a5..63ccf2f445045 100644
@@ -178,7 +178,7 @@
 
 static inline bool ohci1394_at_data_get_src_bus_id(const __le32 *data)
 {
-	return !!((data[0] & OHCI1394_AT_DATA_Q0_srcBusID_MASK) >> OHCI1394_AT_DATA_Q0_srcBusID_SHIFT);
+	return !!((le32_to_cpu(data[0]) & OHCI1394_AT_DATA_Q0_srcBusID_MASK) >> OHCI1394_AT_DATA_Q0_srcBusID_SHIFT);
 }
 
 static inline void ohci1394_at_data_set_src_bus_id(__le32 *data, bool src_bus_id)
Signature · 1 line
2.53.0
author maintainer
#94 lore raw

PATCH 91/1257 media: au0828: Free URBs when starting DVB streaming fails

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Ruoyu Wang <[email protected]>

[ Upstream commit b8dd133d96a40012f4b67fd48d8ddd7306a3e024 ]

start_urb_transfer() stores each allocated URB in dev->urbs[], but sets urb_streaming only after all URBs have been submitted. If a later URB or transfer buffer allocation fails, earlier entries are left allocated. A submission failure calls stop_urb_transfer(), but that function returns immediately while urb_streaming is false, leaving both submitted and unsubmitted URBs behind.

Make stop_urb_transfer() release every populated slot regardless of the streaming flag and clear each slot after release. Route all start errors through this cleanup. usb_kill_urb() safely handles both submitted and unsubmitted URBs, while the existing preallocation check preserves the lifetime of shared transfer buffers.

This issue was found by a static analysis checker and confirmed by manual source review.

Fixes 265a6510629a ("V4L/DVB (7621): Add support for Hauppauge HVR950Q/HVR850/FusioHDTV7-USB")
---
 drivers/media/usb/au0828/au0828-dvb.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
drivers/media/usb/au0828/au0828-dvb.c +11 -8
index d3fff47f0edf5..601a12e122f1c 100644
@@ -163,9 +163,6 @@ static int stop_urb_transfer(struct au0828_dev *dev)
 
 	dprintk(2, "%s()\n", __func__);
 
-	if (!dev->urb_streaming)
-		return 0;
-
 	if (dev->bulk_timeout_running == 1) {
 		dev->bulk_timeout_running = 0;
 		timer_delete(&dev->bulk_timeout);
@@ -179,6 +176,7 @@ static int stop_urb_transfer(struct au0828_dev *dev)
 				kfree(dev->urbs[i]->transfer_buffer);
 
 			usb_free_urb(dev->urbs[i]);
+			dev->urbs[i] = NULL;
 		}
 	}
 
@@ -200,8 +198,10 @@ static int start_urb_transfer(struct au0828_dev *dev)
 	for (i = 0; i < URB_COUNT; i++) {
 
 		dev->urbs[i] = usb_alloc_urb(0, GFP_KERNEL);
-		if (!dev->urbs[i])
-			return -ENOMEM;
+		if (!dev->urbs[i]) {
+			ret = -ENOMEM;
+			goto err;
+		}
 
 		purb = dev->urbs[i];
 
@@ -217,7 +217,7 @@ static int start_urb_transfer(struct au0828_dev *dev)
 			ret = -ENOMEM;
 			pr_err("%s: failed big buffer allocation, err = %d\n",
 			       __func__, ret);
-			return ret;
+			goto err;
 		}
 
 		purb->status = -EINPROGRESS;
@@ -235,10 +235,9 @@ static int start_urb_transfer(struct au0828_dev *dev)
 	for (i = 0; i < URB_COUNT; i++) {
 		ret = usb_submit_urb(dev->urbs[i], GFP_ATOMIC);
 		if (ret != 0) {
-			stop_urb_transfer(dev);
 			pr_err("%s: failed urb submission, err = %d\n",
 			       __func__, ret);
-			return ret;
+			goto err;
 		}
 	}
 
@@ -249,6 +248,10 @@ static int start_urb_transfer(struct au0828_dev *dev)
 	dev->bulk_timeout_running = 1;
 
 	return 0;
+
+err:
+	stop_urb_transfer(dev);
+	return ret;
 }
 
 static void au0828_start_transport(struct au0828_dev *dev)
Signature · 1 line
2.53.0
author maintainer
#95 lore raw

PATCH 92/1257 media: i2c: tc358743: add missing color-space strings

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Linkai Gong <[email protected]>

[ Upstream commit cb37e83f1bbdf0964ed0a9524ce45a0694f98205 ]

VI_STATUS3 S_V_COLOR is four bits, so the index after the shift is 0-15. input_color_space[] only has 14 entries. Add the two reserved values so log_status() cannot walk off the table.

Fixes d32d98642de6 ("[media] Driver for Toshiba TC358743 HDMI to CSI-2 bridge")
---
 drivers/media/i2c/tc358743.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/i2c/tc358743.c +2 -1
index fbd38bbfee038..ce75812cbf72b 100644
@@ -1373,7 +1373,8 @@ static int tc358743_log_status(struct v4l2_subdev *sd)
 	static const char * const input_color_space[] = {
 		"RGB", "YCbCr 601", "opRGB", "YCbCr 709", "NA (4)",
 		"xvYCC 601", "NA(6)", "xvYCC 709", "NA(8)", "sYCC601",
-		"NA(10)", "NA(11)", "NA(12)", "opYCC 601"};
+		"NA(10)", "NA(11)", "NA(12)", "opYCC 601", "NA(14)",
+		"NA(15)"};
 
 	v4l2_info(sd, "-----Chip status-----\n");
 	v4l2_info(sd, "Chip ID: 0x%02x\n",
Signature · 1 line
2.53.0
author maintainer
#96 lore raw

PATCH 93/1257 media: go7007: bound EZ-USB I2C transfers to the usb_buf size

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Shengzhuo Wei <[email protected]>

[ Upstream commit 816c4628b23e8c3d925978433f4dd1a13620c01b ]

go7007_usb_i2c_master_xfer() copies msgs[i].len bytes into go->usb_buf, a 16-byte buffer embedded in struct go7007, without any length check. The adapter declares no transfer limits, so an SMBus block transfer issued through /dev/i2c-N can write up to 34 bytes into it and corrupt the struct fields that follow the buffer.

Bound the transfer size with i2c_adapter_quirks so the I2C core rejects oversized messages before they reach the driver.

Fixes 7955f03d18d1 ("[media] go7007: move out of staging into drivers/media/usb.")
Assisted-by GLM:5.3
---
 drivers/media/usb/go7007/go7007-usb.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/media/usb/go7007/go7007-usb.c +6 -0
index c0cb92fa6ab94..867548d655b3f 100644
@@ -1029,10 +1029,16 @@ static const struct i2c_algorithm go7007_usb_algo = {
 	.functionality	= go7007_usb_functionality,
 };
 
+static const struct i2c_adapter_quirks go7007_usb_quirks = {
+	.max_write_len	= 12,
+	.max_read_len	= 15,
+};
+
 static struct i2c_adapter go7007_usb_adap_templ = {
 	.owner			= THIS_MODULE,
 	.name			= "WIS GO7007SB EZ-USB",
 	.algo			= &go7007_usb_algo,
+	.quirks			= &go7007_usb_quirks,
 };
 
 /********************* USB add/remove functions *********************/
Signature · 1 line
2.53.0
author maintainer
#97 lore raw

PATCH 94/1257 media: saa7146: Initialize interrupt lock before requesting IRQ

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Runyu Xiao <[email protected]>

[ Upstream commit e07c75a6bc4adf1ed09ede31756261e2c6bdede5 ]

The saa7146 interrupt handler can call SAA7146_IER_DISABLE(), which serializes register access with dev->int_slock. request_irq() allows the shared handler to run before saa7146_init_one() reaches the current lock initialization block.

Initialize dev->int_slock before requesting the interrupt so every handler path sees an initialized lock.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")
Assisted-by Codex:GPT-5
---
 drivers/media/common/saa7146/saa7146_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/media/common/saa7146/saa7146_core.c +2 -1
index c297d019f2b3f..70d6ca00513f8 100644
@@ -340,6 +340,8 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
 		goto out;
 	}
 
+	spin_lock_init(&dev->int_slock);
+
 	/* create a nice device name */
 	sprintf(dev->name, "saa7146 (%d)", saa7146_num);
 
@@ -425,7 +427,6 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
 	dev->ext = ext;
 
 	mutex_init(&dev->v4l2_lock);
-	spin_lock_init(&dev->int_slock);
 	spin_lock_init(&dev->slock);
 
 	mutex_init(&dev->i2c_lock);
Signature · 1 line
2.53.0
author maintainer
#98 lore raw

PATCH 95/1257 media: vim2m: keep transaction buffer count stable while streaming

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Younho Choi <[email protected]>

[ Upstream commit 50f5fed44d8e24081e8feed5154746fe193f11b8 ]

V4L2_CID_TRANS_NUM_BUFS controls how many buffer pairs a vim2m mem2mem job processes before the job is completed. The driver stores the value in ctx->translen and device_work() uses it later to decide whether the current transaction should continue.

Letting userspace change this control while streaming is active can make a queued job observe a different transaction length than the one it started with. That leaves the transaction state inconsistent with the buffers currently queued for the job.

Grab the transaction buffer count control while either queue is streaming, and release it only after both queues have stopped streaming. The V4L2 control framework then rejects changes with -EBUSY while the value is in use, while still allowing userspace to configure the value before streaming starts.

Keep the control handler alive until after v4l2_m2m_ctx_release(), since releasing the mem2mem context can call stop_streaming(), which now ungrabs the control.

Fixes 96d8eab5d0a1 ("V4L/DVB: [v5,2/2] v4l: Add a mem-to-mem videobuf framework test device")
---
 drivers/media/test-drivers/vim2m.c | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)
drivers/media/test-drivers/vim2m.c +26 -3
index bb2dd11eef0e4..f4a2c40838292 100644
@@ -205,6 +205,7 @@ struct vim2m_ctx {
 	struct vim2m_dev	*dev;
 
 	struct v4l2_ctrl_handler hdl;
+	struct v4l2_ctrl	*trans_num_bufs_ctrl;
 
 	/* Processed buffers in this transaction */
 	u8			num_processed;
@@ -1258,9 +1259,27 @@ static int vim2m_start_streaming(struct vb2_queue *q, unsigned int count)
 		ctx->aborting = 0;
 
 	q_data->sequence = 0;
+	v4l2_ctrl_grab(ctx->trans_num_bufs_ctrl, true);
+
 	return 0;
 }
 
+static bool vim2m_other_queue_is_streaming(struct vim2m_ctx *ctx,
+					   struct vb2_queue *q)
+{
+	struct vb2_queue *other_vq;
+
+	if (!ctx->fh.m2m_ctx)
+		return false;
+
+	if (V4L2_TYPE_IS_OUTPUT(q->type))
+		other_vq = v4l2_m2m_get_dst_vq(ctx->fh.m2m_ctx);
+	else
+		other_vq = v4l2_m2m_get_src_vq(ctx->fh.m2m_ctx);
+
+	return vb2_is_streaming(other_vq);
+}
+
 static void vim2m_stop_streaming(struct vb2_queue *q)
 {
 	struct vim2m_ctx *ctx = vb2_get_drv_priv(q);
@@ -1274,11 +1293,14 @@ static void vim2m_stop_streaming(struct vb2_queue *q)
 		else
 			vbuf = v4l2_m2m_dst_buf_remove(ctx->fh.m2m_ctx);
 		if (!vbuf)
-			return;
+			break;
 		v4l2_ctrl_request_complete(vbuf->vb2_buf.req_obj.req,
 					   &ctx->hdl);
 		v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);
 	}
+
+	if (!vim2m_other_queue_is_streaming(ctx, q))
+		v4l2_ctrl_grab(ctx->trans_num_bufs_ctrl, false);
 }
 
 static void vim2m_buf_request_complete(struct vb2_buffer *vb)
@@ -1380,7 +1402,8 @@ static int vim2m_open(struct file *file)
 
 	vim2m_ctrl_trans_time_msec.def = default_transtime;
 	v4l2_ctrl_new_custom(hdl, &vim2m_ctrl_trans_time_msec, NULL);
-	v4l2_ctrl_new_custom(hdl, &vim2m_ctrl_trans_num_bufs, NULL);
+	ctx->trans_num_bufs_ctrl =
+		v4l2_ctrl_new_custom(hdl, &vim2m_ctrl_trans_num_bufs, NULL);
 	if (hdl->error) {
 		rc = hdl->error;
 		v4l2_ctrl_handler_free(hdl);
@@ -1435,10 +1458,10 @@ static int vim2m_release(struct file *file)
 
 	v4l2_fh_del(&ctx->fh, file);
 	v4l2_fh_exit(&ctx->fh);
-	v4l2_ctrl_handler_free(&ctx->hdl);
 	mutex_lock(&dev->dev_mutex);
 	v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
 	mutex_unlock(&dev->dev_mutex);
+	v4l2_ctrl_handler_free(&ctx->hdl);
 	kfree(ctx);
 
 	atomic_dec(&dev->num_inst);
Signature · 1 line
2.53.0
author maintainer
#99 lore raw

PATCH 96/1257 media: vimc: sensor: fix pixel_rate type to resolve do_div() warning

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Faizel K B <[email protected]>

[ Upstream commit bbc952491f5f05f2274c811d34174d5b88632103 ]

vsensor->pixel_rate->val is a plain s32 field. Declaring the local "pixel_rate" variable as u64 misrepresented its actual range and made do_div()'s divisor look wider than the 32-bit division it actually performs, which is exactly what the do_div() coccinelle check warns. Revert pixel_rate back to its original s32 type to match vsensor->pixel_rate->val, resolving the warning correctly.

---
 drivers/media/test-drivers/vimc/vimc-sensor.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/media/test-drivers/vimc/vimc-sensor.c +2 -6
index 83dcc9d61ee05..7cb544fdfddbb 100644
@@ -97,18 +97,14 @@ static void vimc_sensor_update_frame_timing(struct v4l2_subdev *sd,
 {
 	struct vimc_sensor_device *vsensor =
 		container_of(sd, struct vimc_sensor_device, sd);
-	u64 pixel_rate = vsensor->pixel_rate->val;
+	u32 pixel_rate = vsensor->pixel_rate->val;
 	u32 hts = width + vsensor->hblank->val;
 	u32 vts = height + vsensor->vblank->val;
 	u64 total_pixels = (u64)hts * vts;
 	u64 frame_interval_ns;
 
-	/* Sanity check, pixel rate is fixed and fits in 32 bits. */
-	if (WARN_ON(pixel_rate >= 0x100000000))
-		return;
-
 	frame_interval_ns = total_pixels * NSEC_PER_SEC;
-	do_div(frame_interval_ns, (u32)pixel_rate);
+	do_div(frame_interval_ns, pixel_rate);
 	vsensor->hw.fps_jiffies = nsecs_to_jiffies(frame_interval_ns);
 	if (vsensor->hw.fps_jiffies == 0)
 		vsensor->hw.fps_jiffies = 1;
Signature · 1 line
2.53.0
author maintainer
#100 lore raw

PATCH 97/1257 media: vicodec: fix out-of-bounds write on under-rounded coded dimensions

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Junrui Luo <[email protected]>

[ Upstream commit 0183746ebca4c478027e2261b904f844f1443b19 ]

A capture format whose width or height is one more than a multiple of 16 makes the FWHT codec write one 8x8 block row, or column, past the end of the capture plane, and read the same block out of the reference frame for P-coded frames.

vic_round_dim() is documented to round a frame dimension up so that both the luma and the chroma plane end up a multiple of 8, but it only rounds the chroma plane:

	round_up((dim) / (div), 8) * (div)

For div == 2 the result is a multiple of 16 in every case but one: when dim % 16 == 1, dim / div is already a multiple of 8 and the macro returns dim - 1. encode_plane() and decode_plane() round the same dimension with round_up(dim, 8), which yields dim + 7 -- one block more than the coded dimension that sized the buffer.

On a KASAN-enabled kernel, a 641x360 YUYV P-frame triggers:

  BUG: KASAN: slab-out-of-bounds in add_deltas+0x450/0xcc0
  Read of size 1 at addr ffff888009070800 by task trigger_bin/70

  Call Trace:
   add_deltas+0x450/0xcc0
   decode_plane+0x1916/0x3390
   fwht_decode_frame+0x173/0x620
   v4l2_fwht_decode+0x751/0x1120
   device_run+0x6bb/0x1850

Round the dimension itself up to a multiple of 8 * div. The rounding changes only for div == 2 and dim % 16 == 1, and MAX_WIDTH and MAX_HEIGHT are both multiples of 16, so the rounded value still fits the advertised limits.

Fixes 3b15f68e19c2 ("media: vicodec: Add support for resolution change event.")
Assisted-by Claude:claude-opus-5
---
 drivers/media/test-drivers/vicodec/codec-fwht.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/test-drivers/vicodec/codec-fwht.h +1 -1
index 0eab24020e9e6..4b4d390310899 100644
@@ -61,7 +61,7 @@
  * both luma and chroma components resolutions are rounded up to
  * a multiple of 8
  */
-#define vic_round_dim(dim, div) (round_up((dim) / (div), 8) * (div))
+#define vic_round_dim(dim, div) round_up(dim, 8 * (div))
 
 struct fwht_cframe_hdr {
 	u32 magic1;
Signature · 1 line
2.53.0
author maintainer
#101 lore raw

PATCH 98/1257 media: vicodec: make encoder CAPTURE dimensions read-only

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Junrui Luo <[email protected]>

[ Upstream commit 2532e9d2f8ccb330a9c924b1ee34c5629240d352 ]

Setting the encoder's compressed CAPTURE format to a smaller resolution than the raw OUTPUT format makes the encoder write past the end of the CAPTURE buffer.

For a stateful encoder the CAPTURE width and height are not client-settable; Documentation/userspace-api/media/v4l/dev-encoder.rst specifies them as "ignored (read-only)" on VIDIOC_S_FMT. vicodec only implements half of that: vidioc_s_fmt_vid_out() derives the CAPTURE coded size and sizeimage from the OUTPUT format, but S_FMT on the CAPTURE queue overwrites them. The encoder then takes its geometry from the OUTPUT queue alone, and v4l2_fwht_encode() gets no destination length.

Overwrite the requested width and height with the OUTPUT queue's coded dimensions in vidioc_try_fmt_vid_cap(), making them read-only as the interface requires.

Fixes efec9c815e5d ("media: vicodec: pass on enc output format to capture side")
Assisted-by Claude:claude-opus-5
---
 drivers/media/test-drivers/vicodec/vicodec-core.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/media/test-drivers/vicodec/vicodec-core.c +10 -0
index ff9d50fb05fd1..25ec3a43fc712 100644
@@ -890,6 +890,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
 				  struct v4l2_format *f)
 {
 	struct vicodec_ctx *ctx = file2ctx(file);
+	struct vicodec_q_data *q_data_out =
+		get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT);
 	struct v4l2_pix_format_mplane *pix_mp;
 	struct v4l2_pix_format *pix;
 
@@ -900,6 +902,10 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
 		pix = &f->fmt.pix;
 		pix->pixelformat = ctx->is_enc ? V4L2_PIX_FMT_FWHT :
 				   find_fmt(f->fmt.pix.pixelformat)->id;
+		if (ctx->is_enc) {
+			pix->width = q_data_out->coded_width;
+			pix->height = q_data_out->coded_height;
+		}
 		pix->colorspace = ctx->state.colorspace;
 		pix->xfer_func = ctx->state.xfer_func;
 		pix->ycbcr_enc = ctx->state.ycbcr_enc;
@@ -911,6 +917,10 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
 		pix_mp = &f->fmt.pix_mp;
 		pix_mp->pixelformat = ctx->is_enc ? V4L2_PIX_FMT_FWHT :
 				      find_fmt(pix_mp->pixelformat)->id;
+		if (ctx->is_enc) {
+			pix_mp->width = q_data_out->coded_width;
+			pix_mp->height = q_data_out->coded_height;
+		}
 		pix_mp->colorspace = ctx->state.colorspace;
 		pix_mp->xfer_func = ctx->state.xfer_func;
 		pix_mp->ycbcr_enc = ctx->state.ycbcr_enc;
Signature · 1 line
2.53.0
author maintainer
#102 lore raw

PATCH 99/1257 media: vidtv: fix frontend reference leak on unbind

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Piyush Patle <[email protected]>

[ Upstream commit 6f412f9fe6a1f3ce9694757f50353bbec221d832 ]

dvb_register_frontend() keeps two references to the frontend. One is released by dvb_unregister_frontend(), and the other by dvb_frontend_detach(). vidtv only called dvb_unregister_frontend(), so the second reference was never released. As a result, __dvb_frontend_free() was never called, leaking the frontend private data and its struct dvb_device.

The detach call was removed by commit 63101b756893 ("media: vidtv: fix driver unbind/remove") because it caused an OOPS. The demod .release callback freed vidtv_demod_state, and the I2C remove callbacks then accessed the freed state.

That commit also removed those accesses from the I2C remove callbacks. Restore the detach call, but remove the demod .release callback. vidtv_demod_state is owned by the I2C client and is already freed by vidtv_demod_i2c_remove(), so the frontend detach path should not free it.

Tested with kmemleak and KASAN over 10 bind/unbind cycles. The reported frontend and dvb_device leaks were present before the fix and were gone after it, with no KASAN reports.

---
 drivers/media/test-drivers/vidtv/vidtv_bridge.c | 2 ++
 drivers/media/test-drivers/vidtv/vidtv_demod.c  | 9 ---------
 2 files changed, 2 insertions(+), 9 deletions(-)
drivers/media/test-drivers/vidtv/vidtv_bridge.c +2 -0
index fd69b4ee16f4b..9887860b01980 100644
@@ -474,6 +474,7 @@ static int vidtv_bridge_dvb_init(struct vidtv_dvb *dvb)
 fail_demod_probe:
 	for (i = i - 1; i >= 0; --i) {
 		dvb_unregister_frontend(dvb->fe[i]);
+		dvb_frontend_detach(dvb->fe[i]);
 fail_fe:
 		dvb_module_release(dvb->i2c_client_tuner[i]);
 fail_tuner_probe:
@@ -552,6 +553,7 @@ static void vidtv_bridge_remove(struct platform_device *pdev)
 
 	for (i = 0; i < NUM_FE; ++i) {
 		dvb_unregister_frontend(dvb->fe[i]);
+		dvb_frontend_detach(dvb->fe[i]);
 		dvb_module_release(dvb->i2c_client_tuner[i]);
 		dvb_module_release(dvb->i2c_client_demod[i]);
 	}
drivers/media/test-drivers/vidtv/vidtv_demod.c +0 -9
index 6e5fe402976bb..3aa5860046386 100644
@@ -343,13 +343,6 @@ static int vidtv_diseqc_send_burst(struct dvb_frontend *fe,
 	return 0;
 }
 
-static void vidtv_demod_release(struct dvb_frontend *fe)
-{
-	struct vidtv_demod_state *state = fe->demodulator_priv;
-
-	kfree(state);
-}
-
 static const struct dvb_frontend_ops vidtv_demod_ops = {
 	.delsys = {
 		SYS_DVBT,
@@ -390,8 +383,6 @@ static const struct dvb_frontend_ops vidtv_demod_ops = {
 			FE_CAN_HIERARCHY_AUTO,
 	},
 
-	.release = vidtv_demod_release,
-
 	.set_frontend = vidtv_demod_set_frontend,
 	.get_frontend = vidtv_demod_get_frontend,
 
Signature · 1 line
2.53.0
author maintainer
#103 lore raw

PATCH 100/1257 media: vidtv: fix uaf in vidtv_bridge_on_new_pkts_avail

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Jeffin Philip <[email protected]>

[ Upstream commit 2af02ccd048b77713695d7817cf645ca50bf349e ]

Attempting to unbind a dvbdevice that is in the process of feeding data causes a UAF as we free the underlying device without stopping the feed first. Fix this by stopping the stream first using vidtv_stop_streaming(). However, our codepath in the reproducer (mentioned in the below reply) does not decrement our users (dmxdev->dvr_dvbdev->users) to 1 after it has been incremented to 2 by our read() in the reproducer, that is only possible on .release. This can cause a task hang as dvb_dmxdev_release() uses wait_event() in the wait_queue unless we use a close(fd)(in the reproducer). Is this a problem? Please advise.

---
 drivers/media/test-drivers/vidtv/vidtv_bridge.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/test-drivers/vidtv/vidtv_bridge.c +2 -0
index 9887860b01980..f951b877ada6a 100644
@@ -551,6 +551,8 @@ static void vidtv_bridge_remove(struct platform_device *pdev)
 
 	mutex_destroy(&dvb->feed_lock);
 
+	vidtv_stop_streaming(dvb);
+
 	for (i = 0; i < NUM_FE; ++i) {
 		dvb_unregister_frontend(dvb->fe[i]);
 		dvb_frontend_detach(dvb->fe[i]);
Signature · 1 line
2.53.0
author maintainer
#104 lore raw

PATCH 101/1257 media: marvell-cam: fix unmet dependency for VIDEO_MMP_CAMERA

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Julian Braha <[email protected]>

[ Upstream commit 1179929b3abd4adb6ca7fae91d649c64a7293aca ]

VIDEO_MMP_CAMERA selects I2C_GPIO without ensuring
'GPIOLIB || COMPILE_TEST' is enabled, despite I2C_GPIO depending on it.

Let's add the same dependency to VIDEO_MMP_CAMERA.

This unmet dependency bug was found by kconfirm, a static analysis tool for Kconfig.

Fixes 67a8dbbc4e04 ("[media] marvell-cam: Basic working MMP camera driver")
---
 drivers/media/platform/marvell/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/media/platform/marvell/Kconfig +1 -0
index d31f4730f2a38..ab58175e433c3 100644
@@ -22,6 +22,7 @@ config VIDEO_MMP_CAMERA
 	depends on V4L_PLATFORM_DRIVERS
 	depends on I2C && VIDEO_DEV
 	depends on ARCH_MMP || COMPILE_TEST
+	depends on GPIOLIB || COMPILE_TEST
 	depends on COMMON_CLK
 	select VIDEO_OV7670 if MEDIA_SUBDRV_AUTOSELECT && VIDEO_CAMERA_SENSOR
 	select I2C_GPIO
Signature · 1 line
2.53.0
author maintainer
#105 lore raw

PATCH 102/1257 staging: media: av7110: fix corrupted BER reporting in sp8870

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Punnay Sharma <[email protected]>

[ Upstream commit 5764f9bd7b7a72c6df49db6c8c00d4f9994a55ba ]

In sp8870_read_ber(), the 14-bit Bit Error Rate (BER) is assembled by reading two I2C registers: 0xC08 (lower 6 bits) and 0xC07 (upper 8 bits).

The current implementation masks the lower bits via tmp = ret & 0x3F; but subsequently overwrites tmp entirely when processing the upper bits using a direct assignment (tmp = ret << 6;). This logical error causes the lower 6 bits of the BER hardware metric to be silently discarded.

Fix this by using a bitwise OR (tmp |= ret << 6;) to correctly merge the MSB and LSB payloads before returning the metric to the DVB core.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")
---
 drivers/staging/media/av7110/sp8870.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/av7110/sp8870.c +1 -1
index 29fb4934c039c..77bebf2c7d5d8 100644
@@ -401,7 +401,7 @@ static int sp8870_read_ber(struct dvb_frontend *fe, u32 *ber)
 	if (ret < 0)
 		return -EIO;
 
-	tmp = ret << 6;
+	tmp |= ret << 6;
 	if (tmp >= 0x3FFF0)
 		tmp = ~0;
 
Signature · 1 line
2.53.0
author maintainer
#106 lore raw

PATCH 103/1257 staging: media: av7110: fix sp8870 initialization failure state

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Punnay Sharma <[email protected]>

[ Upstream commit 30684fa98394bc0eb4362282908612aab7d4dad9 ]

The SP8870 DVB frontend driver prematurely flags the device as initialized at the very beginning of the sp8870_init() routine, prior to requesting the firmware (dvb-fe-sp8870.fw) and executing the I2C upload sequence.

If request_firmware() times out or sp8870_firmware_upload() encounters an I2C bus error, the function aborts and returns -EIO. However, because state->initialised is already set to 1, all subsequent invocations of fe->ops.init() by the DVB core will immediately return 0 (success) without attempting to load the firmware again. This leaves the demodulator microcontroller halted and the frontend permanently dead until the module is forcibly reloaded.

Relocate the state->initialised = 1 assignment to the end of sp8870_init(), ensuring the flag is only set after the firmware is successfully uploaded and the system controller is actually restarted.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")
---
 drivers/staging/media/av7110/sp8870.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/media/av7110/sp8870.c +2 -1
index 77bebf2c7d5d8..be62933cef450 100644
@@ -315,7 +315,6 @@ static int sp8870_init(struct dvb_frontend *fe)
 	sp8870_wake_up(state);
 	if (state->initialised)
 		return 0;
-	state->initialised = 1;
 
 	dprintk("initialising frontend...\n");
 
@@ -353,6 +352,8 @@ static int sp8870_init(struct dvb_frontend *fe)
 	sp8870_writereg(state, 0x0D00, 0x010);
 	sp8870_writereg(state, 0x0D01, 0x000);
 
+	state->initialised = 1;
+
 	return 0;
 }
 
Signature · 1 line
2.53.0
author maintainer
#107 lore raw

PATCH 104/1257 media: m2m-deinterlace: fix default capture field

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Xu Rao <[email protected]>

[ Upstream commit 4ee3ebede5d01efdcdd88c94f9df271d2eb237de ]

queue_init() initializes default formats for both the source and capture queues. It first sets the source field to V4L2_FIELD_SEQ_TB, but then stores the capture default, V4L2_FIELD_INTERLACED_TB, in the source queue again while initializing the capture queue.

This overwrites the valid source default and leaves the capture field at its zero-initialized value, V4L2_FIELD_ANY. vidioc_streamon() accepts only V4L2_FIELD_SEQ_TB or V4L2_FIELD_SEQ_BT on the source queue, and requires the capture queue to use a compatible interlaced or NONE field. Userspace that relies on the default formats can therefore get -EINVAL when starting streaming.

Initialize the capture field instead. The bug is usually hidden because mem2mem applications commonly call S_FMT on both queues before streaming; the TRY_FMT paths normalize the fields and S_FMT overwrites q_data[].field.

Fixes 8f0755c06b90 ("[media] media: Add mem2mem deinterlacing driver")
---
 drivers/media/platform/m2m-deinterlace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/m2m-deinterlace.c +1 -1
index 1d0e70eaea3d0..9dcc4bd6cbdd5 100644
@@ -822,7 +822,7 @@ static int queue_init(void *priv, struct vb2_queue *src_vq,
 	q_data[V4L2_M2M_DST].width = 640;
 	q_data[V4L2_M2M_DST].height = 480;
 	q_data[V4L2_M2M_DST].sizeimage = (640 * 480 * 3) / 2;
-	q_data[V4L2_M2M_SRC].field = V4L2_FIELD_INTERLACED_TB;
+	q_data[V4L2_M2M_DST].field = V4L2_FIELD_INTERLACED_TB;
 
 	return vb2_queue_init(dst_vq);
 }
Signature · 1 line
2.53.0
author maintainer
#108 lore raw

PATCH 105/1257 wifi: mac80211: queue frames while off-channel

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Stanislaw Gruszka <[email protected]>

[ Upstream commit 13e51269b6656768dc595ed6025e4974f2026543 ]

Drivers without FAST_XMIT and hardware scan support currently drop TX frames during software scanning while being off-channel. This happens in ieee80211_tx_h_check_assoc() before frames reach internal TX queue.

Move the off-channel check to invoke_tx_handlers_late(), after ieee80211_queue_skb(). Frames can then remain queued and be transmitted when the interface returns on-channel. This how TX works currently when code goes via ieee80211_xmit_fast() path.

Below is rt2x00 driver ping output example while scanning, before and after the fix. After the fix, packets are no longer lost. Some have increased latency, what is expected behavior.

BEFORE:
64 bytes from 192.168.0.1: icmp_seq=29 ttl=64 time=3.61 ms 64 bytes from 192.168.0.1: icmp_seq=31 ttl=64 time=3.33 ms # Missed 30 64 bytes from 192.168.0.1: icmp_seq=32 ttl=64 time=4.03 ms 64 bytes from 192.168.0.1: icmp_seq=34 ttl=64 time=3.10 ms # Missed 33 64 bytes from 192.168.0.1: icmp_seq=36 ttl=64 time=3.04 ms # Missed 35 64 bytes from 192.168.0.1: icmp_seq=38 ttl=64 time=3.05 ms # Missed 37 64 bytes from 192.168.0.1: icmp_seq=40 ttl=64 time=4.14 ms # Missed 39 64 bytes from 192.168.0.1: icmp_seq=41 ttl=64 time=4.50 ms

AFTER:
64 bytes from 192.168.0.1: icmp_seq=29 ttl=64 time=3.40 ms 64 bytes from 192.168.0.1: icmp_seq=30 ttl=64 time=6.10 ms 64 bytes from 192.168.0.1: icmp_seq=31 ttl=64 time=4.69 ms 64 bytes from 192.168.0.1: icmp_seq=32 ttl=64 time=4.49 ms 64 bytes from 192.168.0.1: icmp_seq=33 ttl=64 time=148 ms 64 bytes from 192.168.0.1: icmp_seq=34 ttl=64 time=6.83 ms 64 bytes from 192.168.0.1: icmp_seq=35 ttl=64 time=8.66 ms 64 bytes from 192.168.0.1: icmp_seq=36 ttl=64 time=13.0 ms 64 bytes from 192.168.0.1: icmp_seq=37 ttl=64 time=4.78 ms 64 bytes from 192.168.0.1: icmp_seq=38 ttl=64 time=3.85 ms

---
 net/mac80211/tx.c | 52 +++++++++++++++++++++++++----------------------
 1 file changed, 28 insertions(+), 24 deletions(-)
net/mac80211/tx.c +28 -24
index d51f810dd2c5b..5714634c81033 100644
@@ -269,7 +269,6 @@ ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx)
 static ieee80211_tx_result debug_noinline
 ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
 {
-
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
 	bool assoc = false;
@@ -277,20 +276,6 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
 	if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED))
 		return TX_CONTINUE;
 
-	if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
-	    test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
-	    !ieee80211_is_probe_req(hdr->frame_control) &&
-	    !ieee80211_is_any_nullfunc(hdr->frame_control))
-		/*
-		 * When software scanning only nullfunc frames (to notify
-		 * the sleep state to the AP) and probe requests (for the
-		 * active scan) are allowed, all other frames should not be
-		 * sent and we should not get here, but if we do
-		 * nonetheless, drop them to avoid sending them
-		 * off-channel. See __ieee80211_start_scan() for more.
-		 */
-		return TX_DROP;
-
 	if (tx->sdata->vif.type == NL80211_IFTYPE_OCB)
 		return TX_CONTINUE;
 
@@ -807,6 +792,33 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
 	return TX_CONTINUE;
 }
 
+static ieee80211_tx_result debug_noinline
+ieee80211_tx_h_check_offchannel(struct ieee80211_tx_data *tx)
+{
+	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
+	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
+
+	if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED))
+		return TX_CONTINUE;
+
+	if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) &&
+	    test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) &&
+	    !ieee80211_is_probe_req(hdr->frame_control) &&
+	    !ieee80211_is_any_nullfunc(hdr->frame_control)) {
+		/*
+		 * When software scanning only nullfunc frames (to notify
+		 * the sleep state to the AP) and probe requests (for the
+		 * active scan) are allowed, all other frames should not be
+		 * sent and we should not get here, but if we do
+		 * nonetheless, drop them to avoid sending them
+		 * off-channel. See __ieee80211_start_scan() for more.
+		 */
+		return TX_DROP;
+	}
+
+	return TX_CONTINUE;
+}
+
 static __le16 ieee80211_tx_next_seq(struct sta_info *sta, int tid)
 {
 	u16 *seq = &sta->tid_seq[tid];
@@ -1873,6 +1885,7 @@ static int invoke_tx_handlers_late(struct ieee80211_tx_data *tx)
 		goto txh_done;
 	}
 
+	CALL_TXH(ieee80211_tx_h_check_offchannel);
 	CALL_TXH(ieee80211_tx_h_michael_mic_add);
 	CALL_TXH(ieee80211_tx_h_sequence);
 	CALL_TXH(ieee80211_tx_h_fragment);
@@ -4745,10 +4758,6 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
 	queue = ieee80211_select_queue(sdata, sta, skb);
 	skb_set_queue_mapping(skb, queue);
 
-	if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) &&
-	    test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state))
-		goto out_free;
-
 	skb = skb_share_check(skb, GFP_ATOMIC);
 	if (unlikely(!skb))
 		return;
@@ -4825,11 +4834,6 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
 	ieee80211_tpt_led_trig_tx(local, len);
 
 	ieee80211_tx_8023(sdata, skb, sta, false);
-
-	return;
-
-out_free:
-	kfree_skb(skb);
 }
 
 static bool ieee80211_check_mcast_offload(struct ieee80211_sub_if_data *sdata,
Signature · 1 line
2.53.0
author maintainer
#109 lore raw

PATCH 106/1257 ASoC: codecs: lpass-wsa-macro: use v2.5 Compander1 addresses on v2.5+

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Srinivas Kandagatla <[email protected]>

[ Upstream commit 233d36a96009682208cc4ca1139b9e5641a8bf09 ]

wsa_macro_set_spkr_mode() unconditionally writes CDC_WSA_COMPANDER1_CTL3 (0x5CC) and CDC_WSA_COMPANDER1_CTL7 (0x5DC). On v2.5+ silicon these registers moved to CDC_2_5_WSA_COMPANDER1_CTL3 (0x5EC) and CDC_2_5_WSA_COMPANDER1_CTL7 (0x5FC); the v2.1 addresses are dead on that hardware, so the update_bits() calls take a bus error:

wsa_macro 6c90000.codec: ASoC error (-5): at
snd_soc_component_update_bits() on 6c90000.codec for
register: [0x000005dc]

The flat regcache had been hiding the read side of this by returning the zero-initialised cache slot instead of doing a bus read, so the error only becomes visible once the cache reports the miss honestly and regmap falls back to a real bus read.

Select the correct address for Compander1 CTL3/CTL7 based on codec_version. The Compander0 and Boost registers used in the same function have the same address across versions, so they stay unchanged. Also collapse the two mode branches to a single sequence with mode-selected values, which is what the switch was doing anyway.

Fixes 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version")
---
 sound/soc/codecs/lpass-wsa-macro.c | 42 ++++++++++++++++++------------
 1 file changed, 25 insertions(+), 17 deletions(-)
sound/soc/codecs/lpass-wsa-macro.c +25 -17
index 38e37908baf91..f7dad096bfa39 100644
@@ -1129,27 +1129,35 @@ static const struct regmap_config wsa_regmap_config = {
 int wsa_macro_set_spkr_mode(struct snd_soc_component *component, int mode)
 {
 	struct wsa_macro *wsa = snd_soc_component_get_drvdata(component);
+	unsigned int comp1_ctl3, comp1_ctl7;
+	u8 comp_val, boost_val;
 
 	wsa->spkr_mode = mode;
 
-	switch (mode) {
-	case WSA_MACRO_SPKR_MODE_1:
-		snd_soc_component_update_bits(component, CDC_WSA_COMPANDER0_CTL3, 0x80, 0x00);
-		snd_soc_component_update_bits(component, CDC_WSA_COMPANDER1_CTL3, 0x80, 0x00);
-		snd_soc_component_update_bits(component, CDC_WSA_COMPANDER0_CTL7, 0x01, 0x00);
-		snd_soc_component_update_bits(component, CDC_WSA_COMPANDER1_CTL7, 0x01, 0x00);
-		snd_soc_component_update_bits(component, CDC_WSA_BOOST0_BOOST_CTL, 0x7C, 0x44);
-		snd_soc_component_update_bits(component, CDC_WSA_BOOST1_BOOST_CTL, 0x7C, 0x44);
-		break;
-	default:
-		snd_soc_component_update_bits(component, CDC_WSA_COMPANDER0_CTL3, 0x80, 0x80);
-		snd_soc_component_update_bits(component, CDC_WSA_COMPANDER1_CTL3, 0x80, 0x80);
-		snd_soc_component_update_bits(component, CDC_WSA_COMPANDER0_CTL7, 0x01, 0x01);
-		snd_soc_component_update_bits(component, CDC_WSA_COMPANDER1_CTL7, 0x01, 0x01);
-		snd_soc_component_update_bits(component, CDC_WSA_BOOST0_BOOST_CTL, 0x7C, 0x58);
-		snd_soc_component_update_bits(component, CDC_WSA_BOOST1_BOOST_CTL, 0x7C, 0x58);
-		break;
+	/* Compander1 CTL3/CTL7 moved on v2.5+ silicon. */
+	if (wsa->codec_version >= LPASS_CODEC_VERSION_2_5) {
+		comp1_ctl3 = CDC_2_5_WSA_COMPANDER1_CTL3;
+		comp1_ctl7 = CDC_2_5_WSA_COMPANDER1_CTL7;
+	} else {
+		comp1_ctl3 = CDC_WSA_COMPANDER1_CTL3;
+		comp1_ctl7 = CDC_WSA_COMPANDER1_CTL7;
 	}
+
+	if (mode == WSA_MACRO_SPKR_MODE_1) {
+		comp_val = 0x00;
+		boost_val = 0x44;
+	} else {
+		comp_val = 0x80;
+		boost_val = 0x58;
+	}
+
+	snd_soc_component_update_bits(component, CDC_WSA_COMPANDER0_CTL3, 0x80, comp_val);
+	snd_soc_component_update_bits(component, comp1_ctl3, 0x80, comp_val);
+	snd_soc_component_update_bits(component, CDC_WSA_COMPANDER0_CTL7, 0x01, comp_val ? 0x01 : 0x00);
+	snd_soc_component_update_bits(component, comp1_ctl7, 0x01, comp_val ? 0x01 : 0x00);
+	snd_soc_component_update_bits(component, CDC_WSA_BOOST0_BOOST_CTL, 0x7C, boost_val);
+	snd_soc_component_update_bits(component, CDC_WSA_BOOST1_BOOST_CTL, 0x7C, boost_val);
+
 	return 0;
 }
 EXPORT_SYMBOL(wsa_macro_set_spkr_mode);
Signature · 1 line
2.53.0
author maintainer
#110 lore raw

PATCH 107/1257 perf powerpc-vpadtl: Fix off-by-one in auxtrace_info minimum size check

In reply to Greg Kroah-Hartman

7.3-stable review patch. If anyone has any objections, please let me know.

------------------

From: Wang Yan <[email protected]>

[ Upstream commit d9c7e2ede92ce258a5d4a6cbc55f75acd379c97d ]

min_sz is set to sizeof(u64) * POWERPC_VPADTL_TYPE, but the code reads auxtrace_info->priv[POWERPC_VPADTL_TYPE], which needs at least POWERPC_VPADTL_TYPE + 1 elements. POWERPC_VPADTL_TYPE is the first enumerator of the priv index enum (0), so min_sz evaluates to 0 and the check validates only the perf_record_auxtrace_info header itself. A PERF_RECORD_AUXTRACE_INFO event carrying a zero-length priv array then passes the size check, and the subsequent priv[POWERPC_VPADTL_TYPE] read runs one u64 past the validated region.

This is the same off-by-one fixed for Intel PT by commit c4362d5e1a5e ("perf intel-pt: Fix off-by-one in auxtrace_info minimum size check") and for Intel BTS by commit b9fb8225951c ("perf intel-bts: Fix off-by-one in auxtrace_info minimum size check").

Use sizeof(u64) * (POWERPC_VPADTL_TYPE + 1) so the highest accessed priv index is covered by the minimum-size validation.

Fixes c4bbd4ec2e50a9ed ("perf powerpc: Process auxtrace events and display in 'perf report -D'")
Cc Athira Rajeev <[email protected]>
---
 tools/perf/util/powerpc-vpadtl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/powerpc-vpadtl.c +1 -1
index af6783cfdb53d..032864e3884af 100644
@@ -683,7 +683,7 @@ int powerpc_vpadtl_process_auxtrace_info(union perf_event *event,
 				  struct perf_session *session)
 {
 	struct perf_record_auxtrace_info *auxtrace_info = &event->auxtrace_info;
-	size_t min_sz = sizeof(u64) * POWERPC_VPADTL_TYPE;
+	size_t min_sz = sizeof(u64) * (POWERPC_VPADTL_TYPE + 1);
 	struct powerpc_vpadtl *vpa;
 	int err;
 
Signature · 1 line
2.53.0